[solved] setting Questions for Single Player

[solved] setting Questions for Single Player

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

[solved] setting Questions for Single Player

Post by kaiserbert »

How to start spring in singleplayer Modus?
Where are some Howtos to set the Game in Linux OS?

bye Bert
Last edited by kaiserbert on 28 Dec 2006, 20:18, edited 1 time in total.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

https://taspring.clan-sy.com/wsvn/filed ... rev=0&sc=0

Is a sample of script.txt ( spring /path/to/script.txt )
Used to launch AI / Mod / Map etc.
Believe thats what you are looking for.

Other than that TASClient running in wine. AFlobby (not sure if it can start games)

Note will need to download a mod compatiable with AAI. (i.e AA)
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

first of all thanks for the quick reply,

where can i download the mods?
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

http://taspring.clan-sy.com/phpbb/viewtopic.php?t=8212

XTA mod is one. U will also need the base content zip aswell.

Note u will prob need the base content zip file for most TA look alike mods
This contains non-gpl work & legally u need to own Total Anihaltions.

Thus the reason of switching to Nanoblobs since its gpl for linux. Pitty no AI to support it in svn though :/

Also u can look @http://www.unknown-files.net/
For more mod's & map's
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

Thank you all i downloaded the XTA mod and installed that.

Therefore i have to edit the start script i think.
But this is not as easy as it was written before.

Can anybody help me?
Or give me an also ready script for single player or an Howto for setting up this?
Also i am not sure whether i put the XTA files in the right directory.
Do i have to put the XTAPE.sd7 file into the directory /path/to/springData/mods/ ? Or into the maps directory, because of the extension of this file ?


Here comes my one, which i think is faulty,

Code: Select all

//Send a file formated like this as the only command line argument to the spring executable
//All players must get the exact same file except MyPlayerNum (and possibly HostIP)
[GAME]
{
        Mapname=mars.smf;           //with .smf extension
        Gametype=XTAPE.sd7; //the primary mod archive
        StartMetal=1000;
        StartEnergy=1000;
        MaxUnits=500;       // per team
        StartPosType=x;     // 0 fixed, 1 random, 2 select in map
        GameMode=x;         // 0 cmdr dead->game continues, 1 cmdr dead->game ends
        LimitDgun=0;        // limit dgun to fixed radius around startpos?
        DiminishingMMs=0;   // diminish metal maker's metal production for every new one of them?
        DisableMapDamage=0; // disable map craters?
        GhostedBuildings=1; // ghost enemy buildings after losing los on them

        MaxSpeed=3;         // speed limits at game start
        MinSpeed=0.3;

        //Demofile=demo.sdf;  // if set this game is a multiplayer demo replay

        //HostIP=xxx.xxx.xxx.xxx;
        //HostPort=xxx;       // usually 8452
        //SourcePort=0;       // set this if you want a different source port (as client)

        MyPlayerNum=x;      //only variable that should vary between different players

        NumPlayers=x;
        NumTeams=y;
        NumAllyTeams=z;

        // a player (player 0 is the host)
        [PLAYER0]
        {
                Name=player1;
                Spectator=0;
                Team=TEAM0;
                IsFromDemo=0;   // use only in combination with Demofile (see above)
        }
        //more players

        // players in this will share the same units (start with one commander etc)
        [TEAM0]
        {
                TeamLeader=player1;   // player number that is the "leader"
                AllyTeam=number;
                RgbColor=red green blue;  // red green blue in range [0-1]
                Side=Arm/Core;  // other sides possible with user mods i suppose
                Handicap=0-100; // Percent bonus on all resources collected ?
                AiDLL=file;     // If this line exists the team will have a global ai loaded from
                // the file, the teamleader field indicates which computer the ai will run on.
        }
        //more teams

        // teams in ally team share los etc and cant break alliance, every team must be in exactly one ally team
        [ALLYTEAM0]
        {
                NumAllies=0;
                Ally0=(AllyTeam number); //means that this team is allied with the other, not necesarily the reverse

                StartRectTop=0;    // Use these in combination with StartPosType=2
                StartRectLeft=0;   //   (ie. select in map)
                StartRectBottom=1; // range is 0-1: 0 is left or top edge,
                StartRectRight=1;  //   1 is right or bottom edge
        }
        //more ally teams

        //something for selecting which unit files to disable or restrict

        NumRestrictions=xx;

        [RESTRICT]
        {
                Unit0=armah;
                Limit0=0;       // use 0 for all units that should be completely disabled
                Unit1=corvp;
                Limit1=50;      // >0 can be used for limiting, like build restrictions in TA
                //...
        }
}
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Here is an example script that sets up an XTA skirmish between you and an AI on Mars:

Code: Select all

[GAME]
{
        Mapname=Mars.smf;
        Gametype=XTAPE.sd7;
        StartMetal=1000;
        StartEnergy=1000;
        MaxUnits=500;
        StartPosType=1;       // 0 fixed, 1 random, 2 select in map
        GameMode=0;           // 0 cmdr dead->game continues, 1 cmdr dead->game ends
        LimitDgun=0;
        DiminishingMMs=0;
        DisableMapDamage=0;
        GhostedBuildings=1;

        MaxSpeed=3;
        MinSpeed=0.3;

        MyPlayerNum=0;

        NumPlayers=2;
        NumTeams=2;
        NumAllyTeams=2;


        [PLAYER0]
        {
                Name=Player0;
                Spectator=0;
                Team=TEAM0;
        }
        [PLAYER1]
        {
                Name=Bot0;
                Spectator=0;
                Team=TEAM1;
        }

        [TEAM0]
        {
                TeamLeader=Player0;
                RgbColor=1 0 0;
                Side=Arm;
                Handicap=100;
                AllyTeam=0;
                AiDLL=YOUR_SPRING_DIRECTORY/AI/Bot-libs/AAI.so;
        }
        [TEAM1]
        {
                TeamLeader=Bot0;
                RgbColor=0 0 1;
                Side=Core;
                Handicap=100;
                AllyTeam=1;
        }

        [ALLYTEAM0]
        {
                NumAllies=0;
        }
        [ALLYTEAM1]
        {
                NumAllies=0;
        }
}
It doesn't matter where you put XTAPE.sd7, because Spring creates a mapping for each file into its own virtual filesystem (so you can put maps in /mods and mods in /maps if you're so inclined).
Last edited by Kloot on 28 Dec 2006, 14:59, edited 1 time in total.
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

thank you for your script.

I changed the line,
AiDLL=/usr/local/games/spring/taspring_0.74b1/game/AI/Bot-libs/AAI.so;
But he crashes before he shows the surface of the world.
The error is in German,
Speicherzugriffsfehler
and in Englisch,
segmentation fault

bye Bert
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Sorry, the [RESTRICT] section was using old XTA unit names. It's fixed now.
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

Thanks,

now i can play, but i still get an error ingame,
"AAI not properly initialized, please view ai log for further information"

The AAI do nothing. It still stands at it start position, unitl i come
and attack it, then the Game crashes.

Any Idea?

bye Bert
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

Last time i did play the Game runs fine but the AII builds only two solar-energy-producers. And then i kill him but without crash.

Therfore i renamed the
/usr/local/games/spring/taspring_0.74b1/AI/AAI/cfg/mod/xtape.cfg
to
/usr/local/games/spring/taspring_0.74b1/AI/AAI/cfg/mod/XTAPE.cfg

Is there a other way to get an intelligent AAI Opponent or a learning Opponent?

bye Bert
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Would anybody consider tryign to compile NTaiToolkit in mono? If you cna do it I'll put up NTai source code
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

I am not a Dev.
But maybe i can help, plz explain me what is NTaiToolkit in mono ?

Is this AI code ?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You read:
Would anybody consider trying to compile "NTaiToolkit in mono"?
I meant
Would anybody consider trying to compile "NTaiToolkit" in mono?
mono is a well known .Net runtime for linux

NTai Toolkit is a C# program to build NTai configs.

I bid you go read the other 95% of this forum, especially the AI forum oh noes afterall it does seem to be more promising for an AI question than say the Linux forum.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

AF: sure, that shouldn't be a problem provided it doesn't use anything from System.Windows and System.Drawing.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm, wonder whats in there.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

This and this mainly.
Post Reply

Return to “Linux”