Scripting and AI GUI changes in master
Scripting and AI GUI changes in master
I took a break from the graphics coding to do something I promised a long time ago -- a way to choose which AI you wanted to play with from the GUI. Screenshots of the new system:
As you can see, difficulty is now a series of four steps (Easy, Medium, Hard, and Insane). The real reason I changed it now is that I needed the pixels. However, I also think it is a good idea going forward, since such steps are easier to communicate meaningfully, and we can add non-linear behaviours to them. I will make a separate post about my ideas for them later. For now, they just map to slider points (1, 10, 15, 20 on the 1-20 scale, respectively).
Each AI now requires a .ai suffix INI file that describes it. The fields in the .ai file are for now:
* name -- the visible name of the AI
* vlo -- the VLO file for the AI
* slo -- the SLO file for the AI
* tip -- the tool tip shown for the AI, can be used to add extra description to it
You can still add AIs as mods as before, but I moved Semperfi and Dydo into main so that they don't require mod loading to use.
Scripts changes:
* The getPlayer() function now takes a string parameter, which has to be the name of the AI exactly as typed into the name field of the .ai INI file.
* MAX_PLAYERS is now a built-in constant, do not define it in your own script
Challenge changes:
* The difficulty field now has to be a string, one of "Easy", "Medium", "Hard", or "Insane". Old challenges that use numbers should work, but will be reset to default difficulty.
* There is not yet any way to specify which AI to use. TBD.
As you can see, difficulty is now a series of four steps (Easy, Medium, Hard, and Insane). The real reason I changed it now is that I needed the pixels. However, I also think it is a good idea going forward, since such steps are easier to communicate meaningfully, and we can add non-linear behaviours to them. I will make a separate post about my ideas for them later. For now, they just map to slider points (1, 10, 15, 20 on the 1-20 scale, respectively).
Each AI now requires a .ai suffix INI file that describes it. The fields in the .ai file are for now:
* name -- the visible name of the AI
* vlo -- the VLO file for the AI
* slo -- the SLO file for the AI
* tip -- the tool tip shown for the AI, can be used to add extra description to it
You can still add AIs as mods as before, but I moved Semperfi and Dydo into main so that they don't require mod loading to use.
Scripts changes:
* The getPlayer() function now takes a string parameter, which has to be the name of the AI exactly as typed into the name field of the .ai INI file.
* MAX_PLAYERS is now a built-in constant, do not define it in your own script
Challenge changes:
* The difficulty field now has to be a string, one of "Easy", "Medium", "Hard", or "Insane". Old challenges that use numbers should work, but will be reset to default difficulty.
* There is not yet any way to specify which AI to use. TBD.
Re: Scripting and AI GUI changes in master
Great job,Per!!
I hope to see more new things in WZ,beside the usual bug fixes.
Anyway,a minor suggestion:Why don't you put the 4 files into a archive (as the base.wz,mp.wz) instead of making an INI file with the list?
I hope to see more new things in WZ,beside the usual bug fixes.
Anyway,a minor suggestion:Why don't you put the 4 files into a archive (as the base.wz,mp.wz) instead of making an INI file with the list?
Re: Scripting and AI GUI changes in master
Thanks. The reason why they are not contained in an archive is somewhat technical -- it is just much easier this way (they need unique names to avoid overrides, and we need a way to find them; also you may want to reuse slo files between AIs).
I added one more change for experimentation with the new difficulty levels. The insane AI will now start with full defenses even in no base and small base setups. I hope this will be an interesting twist, so give it a whirl and let me know if it works out.
I added one more change for experimentation with the new difficulty levels. The insane AI will now start with full defenses even in no base and small base setups. I hope this will be an interesting twist, so give it a whirl and let me know if it works out.
Re: Scripting and AI GUI changes in master
I also added one new scripting function - getDifficulty(int player) - to find the difficulty level associated with a player, and four corresponding built-in constants: EASY, MEDIUM, HARD and INSANE. The semperfi AI has been modified to be less nasty at lower levels. Note that the semperfi AI does not cheat (the above base change for insane excepted) at any difficulty level at the moment.
Re: Scripting and AI GUI changes in master
thanks - nice work
ArtRev Website
System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
- Rman Virgil
- Professional
- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: Scripting and AI GUI changes in master
.
WZS aka Warzone Starter (2000-2005) for v.1.10.... it will, I am certain, be welcome by many to have one of WZS's great (& most popular) features built into game itself as this utility was obsolesced some 5 years ago now.
- RV
.
WZS aka Warzone Starter (2000-2005) for v.1.10.... it will, I am certain, be welcome by many to have one of WZS's great (& most popular) features built into game itself as this utility was obsolesced some 5 years ago now.
- RV
.
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Scripting and AI GUI changes in master
speaking of warzone starter, does anyone know where I can get a copy? I want to see if there are any features it has that I can implement in the mod manager but Google cant find it for me.
Are we going to get the AI selector in 3.x? soon? please please please
Are we going to get the AI selector in 3.x? soon? please please please
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
- Rman Virgil
- Professional
- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: Scripting and AI GUI changes in master
http://www.troman.de/wz/downlods/milo christiansen wrote:speaking of warzone starter, does anyone know where I can get a copy? I want to see if there are any features it has that I can implement in the mod manager but Google cant find it for me.
Are we going to get the AI selector in 3.x? soon? please please please
- RV
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
- milo christiansen
- Regular
- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Scripting and AI GUI changes in master
404 file not found
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
- Rman Virgil
- Professional
- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: Scripting and AI GUI changes in master
That's too bad. The updated .exe is still available (as are most of the other files on the site) but you need the FULL install file. Didn't migrate this one to my current archive (I just checked) which means it's in deep storage which I'm not going to any time soon. Maybe Lav has it in his current, accessible, archive. The 2 files all told are little over 600 kbs as I recall. Maybe shoot Lav or Troman a PM & ask if they could send 'em as an email attachment.milo christiansen wrote:404 file not found
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.