Page 2 of 2
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 31 May 2011, 22:32
by AF
yanom wrote:ok, I'm clearly in way over my head here, with all this lua stuff... I am kinda interested in how the AI works though.
Dont worry I built Shard so that you dont need to code any logic if you don't have to in order to modify its behaviour, its more when new behaviours or new behaviour logic is needed, as is the case here.
The API Shard exposes, is actually a lua proxy table that's written out in api.lua, so you can see the entire API there with all its parameters, without having to dig into C++
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 01 Jun 2011, 00:17
by yanom
so where do I get this new AI?
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 01 Jun 2011, 01:38
by oksnoop2
It's a luaai so it's built right into the game. Just get the latest revision.
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 01 Jun 2011, 04:06
by yanom
ahhh, there it is. Thanks! Was this AI made just recently, after my question about Shard?
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 01 Jun 2011, 05:00
by oksnoop2
yeah, knorke made it like... today? i guess.
Re: Anyone know how to make Shard AI work with Conflict Terra?
Posted: 01 Jun 2011, 05:16
by knorke
Yesterday, depending on timezones.
I had the idea for some time but this thread inspired me to actually start.
It is not a Shard AI, though some things could be reused perhaps. For example the move-engineers-to-rocks works basically like written here:
http://springrts.com/phpbb/viewtopic.ph ... 8&start=11
Code: Select all
function deployNearRes (unitID, keys)
local nearest_resID, rx,ry,rz, nearest_res_distance = nearestResFromUnit (unitID)
local x,y,z = getBuildSpot (rx,ry,rz, "kdroneminingtower", 20, 5)
deployAt (unitID, x,z , keys)
end
The spring specific stuff like
Spring.GetUnitsInCylinder would have to be replaced by Shard specific stuff.