AI for Drones Faction: Das Schwarm! - Page 2

AI for Drones Faction: Das Schwarm!

A fresh perspective on battle for control of Earth, brought to you by Sanada and Snoop.

Moderators: Moderators, Content Developer

yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post by yanom »

SanadaUjiosan wrote: edit: I went ahead and spliced your bit into our guide yanom. How does it look?

http://code.google.com/p/conflictterra/ ... pidOnLinux

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)
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: AI for Drones Faction: Das Schwarm!

Post 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.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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 :
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post by yanom »

so, if I wanted to tinker with Schwarm, how would I get at the code? I downloaded the latest CT with rapid.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post 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
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: AI for Drones Faction: Das Schwarm!

Post by FLOZi »

knorke wrote: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
I thought there was some command like

'rapid sdz' or something
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post by yanom »

FLOZi wrote:
knorke wrote: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
I thought there was some command like

'rapid sdz' or something

oh ya, it does... rapid make-sdd <package> <dir>
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post by knorke »

yanom, I accidently edited your post instead of quoting :roll:
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
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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 :-)
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post by knorke »

Image

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)
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post 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")
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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?
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post by knorke »

thats already in ;)
line 314: --Spring.Echo ("team " .. myTeam[t] .. " is at stage " .. h)
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: AI for Drones Faction: Das Schwarm!

Post 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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI for Drones Faction: Das Schwarm!

Post 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.
Post Reply

Return to “Conflict Terra”