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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #11  
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
  #12  
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
  #13  
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
  #14  
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
  #15  
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
  #16  
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
  #17  
Old October 7th, 2003, 10:44 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

Originally posted by Rollo:

Quote:
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.
It is absolute that the AI will only go into Defend (Short Term) when a Enemy is in its territory… ANd clear this AI State when the Enemy is Cleared.

And agreed, that if the Enemy stays in the AI players Territory that with the se4 default layout of AI States "as you say" and as we both have seen the AI will remain in the Defend (Short Term) and Continue thru and to the Defend (Long Term) as per the se4 default SET with respect of the Vehicle File:
AI State := Prepare for Defense, Defend (Short Term), Defend (Long Term)
Un till that enemy is cleared.

Quote:
That is why I treat Defend (Short Term) as the default state (usually use the same queues as Infrastructure).
Absolutely Rollo, this is feasible as long as it is understood that any time an Enemy enters your AI’s Territory that it will now Subscribe to this non-default AI State := Defend (Short Term), Infrastructure
Un till that enemy is cleared.
Then exit to the Explore State if there are still unexplored Systems near
And (may not reset) to Entry 1 of the non-defaulted and combined Infrastructure State; after the AI has cleared the Enemy and is directed to resume the Infrastructure State. Because in that layout, it is already producing in that State.

In addition, this non-default lay-out (((may))) result in the probable non-subscribing of the Defend (Long Term), depending on where this may be located or paired with; in a non-defaulted se4 Vehicles file.

Quote:
Removing the facility builds could hurt the development of the AI IMHO.
Agreed,
as I posted, but this is an option and fuel for thought to produce Units in a possable time of need, thats all... And does come with a circumstance

[ October 07, 2003, 22:15: 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
  #18  
Old October 8th, 2003, 12:33 AM
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

Quote:
Originally posted by JLS:
Absolutely Rollo, this is feasible as long as it is understood that any time an Enemy enters your AI’s Territory that it will now Subscribe to this non-default AI State := Defend (Short Term), Infrastructure
Un till that enemy is cleared... (snip)
exactly, and this is the whole reason behind it. Since it is very common that some enemy ship is nearby (be it some scout or even colony ship) I like the AI to just follow the 'main plan'.
In regards to Defend (Long Term), I cannot recall seeing an AI in this state once. It is rare to say the least.

Quote:
And (may not reset) to Entry 1 of the non-defaulted and combined Infrastructure State; after the AI has cleared the Enemy and is directed to resume the Infrastructure State. Because in that layout, it is already producing in that State
Not sure what you mean by that '(may not reset)', since the AI will work it's way down the queue starting with entry 1 every turn.

[ October 07, 2003, 23:42: Message edited by: Rollo ]
__________________
SE4
Devnull Mod Gold:
Version 1.80
Dungeon Odyssey:
Hack and Slash
Version 0.53e
Reply With Quote
  #19  
Old October 8th, 2003, 08:06 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

Rollo, you are introducing an AI doctrine that you feel is best for the environments that you perceive, and your doctrines are solid; please do not misunderstand me. Your doctrine offers a great deal towards AI growth and probable economic options.

However, the AI is hard coded to change States when another non-treaty Empires Ship enters your AI's territory and that AI State is AI State := Defend (Short Term). If Defend (Short Term) is paired with another AI State so-be-it and is irrelevant, the AI will not change States again until there is no longer an enemy ship in its territory. In addition, the AI may decide to continue to the Defend (Long Term) State, which in actuality is nothing more then a continuation of the (Short Term state) build process with the default Vehicle Construction File.

So basically to say, with a Lay out of AI State := Defend (Short Term), Infrastructure; and the Enemy is not cleared from that AI’s Territory that as far as the Vehicle Construction file is concerned, the whole Category of the non-default {Defend (Short Term), Infrastructure} is in actuality the continuation of the now non-existent Defend (Long Term) State; that was once combined as above.

~

Also to say that the Hard Code will allow the AI to change from the Defend (Short Term) States, ONLY after the enemy is cleared, and excluding (Long Term); that this will yield only TWO strategy state options for that AI:

1: Explore State and only if there is NOT an Enemy controlled System nearby and there is in fact an unexplored System near.

2: Infrastructure State and only if the Enemy is still near but not actually in its Territory and there are no Un-explored Systems nearby.
= = = =

Quote:
exactly, and this is the whole reason behind it. Since it is very common that some enemy ship is nearby (be it some scout or even colony ship) I like the AI to just follow the 'main plan'.
You are asserting your “main plan” and it would be unwise and/or disrespectful for me to comment on all the Pros and any Cons of your doctrine.

Other then to say, as I posted above; in regards to some obvious strengths.
- - - -

Quote:
In regards to Defend (Long Term), I cannot recall seeing an AI in this state once. It is rare to say the least.
I will risk a response to this with disregard to the uncertainty of the location of your Defend (Long Term) AI State's placement in your Vehicle Construction file.

What I proposes is happening to your Defend (Long Term) and only as this applies to your Vehicle Construction file is that; what is probably happening, is that the Continuation from Short Term defend to Long Term Defend can not happen, and that this continuation for Long Term Defend is in your: Defend (Short Term)--> that will Continue to your combined---> Infrastructure State…
- - - -

Quote:
And (may not reset) to Entry 1 of the non-defaulted and combined Infrastructure State; after the AI has cleared the Enemy and is directed to resume the Infrastructure State. Because in that layout, it is already producing in that State
This is based on above:

“Also to say that the Hard Code will allow the AI to change states; ONLY after the enemy is cleared, and that this will yield only TWO strategy state options for that AI:"
2: Infrastructure State and only if the Enemy is still near but not actually in its Territory and there are no Un-explored Systems nearby.”


If your AI is already in the Infrastructure State as it is also paired with the Defend (Short Term). Now when it comes out of the Defend (Short Term) State it is already in the Infrastructure State

Hence as it is already producing in that Category it may not reset to Entry 1 of your: AI State := Defend (Short Term), Infrastructure; with in your Vehicle Construction file Category.



[ October 08, 2003, 19:35: 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
  #20  
Old October 8th, 2003, 08:24 PM

Niltrias Niltrias is offline
Private
 
Join Date: Oct 2003
Location: Japan
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Niltrias is on a distinguished road
Default Re: Question re AI Modding

Is there some place where the various triggers that change the AI state are described? I have no idea how to determine what state an AI is in, so I can't figure out how you know what the triggers are for changing them. If someone could give me a pointer on that, it would be very appreciated.
__________________
Bwah ha ha!
Reply With Quote
Reply

Bookmarks


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 04:18 AM.


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