.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Advanced IA race moddings tricks (long) (http://forum.shrapnelgames.com/showthread.php?t=7604)

trooper October 13th, 2002 04:37 PM

Advanced IA race moddings tricks (long)
 
I'm just trying to create an fearly good IA.
And I'm stuck on many points, perhaps you can help, if you're a modding specialist.
(NB : I'm just modfying race files, not general config files, to have a fully compatible race).

about AI_designcreation.txt (it's the main mystery for me !)

1) Are all "spaces per one" based on the same scale ?

Shields Spaces Per One := 250
Armor Spaces Per One := 1200
Majority Comp Spaces Per One := 1200
Majority Comp Ability := Weapon
Secondary Comp Spaces Per One := 0
Secondary Comp Ability :=
Num Misc Abilities := 11
Misc Ability 1 Name := Point-Defense
Misc Ability 1 Spaces Per One := 400
Misc Ability 2 Name := Cloak Level
Misc Ability 2 Spaces Per One := 10000
Misc Ability 3 Name := Quantum Reactor
Misc Ability 3 Spaces Per One := 10000
Misc Ability 4 Name := Combat To Hit Defense Plus
Misc Ability 4 Spaces Per One := 10000
Misc Ability 5 Name := Combat To Hit Offense Plus
Misc Ability 5 Spaces Per One := 10000
Misc Ability 6 Name := Multiplex Tracking
Misc Ability 6 Spaces Per One := 10000

10000 spaces for a multiplex tracking seems a lot, when only 1200 spaces is left for weapons...
Or did I misunderstand the whole thing and 10000 is eight times less then 1200 ?

2) Can I create two types of fighters ? (seeking fighters and direct fire fighters).
Seems that there must be only one design per design type (the older are obsolete).

3) I couldn't manage to build a carrier with cargo space and missile with that design :

Name := Carrier
Design Type := Carrier
Vehicle Type := Ship
Default Strategy := Don't Get Hurt
Size Minimum Tonnage := 10
Size Maximum Tonnage := 5000
Num Must Have At Least 1 Ability := 1
Must Have Ability 1 := Launch/Recover Fighters
Minimum Speed := 3
Desired Speed := 6
Majority Weapon Family Pick 1 := 2
Majority Weapon Family Pick 2 := 0
Majority Weapon Family Pick 3 := 0
Majority Weapon Family Pick 4 := 0
Majority Weapon Family Pick 5 := 0
Secondary Weapon Family Pick 1 := 2
Secondary Weapon Family Pick 2 := 0
Secondary Weapon Family Pick 3 := 0
Secondary Weapon Family Pick 4 := 0
Secondary Weapon Family Pick 5 := 0
Shields Spaces Per One := 50
Armor Spaces Per One := 200
Majority Comp Spaces Per One := 400
Majority Comp Ability := Launch/Recover Fighters
Secondary Comp Spaces Per One := 200
Secondary Comp Ability := Weapon
Num Misc Abilities := 8
Misc Ability 1 Name := Quantum Reactor
Misc Ability 1 Spaces Per One := 10000
Misc Ability 2 Name := Cloak Level
Misc Ability 2 Spaces Per One := 8000
Misc Ability 3 Name := Point-Defense
Misc Ability 3 Spaces Per One := 800
Misc Ability 4 Name := Shield Regeneration
Misc Ability 4 Spaces Per One := 300
Misc Ability 5 Name := Combat To Hit Defense Plus
Misc Ability 5 Spaces Per One := 8000
Misc Ability 6 Name := Emergency Resupply
Misc Ability 6 Spaces Per One := 800
Misc Ability 7 Name := Supply Storage
Misc Ability 7 Spaces Per One := 1000
Misc Ability 8 Name := Cargo Storage
Misc Ability 8 Spaces Per One := 300

4) Strategy : can I prenvent my IA to send isolated ships agains ennemy planets and fleets ?
How can I force it to perform only group attacks ? (always more ships in my fleet then the ennemy, gnark, gnark...)

5) Strategy bis : can non-armed ships (colony, transport) flee from ennemy ships, instead of trying to attack them ?

that all for now, thanks...

trooper October 13th, 2002 06:17 PM

Re: Advanced IA race moddings tricks (long)
 
and I forgot this :

6) my custom race AI is used to open dozen of intelligence projects at a time ! any way to prevent that ?

7) AI states in construction config files :

When are they active ? Are they global or local to a planet or a system ?

Exploration : before any new planet is colonized ?

Infrastructure : peace time, no potential ennmemy ?

Prepare for Attack : difference with below ?

Attack : preparing a planet attack (how many turns before ?)

Secure Holdings After Attack : how many turns after an attack ?

Incursion : ???

Prepare for Defense : ennemy fleet in the neighbourhood ?

Defend (Short Term) : ?

Defend (Long Term) : ??

Not Connected : ???

(lot of interrogation marks, sorry !!!)

Phoenix-D October 13th, 2002 07:08 PM

Re: Advanced IA race moddings tricks (long)
 
"10000 spaces for a multiplex tracking seems a lot, when only 1200 spaces is left for weapons...
Or did I misunderstand the whole thing and 10000 is eight times less then 1200"

With spaces per one, LOWER number means more components. With those numbers you'd get many more weapons than multiplex.

Take the ship size, and divide by the spaces per one value, then round up. That's the number of components the AI will try to put on that ship.

Phoenix-D

trooper October 13th, 2002 10:32 PM

Re: Advanced IA race moddings tricks (long)
 
http://forum.shrapnelgames.com/images/icons/blush.gif http://forum.shrapnelgames.com/images/icons/blush.gif http://forum.shrapnelgames.com/images/icons/blush.gif

Ahhhhhhhhh... that's a interessant point ! I think I've got to go back to my designvehicule files...

oleg October 14th, 2002 05:35 PM

Re: Advanced IA race moddings tricks (long)
 
Quote:

Originally posted by trooper:
I'm just trying to create an fearly good IA.
And I'm stuck on many points, perhaps you can help, if you're a modding specialist.
(NB : I'm just modfying race files, not general config files, to have a fully compatible race).

about AI_designcreation.txt (it's the main mystery for me !)

1) Are all "spaces per one" based on the same scale ?

......

2) Can I create two types of fighters ? (seeking fighters and direct fire fighters).
Seems that there must be only one design per design type (the older are obsolete).

3) I couldn't manage to build a carrier with cargo space and missile with that design :

4) Strategy : can I prenvent my IA to send isolated ships agains ennemy planets and fleets ?
How can I force it to perform only group attacks ? (always more ships in my fleet then the ennemy, gnark, gnark...)

5) Strategy bis : can non-armed ships (colony, transport) flee from ennemy ships, instead of trying to attack them ?

that all for now, thanks...

<font size="2" face="Verdana, Helvetica, sans-serif">Phoenix-D already answered 1) - it works completely different than you think http://forum.shrapnelgames.com/images/icons/icon7.gif
"spaces per one = 250" means AI will put one component per 250k of ship tonnage. For example two on cruiser hull. Very large numbers for some components, like multiplex or combat senseors gurantee there won't be redundancy even for largest ships.

2) Yes, you can but only if you use SEIV Gold - make two designes with different names, say "interceptor" and "bomber". In construction_vehicles.txt file replace calls for "fighter" by "interceptor" and/or "bomber", up to you taste. Just remember that "must have" is cumulative for all designs of one type (here "fighter")

3) Must have ability = launch/recover fighters will automaticaly fill 50% of carrier hull with fighter bays. If you want space left for other components, make "majority component = lau./rec/fighters" space per one = some big number (it will add only one extra FB). make "secondary component = weapon" , put some reasonable number in "space per one" and assign CSM/PM numbers for "choices".

4) It is regulated in "AI_settings". Consult some TDM races, like Rage, Pyrochette, EA and others.

5)Strategy "do not get hurt" will do just that.

Atraikius October 14th, 2002 07:24 PM

Re: Advanced IA race moddings tricks (long)
 
Quote:

3) Must have ability = launch/recover fighters will automaticaly fill 50% of carrier hull with fighter bays. If you want space left for other components, make "majority component = lau./rec/fighters" space per one = some big number (it will add only one extra FB). make "secondary component = weapon" , put some reasonable number in "space per one" and assign CSM/PM numbers for "choices".
<font size="2" face="Verdana, Helvetica, sans-serif">No - the Num Must Have At Least 1 Ability := 1, and the Must Have Ability 1 := Launch/Recover Fighters instruct the AI that the ship has 1 ability it must have and that the ability is Launch/Recover Fighters. That will place a total of 1 Fighter bay on the ship. What instructs the AI on what type of hull to use is the Majority Component ability - Cargo will select a transport and add cargo bays until the 50% requirement is met, Launch/Recover Fighters will result in a carrier, and Colonize types will result in a colony ship. For example, if you wish to construct a carrier using a battle cruiser hull try:

Name := Battle Cruiser Carrier
Design Type := Carrier
Vehicle Type := Ship
Default Strategy := Maximum Weapons Range
Size Minimum Tonnage := 550
Size Maximum Tonnage := 650
Num Must Have At Least 1 Ability := 8
Must Have Ability 1 := Launch/Recover Fighters
Must Have Ability 2 := Launch/Recover Fighters
Must Have Ability 3 := Launch/Recover Fighters
Must Have Ability 4 := Launch/Recover Fighters
Must Have Ability 5 := Launch/Recover Fighters
Must Have Ability 6 := Cargo Storage
Must Have Ability 7 := Cargo Storage
Must Have Ability 8 := Cargo Storage
Minimum Speed := 3
Desired Speed := 6
Majority Weapon Family Pick 1 := 2
Majority Weapon Family Pick 2 := 0
Majority Weapon Family Pick 3 := 0
Majority Weapon Family Pick 4 := 0
Majority Weapon Family Pick 5 := 0
Secondary Weapon Family Pick 1 := 1
Secondary Weapon Family Pick 2 := 25
Secondary Weapon Family Pick 3 := 0
Secondary Weapon Family Pick 4 := 0
Secondary Weapon Family Pick 5 := 0
Shields Spaces Per One := 10000
Armor Spaces Per One := 0
Majority Comp Spaces Per One := 300
Majority Comp Ability := Weapon
Secondary Comp Spaces Per One := 600
Secondary Comp Ability := Weapon
Num Misc Abilities := 5
Misc Ability 1 Name := Quantum Reactor
Misc Ability 1 Spaces Per One := 10000
Misc Ability 2 Name := Cloak Level
Misc Ability 2 Spaces Per One := 8000
Misc Ability 3 Name := Point-Defense
Misc Ability 3 Spaces Per One := 300
Misc Ability 4 Name := Combat To Hit Defense Plus
Misc Ability 4 Spaces Per One := 10000
Misc Ability 5 Name := Combat To Hit Offense Plus
Misc Ability 5 Spaces Per One := 10000

For the Carrier listed in 3)
- Majority Weapon Family Pick 1 does not need a weapon listed as the majority ability is Launch/Recover Fighters.
- Shield Spaces per 1 set at 50 instructs the AI to try to place 16 Shields on a Light Carrier, 20 on a Carrier, and 24 on a Heavy Carrier - there will be no room left for a weapon or any large misc items. The carrier designed will have the minimum number of carrier bays (+1 for the Must have), and then fill up with shields.
- The line for armor will work like the one for shields - you would be better off using a value of zero on this line, and adding an extra misc ability at the end calling for the ability armor.
- The Majority and Secondary abilities are going to call for an additional 2 fighter bays beyond what is already there and 4 missiles on a light carrier.(neet little trick with the majority ability is using zero, as it is fequently already called for in the Must have area, and in this case is used for to fill 50% of the ship - with a value of zero, no more will be added while going through the design, but if any additional space is left at the end, the majority ability will be added to fill up the remaining space)
- By the time that the AI gets to adding cargo, there will be no space left for it. The simplest way to ensure that cargo bays are placed ont he design is to increase the number of 'Must Haves' to 3, and add two more 'must have' lines each calling for cargo storage.

Try looking at the DesignCreation files for the Orks, Zorians, and my Version of the Krill for examples of what you are attempting.

2) - As said, if you are using Gold, give each a different name with the design type Fighter. The 'Must Have' does NOT apply to all designs of the same type, only the specific design it is listed in. However, you will need to make sure that you change the ConstructVehicle file to call out the names you use instead of just calling for Fighter - otherwise it will only build the latest of the designs.

7) - It is rather complicated on how the AI states fit in, the best thing to do is to simply use the TDM race that fits what you are ,looking for the closest as an example to work from, and adust the file from there.

4) & 5) - Best thing to do is to look at the files in several of the TDM races (good idea to do over-all if your trying to create an AI) - For more creative ideas on how to make the AI do more odd things I would recommend looking at the AI's by MB, Rollo, and myself (no shameless plug intended) - Those AI's tend to take advantage of, use, and manipulate the AI's little quirks the most.

oleg October 15th, 2002 03:36 PM

Re: Advanced IA race moddings tricks (long)
 
"No - the Num Must Have At Least 1 Ability := 1, and the Must Have Ability 1 := Launch/Recover Fighters instruct the AI that the ship has 1 ability it must have and that the ability is Launch/Recover Fighters. That will place a total of 1 Fighter bay on the ship. What instructs the AI on what type of hull to use is the Majority Component ability - Cargo will select a transport and add cargo bays until the 50% requirement is met, Launch/Recover Fighters will result in a carrier, and Colonize types will result in a colony ship. For example, if you wish to construct a carrier using a battle cruiser hull try:"

No, it will fill 50% of carrier hull with fighter bays. Trust me. Note the word "carrier". You are absolutely right if you want non-carrier hull, like BC in your example. AI will ideed put just 1 FB. But I was talking about carrier hulls - then AI works as I told.

oleg October 15th, 2002 03:42 PM

Re: Advanced IA race moddings tricks (long)
 
"2) - As said, if you are using Gold, give each a different name with the design type Fighter. The 'Must Have' does NOT apply to all designs of the same type, only the specific design it is listed in. However, you will need to make sure that you change the ConstructVehicle file to call out the names you use instead of just calling for Fighter - otherwise it will only build the latest of the designs."

I am absolutely sure that "must have" applies to all designs of the type. At least it worked this way when I tried to make AI build different types of "attack ship" May be it does not work with units ? If your results are opposite to mine - I have no clues.

Atraikius October 15th, 2002 04:34 PM

Re: Advanced IA race moddings tricks (long)
 
oleg - The 'Must Have' fields are design specific, each type of design can have different 'Must Have' items listed. I can't remenber seeing it apply them to all designs of the same type even in the earlier pre-Gold Versions. I use different 'Must Have' abilites for all of the different design types and haven't had any problems - I know some of the TDM guys also use different abilities as 'Must Have' in thier DesignCreation file (look at the latest Aquilians MB just posted).

- In the Battle cruiser example I used, the AI will place 5 FB's, and 3 Cargo Bays. A carrier with 1 'Must Have' Fighter Bay, and Fighter Bays as the Majority Component will end up with 1 fighter bay over the minimum number of bays required. The design type is used by the AI for which designs to build in the Construct Vehicle file (if not calling for a design name), and how the ship will be used when constructed. i.e. if The Battle Cruiser Carrier I used as an example had a Design Type of anything other than carrier, it would never be loaded with fighters; the Design type tells the AI how the ship is to be used - Carrier loads fighters and joins fleets, Pop. Transport moves population, Mine Layer lays mines, etc... The Majority Ability is what will determine if a Carrier, Transport, Colony Ship or standard hull for ships; the type of hull used for units is determined by the Vehicle Type entry (design a recon satellite with a Fighter Type and you will get a fighter - actually worked very well in the pre-Gold Versions, post-Gold there is a hard code change that will limit the AI from constructing more than 1 Recon Satellite on a planet at a time) - Try using the default design for a carrier, and only replace the Launch/Recover Fighters with Cargo Storage - you'll get a transport with 1 fighter bay on it that will be used by the AI like a carrier.

oleg October 15th, 2002 04:58 PM

Re: Advanced IA race moddings tricks (long)
 
Ok, I made 2 attack ships (design type in design creation file) - one named "missile ship", another "gun ship".
Now, I want AI to build 10 MS and 10 GS.
In construction file I put
first entry for MS with "must have = 10" and
and then GS with "must have = 10". AI builds 10 MS and stops http://forum.shrapnelgames.com/images/icons/icon9.gif http://forum.shrapnelgames.com/images/icons/icon9.gif

Now, I modififie GS "must have = 20" and AI builds 10 MS and 10 GS !!!

IT entirely possible that "planet per entry" works differently and AI will build GS in first exapmle once it has more planets. But every time I tried, "must have" appears to apply to generic "design type".

I understand perfectly well how you make carrier based on BC hull. My point was only about how AI fill carrier hulls and I stand by it.

Rexxx October 15th, 2002 05:17 PM

Re: Advanced IA race moddings tricks (long)
 
Hi Oleg,
I encountered the same problem with satellites. I created two designs of small sats, one with DUCs named Sat (SR), one with CSM named Sat (LR).
I called for their names in the construction_vehicles file, both with "must have at least = 10). The Ai everytime builds only the number of the first entry. I tried it with attacks ships, with everything, to no avail. I always ended up one with only one of the designs.

I'm quite sure that you're right: the must-have numbers (still) refer to the design type. The AI builds the number of the first entry of a certain design type and only if the second entry for this design type calls for a higher number of Must Have, the AI will build the rest of it. It does not consider names. Just like the numbers in the construction_facilities-file.

[ October 15, 2002, 16:24: Message edited by: Rexxx ]

Atraikius October 15th, 2002 05:20 PM

Re: Advanced IA race moddings tricks (long)
 
OK, I see the problem now - we are looking at different 'Must Have' lines. By Must Have, I was reffering to:

Num Must Have At Least 1 Ability := 1
Must Have Ability 1 := Launch/Recover Fighters

Not the must have from the ConstructVehicle file. I'm still unsure on some of the ways the ConstructVehicle file works, but I believe that you are right about the Must Have at Least := xxxx line interpreted as must have that number of ships of the Design Type.

oleg October 15th, 2002 05:58 PM

Re: Advanced IA race moddings tricks (long)
 
Good, I knew it was some simple misunderstanding between us http://forum.shrapnelgames.com/images/icons/icon7.gif

Thanks, Rexxx, so it works the same way with units. It makes editing the construction file rather complicated and cryptic but it should be possible to make AI build correct numbers by keeping track how many are listed. I suspect "entry per planet" works the same way but could not verify it so far.

Atraikius October 15th, 2002 07:23 PM

Re: Advanced IA race moddings tricks (long)
 
Thanks for bringing up the point on the Must have at least := xxxx in the ConstructVehicle file - soon as I saw your post on it I reallized that has been the problem I've been pulling my hair out over in almost all of my AI's (why special designs haven't been being built in one, why one wasn't building enough carriers, and why I haven't been able to get the #@$&*% Krill and Orks to spend more than 55% - 60% of thier resources in maintenance). Thanks again - your post pointed out what I have been overlooking.

I'm at work so I can't check now, but try looking at how carriers are designed again. I'm sure that the Majority Ability is what is being used to determine that a carrier is to be used, and that whenever one of the specific hull types (Carrier, Transport, Colony) are used, the minimum requirements are filled automatically. I intend to check once I'm home, but try usind 4 carrier designs, one with Launch/Recover Fighters as the Must Have Ability, and the Majority spaces per one set at 10000, with no shields and only Supply as an Additional Ability with spaces per one set at 10; the second with Launch/Recover Fighters as the Must Have Ability, and the Majority spaces set at 0; with the third and fouth the same as the first two except having Cargo Storage as the Must Have Ability (have to have fighter bays available or the AI will just design a ship with the one cargo bay and fill the rest with supply) . I'm sure that all four will use carrier hulls, and that the two with Majority spaces set to 10000 will have one more fighter bay than the ones with Majority spaces set to 0; but I'm not sure if the Must have fighter bay will be counted towards the 50%, or will be in addition to it (I know for sure that it is in addition when dealling with weapons - but I there were some oddities with it when dealing with components with cargo storage abilities - like listing 3 Lay Mines Must Have Abilities with Cargo Storage as the Majority Ability and having the AI design a small transport with two mine layers and eight cargo bays), if it is in addition, then the two with Launch/Recover Fighters as a Must Have Ability will have one more fighter bay than the corresponding design with Cargo Storage.


All times are GMT -4. The time now is 08:24 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.