Jump to content

Re: AI modding?


keraunos
 Share

Recommended Posts

Phez, are you aware of the fact that AI gets some spawned units like ISD ? it doesnt means it did build them, unless it has lvl 4+ spacestation above Kuat, Fondor, Sullust, Mon Calamari...if you did seen ISDs and the AI doesnt have the spacestations...im afraid that those ISDs are script spawned...

 

Yes - ...  - My tests are all in skirmish -  ...

Stellar_Magic mentioned the AI has relaxed build requirements in Galactic Conquest, but I haven't personally tested that, so I'm asking if anyone has.

 

And no matter how much points you give the units, if the AI cannot produce them....

 

? Lets just say I've never seen the AI attack with a ShadowClaw or a Venator, and the Venator has a pretty good rating

 

Phez

Link to comment
Share on other sites

Thats because Skirmish AI doesn't acknowledge the new units, only the GC AI does.

Forum and RPG Membership:

http://img.photobucket.com/albums/v436/StellarMagic01/RaporaWarsTC.jpghttp://img.photobucket.com/albums/v436/StellarMagic01/RaporaWarsRPG2.jpg

 

Signature:

Sufficiently advanced technology would be indistinguishable from Magic. -Arthur C. Clarke

Link to comment
Share on other sites

I was speaking about GC of course...not plain skirmish, i think in skirmish the AI has no problems...just in GC it baheve badly...

 

Just a question to be sure, did you enable the stupid (forgive me, i hate that ship and those whines it did create in past) venator in the starbases.xml file in spacestations for skirmish ? im sure you did, but one never knows :P

 

       

Link to comment
Share on other sites

I have just been fooling around once more and created a new version of the miniAimod (currently the name difficultymod would apply more):

 

http://rapidshare.de/files/17451280/AIMod-0.1c.rar.html

 

On max difficulty:

- AI_Combat_Values adjusted

Higher units now have a better combatvalue to price ratio. In a testgame I had the impression that the AI now prefers higher tech ships over lower tech ones.

- Increased cash multiplier for AI to 5.0

- Increased buildtimepenalty for spaceships to 1.5

- AI Aggression got a big boost (GC)

 

My experiences (in 2 games):

On large maps the AI appears to handle a little better now since the extra cash boosts it's abilities to create sufficient defense forces.

It also appears to give the AI the impression that it is strong enough to attack once in a while.

Link to comment
Share on other sites

Ok guys,

 

first; the AI is split across both the XML and lua files, and the XML files within '\Data\Xml\AI\' can be used (however I don't know if they take precindence over the .meg file but I would assume so (I'm not using a Config.meg file anymore)).

 

second; the structure of the AI system

In elements such as the campaign files you set the AI player modal using the tags ie. Empire, BasicEmpire

The hintset also used by a campaign should be located in '\GalacticMarkup\' and called using the .

(I know I've covering the stuff already known)

 

Ok, the sends you to the appropriate file within '\Data\XML\AI\Player\'; in that file your find the lines like :

SystemFunctions

BasicOffensiveGalacticSet

BasicDefensiveGalacticSet

BasicInfrastructureGalacticSet

BasicInformationGalacticSet

BasicOffensiveSpaceSet

BasicLandGoalSet

SandboxEventsSet

 

The function sets are the files within '\Data\XML\AI\GoalFunctions\' - those are the key systems for get the AI to do things. A entry in a goal function set is an individual is quite simple, I'm unsure how or what calls the individual entries at run-time (I'm assuming its the AI handler script for the AI control player).

Example is;

Destroy_Unit

Unit_Needs_To_Be_Destroyed

 

relates to a entry within one of the '\Data\XML\AI\Goals\' files (not the file but indivual entries within a particular file) which seem to apply restriction rules upon the use of the function.

is a direct link to either a script loaded from within a .lua file or a function declared within one of the perception equation files from '\Data\XML\AI\PerceptualEquations\' . Looking at the entries within the files in the '\PerceptualEquations\' folder its clear that they could easily be lua scripts themselves.

 

So notes; the AI doesn't at apear to be hard-coded as the AI can be directly related to the files within '\Data\XML\AI\GoalFunctions\' and the be shown that changes here actually affect the actions of the AI.

Inside .lua scripts called will similar names to the ones refered by the goal function entries can be found to have the actual call named referenced inside asif it was a registration header.

It isn't clear how the engine knows which xml files to load however it does appear to be clear that if there are parsing errors within the files (like alot of the 1.2 version code has) it won't cause any effect at loading and doesn't seem to cause any direct problems whilst playing except for the obvious unknown resulting AI behaviour from the bad code not being processed.

 

Another note, the building of structures is directly referenced within the perception equations by there actual name however so far any reference I've seen to units has been by their appropriate catergory except for strategic notes used for determining if the enemy has a specific unit like the Death_Star.

 

Hope this helps alittle.

Link to comment
Share on other sites

  • 5 months later...

> relates to a entry within one of the '\Data\XML\AI\Goals\' files (not the file but individual entries within a particular file) which seem >to apply restriction rules upon the use of the function.

 

I can verify that.

 

> is a direct link to either a script loaded from within a .lua file or a function declared within one of the perception equation >files >from '\Data\XML\AI\PerceptualEquations\' . Looking at the entries within the files in the '\PerceptualEquations\' folder its clear >that they >could easily be lua scripts themselves.

 

'\Data\XML\AI\PerceptualEquations\' are ignored. For proof test the following:

 

Find File:

BasicGalacticEquations.xml

Look at this function:

  1.0

 

Find File:

UpgradeStarbasePlan.lua

 

Enter this line right after 'function BaseForce_Thread()'

if EvaluatePerception("One", PlayerObject) == 0.0 then ScriptExit()

 

--> If you know start a campaign no changes happen as it is supposed to be.

 

Now change function One:

 

  0.0

 

--> If you know start a campaign no changes happen even so the AI shouldn't upgrade their stations any more !

 

So the perception files are essentially useless. However there are functions corresponding to their names. So there is a function

One but it does not originate from the .xml files. They can only be used to see how the functions may be working.

If have used that in the lua scripts by denying the AI to build refineries before having a groundbase:

 

if EvaluatePerception("Need_initial_groundbase", PlayerObject) > 0.0 then ScriptExit()

 

Yet i must admit that even so i crossed the logic of the different functions (by changing multiple at the same time) to achieve a

maximum of control over the AI the results are very frustrating because you can only restrict the building but not spark the event that starts the building process which seems to be done by event handler using the "real" perception functions.

 

I think the xml perception system was just too intensive in terms of cpu-power.

Link to comment
Share on other sites

A good Ai should not have advantage in matter of materials and/or moneys but should dealt with your strategy. It's easy to help the Ai "cheating" as this is what i have mentioned.

Instead a good Ai know what to exactly do and answer to you. I don't want to say that every possible scenario can be contemplate but at least the most probable. Hey in the end the programmers are humans so they know waht they would have done, or not? ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

Copyright (c) 1999-2022 by SWRebellion Community - All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Star Wars(TM) is a registered trademark of LucasFilm, Ltd. We are not affiliated with LucasFilm or Walt Disney. This is a fan site and online gaming community (non-profit). Powered by Invision Community

×
×
  • Create New...