Anyone know how to make Shard AI work with Conflict Terra? - Page 2

Anyone know how to make Shard AI work with Conflict Terra?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

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

Re: Anyone know how to make Shard AI work with Conflict Terra?

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

Re: Anyone know how to make Shard AI work with Conflict Terra?

Post by yanom »

so where do I get this new AI?
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: Anyone know how to make Shard AI work with Conflict Terra?

Post by oksnoop2 »

It's a luaai so it's built right into the game. Just get the latest revision.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Anyone know how to make Shard AI work with Conflict Terra?

Post by yanom »

ahhh, there it is. Thanks! Was this AI made just recently, after my question about Shard?
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: Anyone know how to make Shard AI work with Conflict Terra?

Post by oksnoop2 »

yeah, knorke made it like... today? i guess.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Anyone know how to make Shard AI work with Conflict Terra?

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

Return to “AI”