Page 2 of 3
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 01:05
by yanom
mmm, good! Make sure you mention the old bit only works on Ubuntu/Debian/etc. , as some linux newbies on, say, RPM distros will get confused (I remember banging my head against the wall with apt-get when I was super-new to linux and running RedHat)
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 02:07
by SanadaUjiosan
I know nothing about linux, so maybe you could just work on the page yourself? PM me or contact me in the lobby in #ct and we can talk about giving you access.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 03:01
by yanom
quick fix for what I just described:
the line that says:
Alternatively, here is the content of our older guide to installing Conflict Terra on Linux:
Should say:
For Linux Distributions with apt-get (like Ubuntu, Debian, and Mint) you can just do this :
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 16:03
by yanom
so, if I wanted to tinker with Schwarm, how would I get at the code? I downloaded the latest CT with rapid.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 17:07
by knorke
games downloaded with rapid can not be easily unpacked.
you have to get the game from
http://code.google.com/p/conflictterra/source/checkout using the "checkout function" of some SVN software.
here is a guide from zero k on that:
http://code.google.com/p/zero-k/wiki/Developing
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 19:34
by yanom
SVN error:
Code: Select all
svn: URL 'http://conflictterra.googlecode.com/svn/trunk' doesn't exist
edit: i got something by omitting the "/trunk" part of the line.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 19:56
by FLOZi
I thought there was some command like
'rapid sdz' or something
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 20:51
by yanom
Ok, i finally got the source code. How do I compile and play it (then go back, tinker with it, compile again...
knorke:
oh crap, sorry i am not good with computer!
wanted to quote your post but accidently edited it.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 21:00
by yanom
FLOZi wrote:
I thought there was some command like
'rapid sdz' or something
oh ya, it does... rapid make-sdd <package> <dir>
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 21:15
by knorke
yanom, I accidently edited your post instead of quoting

not sure if i restored it completly.
Anyway, no need to compile anything.
Just rename the "CT" folder to "CT.sdd" and it will load in Spring while you can still edit it normally.
more hints for mod testing:
http://answers.springlobby.info/questio ... est-my-mod
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 22:01
by yanom
yanom wrote:Ok, i finally got the source code. How do I compile and play it (then go back, tinker with it, compile again...
oh, good, it works now

Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 22:33
by yanom
I opened up what I THINK is the Schwarm source code, but I'll confess I have no idea what any of it means. There's a few code comments... but it's all in German.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 22:48
by knorke
it is LuaRules/Gadgets/tp_schwarmAI.lua
yeah its probally confusing at start, imo best to begin with "hello world" etc.
Not sure if this piece of is the best or easiest to understand.
If you just want to mess around for start, line 23 to 97 are the units numbers the AI tries to maintain. (though there is a bug that sometimes causes it to build more units then defined)
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 23:18
by yanom
mmm. it looks like that code works as a state machine, going through the stages from [1] to [9], and if you have more metal than variable SkipMetal, it skips that stage?
Also, where can i find the source code names (example: kdronewarrior ) of the units?
Thanks.
Re: AI for Drones Faction: Das Schwarm!
Posted: 05 Jun 2011, 23:23
by knorke
mmm. it looks like that code works as a state machine, going through the stages from [1] to [9], and if you have more metal than variable SkipMetal, it skips that stage?
yes, excactly.
Though the skipMetal is commentated out in that version. (line 127)
You can find all the unit names ingame:
type /cheat
type /unittname
Now the trick is if you type "/give k" and then press TAB, it will autocomplete or show a list.
Drones unitnames are a bit messed up, ie "kdroneminer" is actually the spreadfire drone etc.
All the unitnames in CT start with "b" or "k".
(and some special ones with "tp")
Re: AI for Drones Faction: Das Schwarm!
Posted: 06 Jun 2011, 02:57
by yanom
knorke wrote:
Though the skipMetal is commentated out in that version. (line 127)
uncommented it.
Still not sure what "ich kauf den ganzen laden!" means....
anyway, this is a nice program! did you write it?
Re: AI for Drones Faction: Das Schwarm!
Posted: 06 Jun 2011, 04:48
by yanom
mm. started tinkering with it. screwed up all the code. Redownloaded it, tinkering again. Do you know how i could get it to use Spring.Echo() to echo to the screen the current "stage" that it's in?
Re: AI for Drones Faction: Das Schwarm!
Posted: 06 Jun 2011, 04:54
by knorke
thats already in

line 314: --
Spring.Echo ("team " .. myTeam[t] .. " is at stage " .. h)
Re: AI for Drones Faction: Das Schwarm!
Posted: 06 Jun 2011, 05:23
by yanom
oh, good.
Well, i watched it play (against NullAI) and noticed it does pretty well until....
it yells out "LETS MOVE IT" and sends out units to scout.
Then it stops and does nothing more. Is that because it's reached it's quota of units it should maintain, so it doesn't make anymore?
Anyway, what would be cool, is if a unit comes under fire during that big scouting push, all of the army that's just been mobilized will go to that unit and attack. The theory being that the unit under fire has just discovered an enemy base.
My 2 cents.
Re: AI for Drones Faction: Das Schwarm!
Posted: 06 Jun 2011, 14:57
by knorke
it yells out "LETS MOVE IT" and sends out units to scout.
Then it stops and does nothing more. Is that because it's reached it's quota of units it should maintain, so it doesn't make anymore?
The idea is that when sending out the units, some will die and the AI will rebuild those. If there is nothing to replace, it will just be happy with the status quo.
For attacking I was thinking to put units on patrol routes and/or make them guard the engineers for some "agressive-defense" style of expanding.
But did not do anything of the sort yet, maybe this week.