Current trunk AI changes
Current trunk AI changes
There has been some interest in my recent changes to the AI loading code, so perhaps I should explain what I am working on. The idea is to build an interface for the user to choose between different AIs in the pre-game dialog. Each AI needs only one .slo, one .vlo and one .ini file, and can optionally have an additional slo/vlo set for common event handling, such as cheating. The .ini file merely describes the name of the AI, and any files it needs to have loaded.
I have added a new script function getPlayer() which replaces the current method of defining a player number by specifying it in the VLO file. You call getPlayer() once in your CALL_GAMEINIT event (and only there) to pick up your player number, and there is no longer any need for maintaining eight copies of the same AI script.
This work is not done yet, and I will describe in more detail how to adapt AIs to this new system when it is completed.
There is also another new scripting function added lately - scavengersActive(), which returns a boolean telling you whether there are active scavengers on this map. I used this to reimplement the scavenger AI loading as well. Scavengers in trunk are now active again - very active. (I will probably have to tone them down a bit, or Zarel will go all out of balance on me Please let me know how they seem to you.)
I also fixed the skDoResearch() function so that allies will not be researching the same techs, and made sure that the CALL_RESEARCHCOMPLETED trigger gets sent correctly when allies send you research and the 'work harder' cheat is used.
Note that all of these change are trunk only at the moment.
I have added a new script function getPlayer() which replaces the current method of defining a player number by specifying it in the VLO file. You call getPlayer() once in your CALL_GAMEINIT event (and only there) to pick up your player number, and there is no longer any need for maintaining eight copies of the same AI script.
This work is not done yet, and I will describe in more detail how to adapt AIs to this new system when it is completed.
There is also another new scripting function added lately - scavengersActive(), which returns a boolean telling you whether there are active scavengers on this map. I used this to reimplement the scavenger AI loading as well. Scavengers in trunk are now active again - very active. (I will probably have to tone them down a bit, or Zarel will go all out of balance on me Please let me know how they seem to you.)
I also fixed the skDoResearch() function so that allies will not be researching the same techs, and made sure that the CALL_RESEARCHCOMPLETED trigger gets sent correctly when allies send you research and the 'work harder' cheat is used.
Note that all of these change are trunk only at the moment.
Re: Current trunk AI changes
This appears to be worth backporting.Per wrote:I also fixed the skDoResearch() function so that allies will not be researching the same techs, and made sure that the CALL_RESEARCHCOMPLETED trigger gets sent correctly when allies send you research and the 'work harder' cheat is used.
Re: Current trunk AI changes
This is a great improvement.Per wrote:You call getPlayer() once in your CALL_GAMEINIT event (and only there) to pick up your player number, and there is no longer any need for maintaining eight copies of the same AI script.
Do you mean there is an AI script which manages scavenger droids only? where can I find it?Per wrote:I used this to reimplement the scavenger AI loading as well.
Which chet is this one? 'work harder'? can you drop a link to a page which explains this cheat?Per wrote: and the 'work harder' cheat is used.
Re: Current trunk AI changes
the work harder cheat completes all of your current research that's being researched.DylanDog wrote:Which chet is this one? 'work harder'? can you drop a link to a page which explains this cheat?Per wrote: and the 'work harder' cheat is used.
And I'm not sure which files manage the scavenger ai, but I'm pretty sure data\base\multiplay\script\scavfact.slo and scavfact.vlo are part of it.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
Re: Current trunk AI changes
I looked at those scripts, and if I remember good, they aren't AI scripts, but something for Scavanger factory.Mysteryem wrote:And I'm not sure which files manage the scavenger ai, but I'm pretty sure data\base\multiplay\script\scavfact.slo and scavfact.vlo are part of it.
Re: Current trunk AI changes
multiplay/script/scavfact.sloDylanDog wrote:Do you mean there is an AI script which manages scavenger droids only? where can I find it?
See CheatsDylanDog wrote:Which chet is this one? 'work harder'? can you drop a link to a page which explains this cheat?
Re: Current trunk AI changes
Per wrote:or Zarel will go all out of balance on me
My game handle is Cosmic Raven or Cosmic Raven 68
Re: Current trunk AI changes
Per wrote: multiplay/script/scavfact.slo
This script does the following:13KukYNexus666 wrote:I looked at those scripts, and if I remember good, they aren't AI scripts, but something for Scavanger factory.
- - Build scavengers (trike,buggy,jeep,bloke) and assign them to a group (defendGroup,wanderGroup,attackGroup)
- - When wanderGroup memebrs are >= 4 move them to the centre of the MAP and un-assign all droids from wanderGroup (to allow the building of anew wanderGroup)
- - If a scavenger structure is attacked move the attackGroup to that stucture location
What I do not understand, is this script called by WZ if scavengers are in a map or you have to do it manually?
Thanks. Sometimes it is hard to move through the documentation.Per wrote:See Cheats
Re: Current trunk AI changes
Note that I can only speak for how it works in trunk.
The scavenger script is run whenever a 2 or 4 player map is loaded. It is not run for 8 player maps. This is controlled from the wrf files. When loaded, it calls scavengersActive() to check if it should be running, and if not, deactivates all its own events (sets their triggers to inactive).
What improvements would you like to see for the scavengers? I removed their ability to randomly attack players, because I thought that was not fair. Especially since I made the scavengers much more deadly by eliminating delays.
The scavenger script is run whenever a 2 or 4 player map is loaded. It is not run for 8 player maps. This is controlled from the wrf files. When loaded, it calls scavengersActive() to check if it should be running, and if not, deactivates all its own events (sets their triggers to inactive).
What improvements would you like to see for the scavengers? I removed their ability to randomly attack players, because I thought that was not fair. Especially since I made the scavengers much more deadly by eliminating delays.
Re: Current trunk AI changes
I do not know precisely because I understand we should keep the scavenger not too "intelligent". Maybe instead of sending the wanderGroup to the middle of the map keep them scouting (not moving) every now and then around the scavenger base attacking everything they meet. I would then join the two groups attackGroup & defendGroup together to defend the base when under attack...this is just an idea.Per wrote: What improvements would you like to see for the scavengers? I removed their ability to randomly attack players, because I thought that was not fair. Especially since I made the scavengers much more deadly by eliminating delays.