Testing Changes Against Multiple Shards ( Native AI )
Sometimes you want to make changes to Shard then compare them against the original. How else will you know if you’ve improved things? What if you want to test the development version of Shards lua against the current release?
To do this, you can create a copy of Shard, and give it a new version. In spring, AIs are stored like this:
AI/Skirmish/AI-name/version/
That folder then contains the AI, and is where AIInfo.lua and AIOptions etc are located. Standard Shard normally takes this structure:
AI/Skirmish/shard/dev/ AI/Skirmish/shard/dev/AIInfo.lua AI/Skirmish/shard/dev/AIOptions.lua AI/Skirmish/shard/dev/libSkirmishAI.so AI/Skirmish/shard/dev/ai/
Windows machines may have a libSkirmishAI.dll. The AI folder should be in your spring games folder in user space, but under OS X it may be inside the app bundle. OS X may also use a libSkirmishAI.dylib
You can copy the dev folder and create a new folder. Here I’m creating a git folder to test changes from GitHub:
AI/Skirmish/shard/git/ AI/Skirmish/shard/git/AIInfo.lua AI/Skirmish/shard/git/AIOptions.lua AI/Skirmish/shard/git/libSkirmishAI.so AI/Skirmish/shard/git/ai/
Then modify AIinfo.lua to specify git as its version rather than dev, and now both Shard dev and Shard git appear in the lobbies. This allows me to keep standard Shard, and modify a copy to test changes.
The ai subfolder should contain the lua components of the Shard AI