.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $6.00
World Supremacy- Save $10.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old October 3rd, 2003, 09:20 AM
Mephisto's Avatar

Mephisto Mephisto is offline
Brigadier General
 
Join Date: Sep 2000
Location: Frankfurt, Germany
Posts: 1,994
Thanks: 0
Thanked 0 Times in 0 Posts
Mephisto is on a distinguished road
Default Re: Question re AI Modding

The files are read again at the start of every turn, just like SJ said.
__________________
For, in the final analysis, our most basic common link is that we all inhabit this small planet. We all breathe the same air. We all cherish our children's futures. And we are all mortal. - JFK
Reply With Quote
  #2  
Old October 4th, 2003, 01:31 AM

JLS JLS is offline
Lieutenant Colonel
 
Join Date: Feb 2003
Location: RI. USA
Posts: 1,470
Thanks: 0
Thanked 0 Times in 0 Posts
JLS is on a distinguished road
Default Re: Question re AI Modding

Originally posted by Q:

Quote:
First priority are facilities if there is space left on the colony. The facilities are chosen according to the colony type and the AI facility construction file.
Agreed
My preference for the New Systems first Colony would be a Resupply Depot as the first for an AI.
- -

Quote:
Second priority is the AI vehicle construction file. Of course you can have units in this file too.
Agreed.
In addition, with the Vehicles Construction file there is also a protocol of rules to be followed by the AI Players. Please refer to reference.

Even an early introduction of just one Base Ship Yard after the initial Colonizer enty from the AI explore state, will increase the AI’s efficiency in all areas for the AI build sequences

In many cases, units from the Vehicles file will be built at the Home World.

= = =

Then followed by the AI Player to consider its 'RACE'_AI_Construction_Units File

On each turn, this file will be processed (if it exists), as a Default in the AI folder but better IMO is in the actual Race Folders and taylored for that race; as well

Units will be added
to all planetary construction queues which:
1. Are not currently busy.
2. Those planets which have reached maximum facilities.
3. The amount consumed per turn won't reduce the empire's resources to zero.

Note: If there are units listed in the AI_Construction_Vehicles.txt file, they
will be constructed normally. As per Vehicales File build Rules.
- - - -

Quote:
Last priority is the AI unit construction file.

For homeworlds the AI goes directly to the vehicle construction file because homeworlds are full with facilities at the beginning of the game. However for new colonies facilities are built first, which makes them very vulnerable. A human player would usually build first one or two weapon platforms if the colony is at risk for enemy attacks. As far as I have seen it, the AI does not do that.
Agreed, with Units at the lead of both the Vehicle and the Unit file the Home World will receive some early protection on the opening few turns of the game.

I also agree that Colonies do not get rush units at defalt files, se4 v1.84 usually directs the Colonies to build a Facility first, then at some point it gets around to building units.

However, if we manipulate that AI's Facility file to exclude Facilities to be built in AI STATE Defend (Short Term); this may prioritize the Unit File for that AI when he is in that state to RUSH build Units for a Colonies Protection, however this may set the AI back if he requires Resources and is for ever reverting back to that excluded state.
Also to consider at the current default and with a slower unit production; domed Colonies may be insured quality unit later in the game. Just some fuel for thought

= = = = = =

Reference

_AI_Construction_Vehicles File
Rules:
1. The game picks a selection based on the AI State. There cannot be duplicate
AI states.
2. Item will be placed at whichever spaceyard is available and can get it done the fastest.
3. First item in the queue is selected, and evaluated.
4. If the Build at Least value is greater than 0, we check if the Planet Per Item condition
is still true. If it is, then we purchase another one, if not, we move to the next
queue item. If we do purchase another one, we continue in this loop until the
condition is false, or we have purchased the number in Build At Least.
5. When the Last item is reached, it restarts at the beginning.

~

_AI_Construction_Facilities File
AI State := Exploration, Infrastructure, Prepare for Attack, Attack, Secure Holdings After Attack, Incursion, Prepare for Defense, Defend (Short Term), Defend (Long Term), Not Connected
Construction Queue Type := Mining Colony
Num Queue Entries := 14
Facility 1 Ability := Supply Generation
Facility 1 Amount := 1

~

se4 Default_AI_Construction_Vehicles
AI State := Exploration
Num Queue Entries := 15
Entry 1 Type := Attack Ship
Entry 1 Planet Per Item := 50
Entry 1 Must Have At Least := 2
Entry 2 Type := Weapon Platform (I would recommend as Entry 1)
Entry 2 Planet Per Item := 0
Entry 2 Must Have At Least := 2


~

se4's SAMPLE Default_AI_Construction_Units
Percentage of Resources To Reserve For Unit Construction := 10 (This may be raised a little for some extra early game units)

Colony Type := Homeworld
Num Queue Entries := 5
Entry 1 Type := Troop
Entry 1 Maximum in kT := 200
Entry 2 Type := Weapon Platform
Entry 2 Maximum in kT := 600
Entry 3 Type := Fighter
Entry 3 Maximum in kT := 200
Entry 4 Type := Weapon Platform
Entry 4 Maximum in kT := 1200
Entry 5 Type := Fighter
Entry 5 Maximum in kT := 65000

[ October 03, 2003, 22:26: Message edited by: JLS ]
__________________
>~~~~~~AI CAMPAIGN -NEW-v4.191a AIC ~~~~~~<

Optimized for[i] Solitaire Play!
With or without all Warp points, Finite resources, same starts and Simultaneous movement


~~~ CLICK ON &gt;&gt;&gt; (((&gt; <font color="green"> AI CAMPAIGN v4.191 </font> &lt)) &lt;&lt;&lt; To Get ~~~
Reply With Quote
  #3  
Old October 4th, 2003, 01:54 AM

JLS JLS is offline
Lieutenant Colonel
 
Join Date: Feb 2003
Location: RI. USA
Posts: 1,470
Thanks: 0
Thanked 0 Times in 0 Posts
JLS is on a distinguished road
Default Re: Question re AI Modding

Quote:
Originally posted by DavidG:
Here's another question. during the process of a game does the game refer to the .txt files for info or are they read and 'loaded' into the game at start. In other words can I change the AI's behaviour half way through the game? (I want to create a scenario and will play all the empires in a game myself at the start but I want to make sure I can still modify thier behaviour later)
I usely restart the se4 from desk top as this helps to ensure I have not just inroduced an error after a change.
Then reload the the saved game from there

[ October 03, 2003, 12:55: Message edited by: JLS ]
__________________
&gt;~~~~~~AI CAMPAIGN -NEW-v4.191a AIC ~~~~~~&lt;

Optimized for[i] Solitaire Play!
With or without all Warp points, Finite resources, same starts and Simultaneous movement


~~~ CLICK ON &gt;&gt;&gt; (((&gt; <font color="green"> AI CAMPAIGN v4.191 </font> &lt)) &lt;&lt;&lt; To Get ~~~
Reply With Quote
  #4  
Old October 7th, 2003, 03:17 PM
QBrigid's Avatar

QBrigid QBrigid is offline
Corporal
 
Join Date: Feb 2003
Location: Pennsylvania
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
QBrigid is on a distinguished road
Default Re: Question re AI Modding

Quote:
Originally posted by JLS:
[QB] Agreed, with Units at the lead of both the Vehicle and the Unit file the Home World will receive some early protection on the opening few turns of the game.

I also agree that Colonies do not get rush units at defalt files, se4 v1.84 usually directs the Colonies to build a Facility first, then at some point it gets around to building units.

However, if we manipulate that AI's Facility file to exclude Facilities to be built in AI STATE Defend (Short Term); this may prioritize the Unit File for that AI when he is in that state to RUSH build Units for a Colonies Protection, however this may set the AI back if he requires Resources and is for ever reverting back to that excluded state.
Also to consider at the current default and with a slower unit production; domed Colonies may be insured quality unit later in the game. Just some fuel for thought

= = = = = =

Reference
How will deleteing AI STATE Defend (Short Term) from the facility files colony types help the AI build more units, is more to this and can you expand on your theory.
Reply With Quote
  #5  
Old October 7th, 2003, 04:07 PM
DavidG's Avatar

DavidG DavidG is offline
Lieutenant Colonel
 
Join Date: Jan 2002
Location: Dundas, Ontario, Canada
Posts: 1,498
Thanks: 0
Thanked 0 Times in 0 Posts
DavidG is on a distinguished road
Default Re: Question re AI Modding

Quote:
Originally posted by QBrigid:
quote:
Originally posted by JLS:
[QB] Agreed, with Units at the lead of both the Vehicle and the Unit file the Home World will receive some early protection on the opening few turns of the game.

I also agree that Colonies do not get rush units at defalt files, se4 v1.84 usually directs the Colonies to build a Facility first, then at some point it gets around to building units.

However, if we manipulate that AI's Facility file to exclude Facilities to be built in AI STATE Defend (Short Term); this may prioritize the Unit File for that AI when he is in that state to RUSH build Units for a Colonies Protection, however this may set the AI back if he requires Resources and is for ever reverting back to that excluded state.
Also to consider at the current default and with a slower unit production; domed Colonies may be insured quality unit later in the game. Just some fuel for thought

= = = = = =

Reference

How will deleteing AI STATE Defend (Short Term) from the facility files colony types help the AI build more units, is more to this and can you expand on your theory.
I think what he meant was to delete the Facilities listed under the AI state Defend (Short Term). Then the AI finding no facilities to build will go the the Vehcile const file
__________________
SE4Modder ver 1.76
or for just the EXESE4Modder EXE Ver 1.76
SE4 Mod List
Reply With Quote
  #6  
Old October 7th, 2003, 09:05 PM

JLS JLS is offline
Lieutenant Colonel
 
Join Date: Feb 2003
Location: RI. USA
Posts: 1,470
Thanks: 0
Thanked 0 Times in 0 Posts
JLS is on a distinguished road
Default Re: Question re AI Modding

Exactly.

Now you need to follow this up with a Unit File that includes the Colony type the AI may Subscribe too. For Example see reference

You also may include a cell for that exampled Mining Colony Type: Just for that AI STATE Defend (Short Term)

Why AI STATE SHORT TERM DEFEND? This is so; when the AI is triggered to go into this (strategy state) it will consider what is really to be needed to be built; by the designers wishs.

The AI will be triggered into a SHORT TERM STATE by:
With an Enemy in Territory ONLY from any existing AI (strategy) State other then (Defend Long Term and possibly with in the Defend Short Term in its self… But will continue thru the entire defaulted: AI State :=(Defense, Defend (Short Term), Defend (Long Term) States; as long as an Enemy is in your AI's Territory

The Short Term State will Last for (about 5 turns) and will Prompt the AI to start fresh builds from the AI Facilities, Vehicle Files (if that Colony has a Ship Yard) and the Units File.
This AI prompt will NEVER delete any existing builds in the Queue and May add to the existing build tasks for some Queues.
With a Default Vehicle File; The AI subscription will start at Entry 1 Type.
example se4 default AI Vehicle File:
AI State := Prepare for Defense, Defend (Short Term), Defend (Long Term)
Num Queue Entries := 21
Entry 1 Type := Weapon Platform
Entry 1 Planet Per Item := 0
Entry 1 Must Have At Least := 2
Entry 2 Type := Satellite
Entry 2 Planet Per Item := 0
Entry 2 Must Have At Least := 2
"~"

Any and all build prompts also will be subject to the Facility, Vehicles and Unit build protocol of Rules.

The AI will remain in the strategy state of: Defend Short Term if an attack is underway by enemy forces. This is the early stages of the defense for about the (first 5 turns).

If the enemy is now; only near by and not in your AI’s System and there, is (no) unexplored systems close by; then the AI will switch to: Infrastructure State
If the AI can still explore some new systems with no Enemy nearby; then the AI will default to the EXPLORE STATE.

If the Enemy attack is continuous in your AI’s territory THEN your AI may perceive this to be a prolonged conflict and need to TOTALLY defend its systems your AI Player will lock into and to continue with the Defend Long Term (strategy set) until that enemy is gone from its territory then that AI will resume at the Infrastructure State; until another trigger.

Reference
Example Only "RACE"_AI_Construction_Facilities
AI State := Defend (Short Term)
Construction Queue Type := Mining Colony
Num Queue Entries := #
Facility 1 Ability := Supply Generation
Facility 1 Amount := 1
Facility 2 Ability := Shield Modifier - System
Facility 2 Amount := 1
Facility 3 Ability := Combat Modifier - System
Facility 3 Amount := 1
Facility 4 Ability := Damage Modifier – System
Facility 4 Amount := 1
Facility 5 Ability := Change Population Happiness – System
Facility 5 Amount := 1
Facility 6 Ability := Stop Planet Destroyer
Facility 6 Amount := 1
Facility 7 Ability := Stop Black Hole Creator
Facility 7 Amount := 1
Facility 8 Ability := ETC

Example only “RACE”_AI_Construction_Units
Colony Type := Mining Colony
Num Queue Entries := 23
Entry 1 Type := Fighter
Entry 1 Maximum in kT := 140
Entry 2 Type := Troop
Entry 2 Maximum in kT := 60
Entry 3 Type := Weapon Platform
Entry 3 Maximum in kT := 200
Entry 4 Type := Troop
Entry 4 Maximum in kT := 140
Entry 5 Type := Weapon Platform
Entry 5 Maximum in kT := 400
Entry 6 Type := Fighter
Entry 6 Maximum in kT := 350
Entry 7 Type := Troop
Entry 7 Maximum in kT := 340
Entry 8 Type := Weapon Platform
Entry 8 Maximum in kT := 600
Entry 9 Type := Troop
Entry 9 Maximum in kT := 540
Entry 10 Type := Weapon Platform
Entry 10 Maximum in kT := 1000
Entry 11 Type := Troop
Entry 11 Maximum in kT := 940
Entry 12 Type := Fighter
Entry 12 Maximum in kT := 600
Entry 13 Type := Weapon Platform
Entry 13 Maximum in kT := 2000
Entry 14 Type := Troop
Entry 14 Maximum in kT := 1140
Entry 15 Type := Fighter
Entry 15 Maximum in kT := 1200
Entry 16 Type := Weapon Platform
Entry 16 Maximum in kT := 3000
Entry 17 Type := Troop
Entry 17 Maximum in kT := 1340
Entry 18 Type := Weapon Platform
Entry 18 Maximum in kT := 4000
Entry 19 Type := Troop
Entry 19 Maximum in kT := 1540
Entry 20 Type := Weapon Platform
Entry 20 Maximum in kT := 5000
Entry 21 Type := Satellite
Entry 21 Maximum in kT := 2400
Entry 22 Type := Weapon Platform
Entry 22 Maximum in kT := 6000
Entry 23 Type := Troop
Entry 23 Maximum in kT := 3000

[ October 07, 2003, 20:30: Message edited by: JLS ]
__________________
&gt;~~~~~~AI CAMPAIGN -NEW-v4.191a AIC ~~~~~~&lt;

Optimized for[i] Solitaire Play!
With or without all Warp points, Finite resources, same starts and Simultaneous movement


~~~ CLICK ON &gt;&gt;&gt; (((&gt; <font color="green"> AI CAMPAIGN v4.191 </font> &lt)) &lt;&lt;&lt; To Get ~~~
Reply With Quote
  #7  
Old October 7th, 2003, 10:16 PM
Rollo's Avatar

Rollo Rollo is offline
Brigadier General
 
Join Date: Jul 2001
Location: Kiel, Germany
Posts: 1,896
Thanks: 0
Thanked 0 Times in 0 Posts
Rollo is on a distinguished road
Default Re: Question re AI Modding

hmm, I dunno. From my observations the AI uses the Defend (Short Term) as the most common state. And also can stay there for long periods of time.
That is why I treat Defend (Short Term) as the default state (usually use the same queues as Infrastructure). Removing the facility builds could hurt the development of the AI IMHO.
__________________
SE4
Devnull Mod Gold:
Version 1.80
Dungeon Odyssey:
Hack and Slash
Version 0.53e
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:03 AM.


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