gametechmods

Robot Arena => General Support => Topic started by: trumpetguy on July 15, 2009, 12:41:05 AM

Title: AI Pack Help
Post by: trumpetguy on July 15, 2009, 12:41:05 AM
I want to merge several AI packs together (Pys, Starcore, RA2GE, RFS, and stock), but my game usually crash when I hit start match.
Title: AI Pack Help
Post by: philetbabe on July 15, 2009, 03:14:13 AM
first of all, do not merge DSL and STOCK aI.
Second point : do not use AI that import 'custom components'.

common approach :
1-create a 'bindings.py' that merge the Bindings.py of all these packs (only the list.append...).
2-copy your 'teamsXX' folder under AI in a way that their number (XX) is always incremented by one : team0, team1, ... teamN, teamN+1, etc
3-create a file AI/Teams.txt that merge the different teams.txt. In this file, rename the 'index' to be sequential  :index0, index1, ... index N, index N+1, ...
4-correct any bug (see AI chart -in the AI thread- for most common error)

Uncommon approach :
1- in a temporary folder (say D:/temp), unzipped your first AI (it creates D:/temp/AI).
2- in the same folder unzip teamMixer.rar (it creates D:/temp/_AI_tools)
3- run _Ai_tools/initTeamMixer.exe -> it creates a file name 'descTeam.txt' in each of your AI/TeamXX folder (Verify that each of your D:/temp/AI/TeamXX has this not empty  file descTeam.txt with 4 lines)
4-copy D:/temp/AI under your RA2 folder (as usual)
5-delete D:/temp/AI
6-unzip another AI under D:/Temp (create another D:/temp/AI)
7-run _Ai_tools/initTeamMixer.exe
8-copy your D:/AI/teamXX under your RA2/AI folder renaming the teamXX index to be sequential (much like the common approach step 2)
9-int the RA2/AI folder merge the bindings.py (only the list.append. for the 'not first' files ..) (much like the common approach step 1)
10-repeat the step 5-9 for each of your AI pack
*** at the end of this step you should have under your RA2/AI folder
    -a file bindings.py that merge all the AI bindgings
    -the folders TeamXX with XX an increment starting from 0 step 1.
    -in each folder a file named DescTeam.txt (to verify) that contains 4 lines (name of the team, bitmap, etc).

11 -copy your D:/temp/_Ai_tools folder under your RA2/ folder.
12 - in your RA2/folder/_Ai_Tools/teams.ini  write the max team index you have
13- run RA2/folder/_Ai_Tools/reBind.bat -> it will create your AI/teams.txt

*** each time you want to add a new AI pack, repeat step 5-10 and step 12

*** each time you create your own team, just append it under RA2/AI, create the corresponding file descTeam.txt and go step 12.

*** if you want to change the order of your team (mix them) and have a correct teams.txt you can run RA2/folder/_Ai_Tools/TeamMixer.bat (see my Stock Showcase for sample use).


semi-Uncommon approach :
go the 'common approach'. Once it works, that your are  happy and all that stuff,
1/ make a copy of your RA2/AI folder.
2/unzip TeamMixer.rar in your RA2 Folder (it creates RA2/_AI_Tools)
3/run RA2/_AI_tools/initiTeamMixer.exe (it should create a file DescTeam.txt in each of your RA2/AI/TeamXX folder). -> verify that each of your teamXX folder get a non empty file.
4/ update your RA2/_AI_Tools/team.ini file with the number of teams you have.
** now you can use the Mixing tool (teamMixer.bat) to mix your teamXX and create the according teams.txt
Title: AI Pack Help
Post by: Pwnator on July 15, 2009, 03:29:02 AM
Ah. Got it. PYS AI uses HackerX's smart zones. You have to import them to your version so that it works.
Title: AI Pack Help
Post by: JoeBlo on July 15, 2009, 03:36:13 AM
but you will have to follow Phils guide ^^^ if you want all the teams in the one copy otherwise they will keep overwriting each other
Title: AI Pack Help
Post by: trumpetguy on July 15, 2009, 04:01:32 PM
Turns out that it only happens in the PYS bots due to the fact I didn't export the components.