.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Note from MM - AI MODDERS MUST READ THIS (http://forum.shrapnelgames.com/showthread.php?t=1389)

Barnacle Bill January 14th, 2001 01:52 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
I second the request to make the custom Groups and requirements fields in vechiclesize.txt work as advertised. There are some mods I've been thinking of trying which will absolutely require them.

Here is an idea fix the problem of the AI building more carriers than fighters. In my own use of carriers, I have found it difficult to build the fighters. If I put the biggest planet in the system building a heavy carrier designed to maximize fighter bay III's, and the rest of the colonies in the system building fighters, I have a carrier long before I have its fighter load-out. Then you have to collect them all up, which is tedius (fighters can't even be set up to automatically move to a waypoint after being built, like ships can. Sub-suggestion, fix that). Expanding the fighter building to nearby systems cuts the time to get a fighter load-out built, but increases the tedium of gathering them up. The only thing that works is to have a wad of space yard bases so that while one builds the carrier several more at the same location build its fighters. It is clear to see why this is overwhelming to the AI - it causes me to use carriers a lot less myself.

So, my recommendation is to make an initial fighter load-out part of the design for carriers, so the carrier comes from the shipyard fully loaded. Replacement fighters, or fighters to base on planets, would still be built as today. If the fighter specified for a particular carrier's load-out becomes obsolete, that should prompt the AI to upgrade the carrier design to use a new fighter design. You should then no longer see empty or nearly empty AI carriers going into battle, unless they have already lost their fighters in a previous battle.

That Last sentence brings up another point. To effectively use carriers as a main fleet weapon you need a logistical system to build fighters, load them on transports and carry them to the fleet (or a colony near the front at least). Otherwise, your carriers are disarmed after a couple of battles. It would help in doing that if a fleet could be selected as the destination for orders, so that the ship or fleet with the orders would chase the target fleet until it caught up. Either way, the AI needs to be smart enough to deal with this. If a carrier goes below a certain percentage of its fighter load-out, it needs to withdraw to someplace where a bunch of fighters are stored to replenish. I see this working somelike like "resupply at nearest". If the feature of selecting ships/fleets as destinations is added, the depleted carrier and a transport full of fighters could be ordered to meet & make the transfer. Otherwise, transports with repeat orders shuttle fighters from planets that build them to depot planets near the front, and the depleted carriers would fall back to the nearest such depot planet to replenish.

Mephisto January 14th, 2001 03:21 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
I think there is a simple solution to the carrier problem: The AI should not build that much carriers and focus more on building fighters. That is not that hard to do, 3 to 4 lines in the right script file will do the job. BTW: Which race does have this carrier problem for you?

Jubala January 14th, 2001 04:57 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
As for making the AI build different Attack Ships, I think it would mean a major reworking of the code as it's hardcoded what the AI does with Attack Ships. So keep the Attack Ship designation but add sub-levels. Just looked at the files and not much needs to be done. In xxx_AI_Design_Creation.txt the first two lines of an entry looks like this:

Name := Attack Ship
Design Type := Attack Ship

A construction call in xxx_AI_Construction_Vehicles.txt looks like this:

Entry 3 Type := Attack Ship
Entry 3 Planet Per Item := 50
Entry 3 Must Have At Least := 2

Add a line Name and we can do this:

Name := Missile Ship
Design Type := Attack Ship

Entry 3 Name := Missile Ship
Entry 3 Type := Attack Ship
Entry 3 Planet Per Item := 50
Entry 3 Must Have At Least := 2

With this little change we can tell the AI exactly what kind of ships, fighters, bases, whatever to build. I don't think it will that hard to code either.

[Edit]
With my proposed change above we can also get the AI to build smaller ships, not just biggest possible all the time. But we wouldn't have any control over how it uses it's ships. Don't know how that can be done since I don't know how the game handle that. Maybe an xxx_AI_Fleet.txt where the composition of different kinds of fleets are spelled out. What types of fleets should we have? Invasion, Defense, Quick Response, Raid, Transport, Repair, Resupply, Escort, Colonize. Those are just off the top of my head right now but there are probably more we could use. Variants of some with escorts to use in unsafe areas (AI needs to learn safe/unsafe).
[/Edit]

As for combat initiative, I think that will be hard. The simple and quick solution is to make the defender always go first.

I agree that the AI should upgrade designs with a number rather then a new name. If it has a ship design called Mauler the upgrade should be called Mauler II or Mauler Mk2 or something. That number could (should?) be a setting that can be made in xxx_AI_General.txt or xxx_AI_Settings.txt so not all AI's have the same numbering convention. While you're at it add the same ability for player upgrades and put the choice of numbering convention at empire creation. Or just (for simplicity) decide on a way and use it everywhere.

Bills idea to get fighters into the AI's carriers is good, but you missed one thing Bill. If there are more then one carrier in a fleet and all have taken losses, transfer the fighters around so as many carriers as possible are full and just send the empty ones back for refill.

Mephisto, I have seen this with the Eee alot.



[This message has been edited by Jubala (edited 14 January 2001).]

Mephisto January 14th, 2001 06:14 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
The Eee, ok. Just wanted to make sure it was not the EA. http://www.shrapnelgames.com/ubb/images/icons/icon7.gif
Small wonder for the Eee. The maximum they build for fighters is 5 per planet and 1 carrier for 3 planets i.e. one carrier gets 15 fighters...

HreDaak January 14th, 2001 07:34 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 

XXX_AI_Constuction_Facilities.txt

Facility X Build only if Atmosphere NonBreathAble := True/False
- If the flag is set to True, then AI builds this facility only if the atmosphere is not breathable.

Facility X Scrap/Do not build this if Next Available := True/False
1. If set to True, AI will not build this building if the next building is available.
2. If set to True, AI will scrap this building when the next building becomes available.

- By saying 'next building' i mean ONLY the next building after the building having the Facility X
Scrap/Do not build this if Next Available set to True.
- In addition to these the message Atmosphere changed should cause the scrapping of all
facilities with the ability to change atmosphere on the planet in question
and the re-evaluation of that planets build list...

Example: (Mining Colony)

Facility 1 Ability := Spaceport
Facility 1 Amount := 1
Facility 1 Build only if Atmosphere NonBreathAble := True
Facility 1 Scrap/Do not build this if Next Available := True
Facility 2 Ability := Planet - Change Atmosphere
Facility 2 Amount := 1
Facility 2 Build only if Atmosphere NonBreathAble := True
Facility 2 Scrap/Do not build this if Next Available := False
Facility 3 Ability := Spaceport
Facility 3 Amount := 1
Facility 3 Build only if Atmosphere NonBreathAble := False
Facility 3 Scrap/Do not build this if Next Available := False

XXX_AI_PlanetTypes.txt

Minimum Planet Size for Type := Add options here for Ring/Sphere worlds
Maximum Planet Size for Type := Tiny/Small/Medium/Large/Huge(/Ring/Sphere)
Atmosphere breathable := True/False
- If this is set to true, then choose this planet type only if the atmosphere is breathable.

Change the way the value things function:
Min Mineral Value :=
Max Mineral Value :=
Min Organics Value :=
Max Organics Value :=
Min Radioactives Value :=
Max Radioactives Value :=

-If the planets resource percentages do not fullfill ALL these requirements then reject the planet type.

In Components.txt file separate the roman numeral into three values:

- First one is the value that will be displayed on the component icon. (I-XX or something)
- Second one is the value that calls for the ship design subroutine to be started. (True/False)
- Third one is the value that tells AI how good this component is in its family. (The bigger
the number the better the component, should help the AI in choosing which component to use in
its new designs)


XXX_AI_fleets.txt

Fleets Div X Amount of Names (the number of different Names in Div X) := (0 here means that the value is not used)
Fleets Div X Max Percentage Y 'Name' (Name is from the AI_DesignCreation.txt) := (0 here means that the value is not used)
- Y is the number of Name in Div X.
- AI should be able to add any Design Type to its fleets as long as the ships name is called
in the Fleets Div X Max Percentage Y 'Name'.
Fleets Div X Min Amount of Ships in Fleets := (this would be the minimum required amount
of ships in fleet so that the fleet would be ACTIVE.)

Some thoughts about fleet being ACTIVE (dont know if something like this is already implemented)

- ACTIVE means that it could be sent on ATTACK missions or whatever missions there are.
- If the fleet is INACTIVE it should not take any actions outside its own systems.
Infact it should immediately try to return back to AI's own system for regrouping.
Or it could try to merge with other AI fleets...
- INACTIVE fleet could operate normally in AI's own systems.
- INACTIVE fleets should never wonder outside AI's own systems voluntarily.

AI's own system? (some thoughts)

1 If AI has planets only in 1 system then this is automatically AI's own system?
2 AI has unblockaded spaceyard and resupply depot in this system?
3 there are no enemy ships in this system?
4 there is less enemyship tonnage in this system?
5 there are fewer enemy planets in this system?



Example:

Fleets Num Divisions := 2
Fleets Div 1 Max Amount of Ships := 20
Fleets Div 1 Max Amount of Planets := 0
Fleets Div 1 Num Fleets := 1
Fleets Div 1 Amount of Names := 3
Fleets Div 1 Max Percentage 1 Destroyer := 50
Fleets Div 1 Max Percentage 2 Carrier := 25
Fleets Div 1 Max Percentage 3 Mine Sweeper := 25
Fleets Div 1 Min Amount of Ships in Fleets := 5
Fleets Div 2 Max Amount of Ships := 50
Fleets Div 2 Max Amount of Planets := 0
Fleets Div 2 Num Fleets := 2
Fleets Div 2 Amount of Names := 2
Fleets Div 2 Max Percentage 1 Dreadnought := 75
Fleets Div 2 Max Percentage 2 Mine Sweeper := 25
Fleets Div 2 Min Amount of Ships in Fleets := 10

- AI should not obsolete ships based on the Design Type but the Name.
This would ofcourse require the use of Name in the calls for building
in XXX_AI_Construction_Vehicles.txt


XXX_AI_Construction_Vehicles.txt

Entry X Name (Name is from the AI_DesignCreation.txt)

This is the same request as in Jubala's post...


More comments about these thoughts are welcome...

[This message has been edited by HreDaak (edited 14 January 2001).]

HreDaak January 14th, 2001 08:08 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
Should be 'Okay' again...


[This message has been edited by HreDaak (edited 14 January 2001).]

Trachmyr January 15th, 2001 08:38 AM

Re: Note from MM - AI MODDERS MUST READ THIS
 
One other thing, allow us to determine if stellar manipulation requires the ship to have movement left (at least for open/close worm hole)... that way we can make stargates, and doomsday bases(loaded with a star deystroyer... if I can't have this system, nobody can)

KiloOhm January 15th, 2001 03:15 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
This isn't really a bug, but could we get a way to DELETE designs instead of just obsoleteing them? I hate it when I screw up a design (like forgetting engines! http://www.shrapnelgames.com/ubb/ima...ons/icon12.gif ) and have to make up a new name because I can't delete the one I just screwed up.


------------------
Regards,
KiloOhm

Mephisto January 15th, 2001 04:49 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
Just rename the screwed up design and everything is fine. http://www.shrapnelgames.com/ubb/images/icons/icon7.gif

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by KiloOhm:
This isn't really a bug, but could we get a way to DELETE designs instead of just obsoleteing them? I hate it when I screw up a design (like forgetting engines! http://www.shrapnelgames.com/ubb/ima...ons/icon12.gif ) and have to make up a new name because I can't delete the one I just screwed up.<HR></BLOCKQUOTE>


SunDevil January 15th, 2001 05:39 PM

Re: Note from MM - AI MODDERS MUST READ THIS
 
Most suggestions have been covered, great job everyone, one thing that could be helpful is better documentation within the text files for better understanding of how things work, instead of using trial and error all the time.


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

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