Any help appreciated
Playing against AI in linux client?
Moderator: Moderators
Playing against AI in linux client?
Is it possible to play against AI in the linux client if so how? I have managed to start the script "random enemies" which seems ok. I have read that there are other player AIs like JCAI and NTAI?
Any help appreciated
Any help appreciated
You can create a file named for example host.txt with the following contents:
And start spring with "spring host.txt".
Last time I tried JCAI on xte enemy units stopped from time to time (I used cheat to generate some units and attack his base. At the second attack its commandar was many times in exctly the same position). But please try :).
Code: Select all
[GAME]
{
Mapname=SmallDivide.smf;
StartMetal=30000;
StartEnergy=30000;
MaxUnits=100;
StartPosType=0;
GameMode=0;
GameType=xta_se_v066.sdz;
LimitDGun=false;
DiminishingMMs=false;
GhostedBuildings=true;
HostIP=localhost;
HostPort=9000;
MyPlayerNum=0;
NumPlayers=4;
NumTeams=4;
NumAllyTeams=4;
[PLAYER0]
{
name=Malric;
team=0;
}
[PLAYER1]
{
name=AI1;
team=1;
}
[PLAYER2]
{
name=AI2;
team=2;
}
[PLAYER3]
{
name=AI3;
team=3;
}
[TEAM0]
{
teamleader=0;
allyteam=0;
side=ARM;
}
[TEAM1]
{
teamleader=1;
allyteam=1;
side=ARM;
aidll=aidll/globalai/libJCAI.so;
}
[TEAM2]
{
teamleader=2;
allyteam=2;
side=ARM;
aidll=aidll/globalai/libJCAI.so;
}
[TEAM3]
{
teamleader=3;
allyteam=3;
side=ARM;
aidll=aidll/globalai/libJCAI.so;
}
[ALLYTEAM0]
{
NumAllies=0;
StartRectLeft=10;
StartRectRight=30;
StartRectTop=10;
StartRectBottom=30;
}
[ALLYTEAM1]
{
NumAllies=0;
StartRectLeft=30;
StartRectRight=40;
StartRectTop=30;
StartRectBottom=40;
}
[ALLYTEAM2]
{
NumAllies=0;
StartRectLeft=30;
StartRectRight=40;
StartRectTop=30;
StartRectBottom=40;
}
[ALLYTEAM3]
{
NumAllies=0;
StartRectLeft=30;
StartRectRight=40;
StartRectTop=30;
StartRectBottom=40;
}
}
Last time I tried JCAI on xte enemy units stopped from time to time (I used cheat to generate some units and attack his base. At the second attack its commandar was many times in exctly the same position). But please try :).
JCAI is an old AI of me that controls the units in a top-down approach with limited scripts and almost no flexibility... I realised this wasn't the way to go and got interested in writing other stuff.
What you really need to do is convince submarine to release AAI source so it can be ported. AAI rules IMO.
What you really need to do is convince submarine to release AAI source so it can be ported. AAI rules IMO.
I tried the script above and i can almost get it to work, everything starts up and i press 'ctrl-enter' to start with the ais ready to go but the this error message shows up:
Error loading mod config: aidll/globalai/jcai/xta_se_v066.cfg. I tried searching this forum for a suitable cfg file but noone worked. Does anyone have a working cfg file for latest xta?
Error loading mod config: aidll/globalai/jcai/xta_se_v066.cfg. I tried searching this forum for a suitable cfg file but noone worked. Does anyone have a working cfg file for latest xta?
I managed to get the aimatch to work :D, i had to do the following:
+ The directory structure was wierd (i guess) after building the latest trunk the path to the ais was:
aidll/aidll/globalai instead of aidll/globalai so i had to remove one aidll directory level.
+ aidll/globalai/jcai/*.cfg was missing from taspring-linux-data-0.70b2.tar.bz2 so i downloaded the windows regular installer and installed it with wine so i could grab the files.
and it works :D
+ The directory structure was wierd (i guess) after building the latest trunk the path to the ais was:
aidll/aidll/globalai instead of aidll/globalai so i had to remove one aidll directory level.
+ aidll/globalai/jcai/*.cfg was missing from taspring-linux-data-0.70b2.tar.bz2 so i downloaded the windows regular installer and installed it with wine so i could grab the files.
and it works :D
Ok, i will playtest it..btw is it possible to use the mod Absolute Annihilation: Spring 1.44 with the ai script..
I tried to exchange:
GameType=xta_se_v066.sdz;
to GameType=ASpring144S.sdz;
and GameType=ASpring144.sdz;
and spring client krashed:
ERROR: button9.wav
Couldnt open wav file
rts/System/Platform/Linux/OpenALSound.cpp:289 : ALuint COpenALSound::LoadALBuffer(const std::string&)
Info: Fatal Error
file Armor.txt not found
Any suggestions? AA looks really cool, would be great to try it out.
I tried to exchange:
GameType=xta_se_v066.sdz;
to GameType=ASpring144S.sdz;
and GameType=ASpring144.sdz;
and spring client krashed:
ERROR: button9.wav
Couldnt open wav file
rts/System/Platform/Linux/OpenALSound.cpp:289 : ALuint COpenALSound::LoadALBuffer(const std::string&)
Info: Fatal Error
file Armor.txt not found
Any suggestions? AA looks really cool, would be great to try it out.
I can confirm that the NTAI under linux client doesn't seem to work..i build a brawler fighter and went to investigate..i managed to get a shoot out between two ai commanders but they seemed to be idle otherwise...lazy buggers 
Last edited by nicke on 18 Mar 2006, 10:44, edited 1 time in total.
The missing Armor.txt was caused by the fact that i had xtapev3.sd7(wrong version) and XTAPEV3.sd7 in the /mods directory, apparently spring client checked the wrong version first.
After that the file sidedata.tdf was missing! I got from Dune:TA is a total conversion, apparently AA shouldn't need this file according to AA forum but hey! it was requested :)
With this in place it started but bailed (sigfault) after pressing ctrl+enter
This is a trace from the debug session:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230035232 (LWP 17575)]
0x081abe49 in CCommanderScript::Update (this=0x882c958) at rts/Game/StartScripts/CommanderScript.cpp:45
45 ud->metalStorage=gs->Team(a)->metalStorage; / /make sure the cmd has the right amount of storage
(gdb) bt
#0 0x081abe49 in CCommanderScript::Update (this=0x882c958) at rts/Game/StartScripts/CommanderScript.cpp:45
#1 0x081910a4 in CGame::SimFrame (this=0x8abebe0) at rts/Game/Game.cpp:1243
#2 0x08192c04 in CGame::ClientReadNet (this=0x8abebe0) at rts/Game/Game.cpp:1673
#3 0x081941cf in CGame::Update (this=0x8abebe0) at rts/Game/Game.cpp:947
#4 0x08376883 in SpringApp::Draw (this=0xbfc6938c) at rts/System/Main.cpp:550
#5 0x08377243 in SpringApp::Run (this=0xbfc6938c, argc=2, argv=0xbfc69434) at rts/System/Main.cpp:715
#6 0x08377317 in main (argc=2, argv=0xbfc69434, envp=0xbfc69440) at rts/System/Main.cpp:794
After that the file sidedata.tdf was missing! I got from Dune:TA is a total conversion, apparently AA shouldn't need this file according to AA forum but hey! it was requested :)
With this in place it started but bailed (sigfault) after pressing ctrl+enter
This is a trace from the debug session:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230035232 (LWP 17575)]
0x081abe49 in CCommanderScript::Update (this=0x882c958) at rts/Game/StartScripts/CommanderScript.cpp:45
45 ud->metalStorage=gs->Team(a)->metalStorage; / /make sure the cmd has the right amount of storage
(gdb) bt
#0 0x081abe49 in CCommanderScript::Update (this=0x882c958) at rts/Game/StartScripts/CommanderScript.cpp:45
#1 0x081910a4 in CGame::SimFrame (this=0x8abebe0) at rts/Game/Game.cpp:1243
#2 0x08192c04 in CGame::ClientReadNet (this=0x8abebe0) at rts/Game/Game.cpp:1673
#3 0x081941cf in CGame::Update (this=0x8abebe0) at rts/Game/Game.cpp:947
#4 0x08376883 in SpringApp::Draw (this=0xbfc6938c) at rts/System/Main.cpp:550
#5 0x08377243 in SpringApp::Run (this=0xbfc6938c, argc=2, argv=0xbfc69434) at rts/System/Main.cpp:715
#6 0x08377317 in main (argc=2, argv=0xbfc69434, envp=0xbfc69440) at rts/System/Main.cpp:794
The crash was generated by a mismatching SIDEDATA.TDF http://www.tadesigners.com/~maestro/Programs/ia38.zip, look inside the zip, various.zip there you can find the sidedata i tested with, with this sidedata i could start everything up using NTAI, however i could not choose to build any structures.
Could anyone point me where to find the correct SIDEDATA.TDF to and JCAI cfg files to use with AA if those exists

Could anyone point me where to find the correct SIDEDATA.TDF to and JCAI cfg files to use with AA if those exists
Thats because your compiled NTAI hasnt any data to load hence ti doesnt knwo what to build and sits there idly.
Whatsmore the NTAI in the svn si not the latest at all, it's a ported XE4, whereas the current version is XE7.
I'm going to post XE7.5 source tot he mailing list today so get ti from there, ti should run perfectly once it has an XE7 buildtree setup
Whatsmore the NTAI in the svn si not the latest at all, it's a ported XE4, whereas the current version is XE7.
I'm going to post XE7.5 source tot he mailing list today so get ti from there, ti should run perfectly once it has an XE7 buildtree setup
I figured out why the linux taclient requested the sidedata.tdf when starting the aiscript with Absolute Anhiliation. I had specificed the wrong mod file GameType=AASpring144.sdz; instead of GameType=AASpring144S.sdz;
So it would be great testing the new NTAI with AA =)
Now over to the new problems, i thought i would test out one of the great maps i found on file universe namly "River Dale" problem is when used with the aiscript, AA+NTAI it crashes, see trace below:
#0 0xb783ccb9 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7845ac2 in fprintf () from /lib/tls/i686/cmov/libc.so.6
#2 0xaaec8222 in std::_Rb_tree<std::string, std::pair<std::string const, CSunParser::SSection*>, std::_Select1st<std::pair<std::string const, CSunParser::SSection*> >, std::less<std::string>, std::allocator<std::pair<std::string const, CSunParser::SSection*> > >::insert_unique (
this=0x41480000, __position={_M_node = 0x9cd3f54}, __v=@0xaaed51a4) at stl_tree.h:914
#3 0xaaec9278 in std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::operator[] (this=0x9cd3f48, __k=@0x9cc7f98)
at stl_map.h:339
#4 0xaaea2a23 in CMetalHandler::getMetalAmount (this=0x9cc7f80, x=163307032, z=-1077486392)
at AI/Global/NTAI/MetalHandler.cpp:130
#5 0xaaeaccca in __gnu_cxx::new_allocator<int>::construct (this=0x9cbc3c8, __p=0x9bbde08,
__val=@0xbfc6dda8) at new_allocator.h:104
#6 0xaaeb3d71 in Global::WhichCorner (this=0x8ddeb48, pos=@0x9bbde08)
at AI/Global/NTAI/helper.cpp:125
#7 0x08054a05 in CGlobalAI (this=0x9bbded0, team=1,
dll=0x8989eec "aidll/globalai/libNTAI.so") at rts/ExternalAI/GlobalAI.cpp:43
#8 0x08051738 in CGlobalAIHandler::CreateGlobalAI (this=0xa142260, team=1,
dll=0x8989eec "aidll/globalai/libNTAI.so") at rts/ExternalAI/GlobalAIHandler.cpp:192
#9 0x081ab875 in CCommanderScript::Update (this=0x882dd08)
at rts/Game/StartScripts/CommanderScript.cpp:32
#10 0x081910a4 in CGame::SimFrame (this=0x8ac0360) at rts/Game/Game.cpp:1243
#11 0x08192c04 in CGame::ClientReadNet (this=0x8ac0360) at rts/Game/Game.cpp:1673
#12 0x081941cf in CGame::Update (this=0x8ac0360) at rts/Game/Game.cpp:947
So it would be great testing the new NTAI with AA =)
Now over to the new problems, i thought i would test out one of the great maps i found on file universe namly "River Dale" problem is when used with the aiscript, AA+NTAI it crashes, see trace below:
#0 0xb783ccb9 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7845ac2 in fprintf () from /lib/tls/i686/cmov/libc.so.6
#2 0xaaec8222 in std::_Rb_tree<std::string, std::pair<std::string const, CSunParser::SSection*>, std::_Select1st<std::pair<std::string const, CSunParser::SSection*> >, std::less<std::string>, std::allocator<std::pair<std::string const, CSunParser::SSection*> > >::insert_unique (
this=0x41480000, __position={_M_node = 0x9cd3f54}, __v=@0xaaed51a4) at stl_tree.h:914
#3 0xaaec9278 in std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::operator[] (this=0x9cd3f48, __k=@0x9cc7f98)
at stl_map.h:339
#4 0xaaea2a23 in CMetalHandler::getMetalAmount (this=0x9cc7f80, x=163307032, z=-1077486392)
at AI/Global/NTAI/MetalHandler.cpp:130
#5 0xaaeaccca in __gnu_cxx::new_allocator<int>::construct (this=0x9cbc3c8, __p=0x9bbde08,
__val=@0xbfc6dda8) at new_allocator.h:104
#6 0xaaeb3d71 in Global::WhichCorner (this=0x8ddeb48, pos=@0x9bbde08)
at AI/Global/NTAI/helper.cpp:125
#7 0x08054a05 in CGlobalAI (this=0x9bbded0, team=1,
dll=0x8989eec "aidll/globalai/libNTAI.so") at rts/ExternalAI/GlobalAI.cpp:43
#8 0x08051738 in CGlobalAIHandler::CreateGlobalAI (this=0xa142260, team=1,
dll=0x8989eec "aidll/globalai/libNTAI.so") at rts/ExternalAI/GlobalAIHandler.cpp:192
#9 0x081ab875 in CCommanderScript::Update (this=0x882dd08)
at rts/Game/StartScripts/CommanderScript.cpp:32
#10 0x081910a4 in CGame::SimFrame (this=0x8ac0360) at rts/Game/Game.cpp:1243
#11 0x08192c04 in CGame::ClientReadNet (this=0x8ac0360) at rts/Game/Game.cpp:1673
#12 0x081941cf in CGame::Update (this=0x8ac0360) at rts/Game/Game.cpp:947
Same thing happens when running aiscript with NTAI, map=SmallDivide and GameType=StarWars01.sd7;
#0 0xb4e25fbf in allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float> > (this=0x94f7e60) at allocator.h:103
#1 0xb4e1707e in ~vector (this=0x94f7b30) at stl_vector.h:273
#2 0xb4e1cdc4 in Global::WhichCorner (this=0x94d4008, pos=@0x0)
at AI/Global/NTAI/helper.cpp:125
#3 0x080546b7 in CGlobalAI::Update (this=0x95b45c0) at rts/ExternalAI/GlobalAI.cpp:64
#4 0x08050d69 in CGlobalAIHandler::Update (this=0x94fc8e0)
at rts/ExternalAI/GlobalAIHandler.cpp:61
#5 0x08191127 in CGame::SimFrame (this=0x8a76178) at rts/Game/Game.cpp:1252
#6 0x08192c04 in CGame::ClientReadNet (this=0x8a76178) at rts/Game/Game.cpp:1673
#7 0x081941cf in CGame::Update (this=0x8a76178) at rts/Game/Game.cpp:947
#8 0x0837688f in SpringApp::Draw (this=0xbfad2d9c) at rts/System/Main.cpp:550
#9 0x0837724f in SpringApp::Run (this=0xbfad2d9c, argc=2, argv=0xbfad2e44)
at rts/System/Main.cpp:715
#10 0x08377323 in main (argc=2, argv=0xbfad2e44, envp=0xbfad2e50) at rts/System/Main.cpp:794
malric could you notify me when you have the new NTAI ai running so i can test it? =)
#0 0xb4e25fbf in allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float> > (this=0x94f7e60) at allocator.h:103
#1 0xb4e1707e in ~vector (this=0x94f7b30) at stl_vector.h:273
#2 0xb4e1cdc4 in Global::WhichCorner (this=0x94d4008, pos=@0x0)
at AI/Global/NTAI/helper.cpp:125
#3 0x080546b7 in CGlobalAI::Update (this=0x95b45c0) at rts/ExternalAI/GlobalAI.cpp:64
#4 0x08050d69 in CGlobalAIHandler::Update (this=0x94fc8e0)
at rts/ExternalAI/GlobalAIHandler.cpp:61
#5 0x08191127 in CGame::SimFrame (this=0x8a76178) at rts/Game/Game.cpp:1252
#6 0x08192c04 in CGame::ClientReadNet (this=0x8a76178) at rts/Game/Game.cpp:1673
#7 0x081941cf in CGame::Update (this=0x8a76178) at rts/Game/Game.cpp:947
#8 0x0837688f in SpringApp::Draw (this=0xbfad2d9c) at rts/System/Main.cpp:550
#9 0x0837724f in SpringApp::Run (this=0xbfad2d9c, argc=2, argv=0xbfad2e44)
at rts/System/Main.cpp:715
#10 0x08377323 in main (argc=2, argv=0xbfad2e44, envp=0xbfad2e50) at rts/System/Main.cpp:794
malric could you notify me when you have the new NTAI ai running so i can test it? =)
