.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Newbie AI Writing Thread (http://forum.shrapnelgames.com/showthread.php?t=21252)

brianeyci October 12th, 2004 01:00 PM

Newbie AI Writing Thread
 
Please keep this thread clean so I/others can use it later for reference.

1. Where are some good resources to find about writing AI in SE:IV? I looked in the Modding 101 Tutorial and couldn't find it. As well I searched on spaceempires.net and couldn't find it. Searched for AI on the shrapnel forums search, and too many hits came up.

Topic One : AI_Fleets.txt
=========================

Fleets Num Divisions - I intepret this as the number of types of fleets the AI has. I do not see a need to make more than two types of fleets, one single ship fleet, and one max unit fleet.

Fleets Div 1 Max Amount of Ships - For the max unit fleet, max. For the single ship fleet, one.

Fleets Div 1 Max Amount of Planets - Planets can go into fleets?

Fleets Div 1 Num Fleets - For the single unit fleet, max units. For the max unit fleet, perhaps two or three. I do not want the computer making a whole ton of warfleets, perhaps two or three fleets at most. Concentrated firepower. For the single ship fleet - colonizers.

Fleets Percentage of Ships For Fleets - 100%, to take advantage of fleet training.

Fleets Dont Use For Num Turns - 0, so that the AI puts ships into fleets right away.

Fleets Default Formation - Wall

Fleets Default Strategy - Optimal Firing Range

Percentage of Fleets to use for defense - For now, 50%. What does this setting actually accomplish? I was thinking of setting it to 0%, so the AI is incredibly agressive. What would happen if I set this to 0%? Would the AI no longer be able to take advantage of fleet training facilities? How does this interact with the percentage of ships in fleets setting, will colonizers be hanging around "defending" planets if I set the percentage of ships in fleets to 100%?

Thanks,
Brian

Fyron October 12th, 2004 01:48 PM

Re: Newbie AI Writing Thread
 
These are the only AI modding resources I am aware of (all by Atrocities):

http://www.astmod.com/BasicModdingTutorial_1.txt
http://www.astmod.com/BasicModdingTutorial2.txt
http://www.astmod.com/DesignCreation_CheatSheet.txt

Aiken October 12th, 2004 02:02 PM

Re: Newbie AI Writing Thread
 
Fleets Num Divisions := X
Defines the rules for amount of fleets to change through the game.

Example:
<font class="small">Code:</font><hr /><pre> Fleets Div 1 Max Amount of Ships := 20
Fleets Div 1 Max Amount of Planets := 0
Fleets Div 1 Num Fleets := 2
</pre><hr />
Starting item. If total amount of ships in empire &lt;= 20 then AI will form 2 fleets per empire. If amount of ships &gt; 20 then go to Fleets Div 2 item.
<font class="small">Code:</font><hr /><pre> Fleets Div 2 Max Amount of Ships := 60
Fleets Div 2 Max Amount of Planets := 0
Fleets Div 2 Num Fleets := 3
</pre><hr />
So, if 20&lt;amount of ship&lt;=60 AI will form 3 fleets per empire. Etc.

Last item usually looks like this:
<font class="small">Code:</font><hr /><pre> Fleets Div X Max Amount of Ships := 100000
Fleets Div X Max Amount of Planets := 0
Fleets Div X Num Fleets := 10
</pre><hr />
Maximum amount of fleets for your AI will be 10, because total amount of ships will be always below 100000.

You can make make fleet amount dependant of total number of planets in your empire with Fleets Div N Max Amount of Planets := xyz, but then you can't refer to amount of ships item (must use Fleets Div X Max Amount of Ships := 0)

Quote:

Fleets Percentage of Ships For Fleets - 100%, to take advantage of fleet training.

Fleets Dont Use For Num Turns - 0, so that the AI puts ships into fleets right away.

AI doesn't care about training.

Oh, and colonizers have nothing to do with fleets, they don't join them.

Ragnarok-X October 12th, 2004 02:05 PM

Re: Newbie AI Writing Thread
 
Well i think this quite important:

When writing "designcreation" files, you must follow a certain order. Put the advanced ships at the top, and low-tech ships at the bottom, the AI will always build the ships at the top, so given you put advanced ships at the bottom of the file, the AI may design them (for example battleships), but it actually will never build them, because it thinks that the "escort" the top is more advanced.

My 2 cent, which took me a LONG time to figure out.


All times are GMT -4. The time now is 03:07 PM.

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