Scripting and AI GUI changes in master
Posted: 09 Jan 2011, 17:35
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.