Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: hosolon on December 28, 2008, 03:09:00 AM

Title: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 03:09:00 AM
  this is from bzcommand.com Bz2 :: Tutorials
 "Turning on AIP logging:

 Before you test your AIPs, make sure you turn on AIP logging in two places. Add the /aiplogging parameter to your BZ2 game shortcut to
 enable ingame AIP logging. The more detailed option is to turn on the option for aip logging in the gameprefs. ini file in the Addon\Config
 folder. The files are written to the Logs folder, and you will probably need them to figure out what really happened."
where do i turn it on?
and what are the two places?
Title: Re: AIP making help :hosolon
Post by: Steeveeo on December 28, 2008, 03:12:37 AM
First point, you dont have to sign the title of the thread, we can already see who started it.

Second, in answer to the question:

1. Make a shortcut to BZ2, and slap /aiplogging to the end of the "Target" line (outside quotes if there are any). This will put files into the folder marked "logs" in the BZ2root.
2. Follow the directions in that quote of yours.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 03:37:19 AM
is the "Target" line the Address bar? as in C:\Program Files\Battlezone II\pb4a (/aiplogging)
   and if so do i put it in another file?as in C:\Program Files\Battlezone II\testfile
Title: Re: AIP making help :hosolon
Post by: Steeveeo on December 28, 2008, 03:49:08 AM
Yes, when you rightclick the shortcut and select "Properties" the address in the Target line is what you need to add /aiplogging to.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 03:50:01 AM
it comes up w/ a problem with shortcut   The name "C:\Program Files\Battlezone II\pb4l\bzone.exe"/aiplogging' specified in the target box is not valid. Make sure the path is correct.
Title: Re: AIP making help :hosolon
Post by: Steeveeo on December 28, 2008, 04:02:23 AM
Quote from: hosolon on December 28, 2008, 03:50:01 AM
it comes up w/ a problem with shortcut   The name "C:\Program Files\Battlezone II\pb4l\bzone.exe"/aiplogging' specified in the target box is not valid. Make sure the path is correct.
Try putting a space between the quote and the command.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 04:04:22 AM
i think it worked tkx
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 05:18:54 AM
  "The more detailed option is to turn on the option for aip logging in the gameprefs. ini file in the Addon\Config
    folder."

// The following are settable by the user. They are assigned to the
// default values, as if this file was empty. Comments above them
// should indicate what possible settings are available.

// Note that only things that cannot affect game synchronization are
// in here (views, etc).

// Further update: please *DO* *NOT* edit this file. Place your edits
// in LocalPrefs.ini.

[UserPrefs]

// How long the console remains visible after it's opened via code
// popping up an error. These values are in ms, so that 1000 = 1
// second. A value of 0 should prevent that from appearing; values
// less than 0 are treated as zero.
BZoneLoadConsoleOpenTime = 1000
BZoneIngameConsoleOpenTime = 0
BZ2EditLoadConsoleOpenTime = 3000
BZ2EditIngameConsoleOpenTime = 1000


// If this is true, then all items printed to the ingame console
// are echoed to the battlezone.log file. This'll let people see
// what's in some of the really huge hierarchies.
EchoConsoleToLogfile = false

// If true, the AIP running code will log things to disk, same effect
// as passing /aiplogging on the commandline. There is probably a
// slight performance hit when this is enabled, so I recommend that
// only modders turn this on.
aipLogging = true
// If true, when an out-of-sync is needed, it'll spam the AIP log file
// w/ extra info to try and help determine what went wrong.  Only
// testers should really have this on; you need logs from both client
// (or client that went out of sync if more than one client) & server
// to begin to dig into this.
aipExtraLoggingOnResync = false

   is this how its supposed to look?

and where do i save the .aip file to so i can use it in MPI or IA?
Title: Re: AIP making help :hosolon
Post by: TheJamsh on December 28, 2008, 12:19:04 PM
turn it OFF in gameprefs.ini. If you edit this file you will get bad assets.

COPY it into localprefs, then change it to true.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 05:54:18 PM
where do i save the .aip file to?
Title: Re: AIP making help :hosolon
Post by: TheJamsh on December 28, 2008, 07:05:03 PM
erm... a place...

it depends what you plan on doing with it. if you can edit AIP's you shud be able to know where it goes...
Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 08:58:21 PM
Nice come back " a place" NO DU
1 i am making a .aip

2 I am using the aip edit from http://www.leinensoft.com/bz2/aipeditor.htm and when I hit save as... it brings me to my documents.

Title: Re: AIP making help :hosolon
Post by: hosolon on December 28, 2008, 09:06:57 PM
also do i turn on my aip in the bz2 extra options befor i start the game? on the same screen where i pick the player recy type?
Title: Re: AIP making help :hosolon
Post by: TheJamsh on December 28, 2008, 09:53:29 PM
it wasnt a come back, its a valid point! it depends on what youre using it for. if you havent made a mod folder or anything, just put it into 'addon' for now.

you need to make an 'autoreg' file for the aip to work, look at the examples in ADDON>AUTOREG to learn how. they open in notepad. edit one, and place that in you folder, depending on what its called.

e.g., the insane AIP's are called 'INSANE***.aip' the three stars represent the needed parts (the two racenames and the plan type) . so the file needs to be called:

aip_insane***.AUTOREG.

so for Scion (CPU) Vs ISDF (Human). You need the following:

insanefi0.aip
insanefi1.aip
insanefi3.aip
insanefis.aip
insanefia.aip
insanefiL.aip

you MUST have all 6 of those AIP's to be able to play scion Vs ISDF with the normal instant.dll otherwise it wont work.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 29, 2008, 04:42:31 AM
If I just set the aip (in the aip edit) to how I want it will it automatic be separated in to ii0, ii1, ii3, iis, iia, and iiL?

[Plan]
planType = "CollectPool"
planPriority = 123
buildIfNoIdle = 1

[Plan]
planType = "CollectPool"
planPriority = 122
buildIfNoIdle = 1

[Plan]
planType = "CollectPool"
planPriority = 121
buildIfNoIdle = 1

[Plan]
planType = "CollectPool"
planPriority = 120
buildIfNoIdle = 1
doNextOnFail = 1

[Plan]
planType = "BuildMinimums"
planPriority = 119
buildType1 = "ivcons"
buildCount1 = 1

[Plan]
planType = "BaseBuildMinimums"
planPriority = 110
buildType1 = "ibpgen"
buildType2 = "ibfact"
buildType3 = "ibcbun"
buildType4 = "ibgtow"
buildType5 = "ibpgen"
buildType6 = "ibpgen"
buildType7 = "ibarmo"
buildType8 = "ibsbay"
buildType9 = "ibcbun"

[Plan]
planType = "BuildMinimums"
planPriority = 100
buildType1 = "ivtank"
buildCount1 = 3
buildType2 = "ivserv"
buildCount2 = 2
maxLoops = 1

[Plan]
planType = "Service"
planPriority = 95
serviceUnit = "ivserv"
unitType1 = "ivtank"
unitType2 = "ivrecy"
unitType3 = "ibpgen"
buildIfNoIdle = 1
..................................

When it is finished, will this be partitioned into the 6 .aip files I need?
Title: Re: AIP making help :hosolon
Post by: Red Devil on December 29, 2008, 04:48:09 AM
Nope.  Each AIP type (013als) does a different thing and are triggered by the DLL depending upon game state, so you need to set them up that way.

0 == startup (collect pools)

1/3 General action

A == Ant-Assault

S == Anti-Siege

L == Late Game
Title: Re: AIP making help :hosolon
Post by: mrtwosheds on December 29, 2008, 05:37:14 AM
In pb4a there is a switch.

[Start]
DLLCanSwitch = False
to turn off dll switching if you want to, but then you have to supply commands like this to make it switch when you want it to.

[Plan1]
MinTtlScrap = 100
//HisMinTtlScrap = 100
planCondition = "HisExists"
planConditionClass = "dbfact"
planConditionCount = 1
planCondition2 = "HisExists"
planConditionClass2 = "dbarmo"
planConditionCount2 = 1
planCondition3 = "HisExists"
planConditionClass3 = "dbsbay"
planConditionCount3 = 1
planPriority = 255
planType = "SwitchAIP"
NextAIP = "LOS13_dd6.aip"

Im hoping to make my aips a bit smarter with this, but making aip sets takes some mental dedication and time to do, its not easy.
Title: Re: AIP making help :hosolon
Post by: hosolon on December 29, 2008, 09:18:21 AM
this is what a pre-made .aip file looks like.
planType = "CollectPool"
planType = "CollectPool"
planType = "CollectPool"
planType = "BuildMinimums"
planConditionClass = "fbforg"
buildType1 = "fvscout"
planType = "Attacker"
attackType2 = "fvscout"
planType = "CollectField"
planType = "BuildMinimums"
buildType1 = "fvcons"
planType = "BaseBuildMinimums"
planConditionClass = "fbforg"
buildType1 = "fbkiln"
planType = "Upgrade"
planConditionClass = "fbforg"
planType = "Attacker"
attackType1 = "fvscout"
planType = "BaseBuildMinimums"
buildType1 = "fbspir"
planType = "Attacker"
planType = "BaseBuildMinimums"
buildType1 = "fbdowe"
buildType2 = "fbstro"
[Plan]
planType = "Attacker"

where is the switch from 0 to 1 or 3 or from a to l?
my question is do i have to make an .aip file 6 times or just once?
      the pre-made ones have all 6 :?
Title: Re: AIP making help :hosolon
Post by: TheJamsh on December 29, 2008, 01:23:35 PM
you have to make 6 AIP files. they DONT get split up in-game.

all six are different
Title: Re: AIP making help :hosolon
Post by: mrtwosheds on December 29, 2008, 02:29:12 PM
The stock aips do not use the DLLCanSwitch = False switch.

The dll switches aip's when certain conditions are met, like
Going near the enemy base
building 3 assault vehicles etc etc.

I was just pointing out that DLLCanSwitch = False can be used to customise this switching, you could use it so that you just use 2 simple aip's, or maybe 10 huge and complex ones!

Thorough reading of the modlog's is essential to gain an understanding of what is now possible with aip's.