Drone mining needs to be fixed.

Drone mining needs to be fixed.

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

Moderators: Moderators, Content Developer

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

Drone mining needs to be fixed.

Post by yanom »

Currently, drones mine by transforming an engineer into a mining tower, which can attack nearby rocks and get money. However, this method is a headache for yours truly, the AI coder. Drone AI mining is the best it's ever been, but it's cost me many hours of Lua to get here. It may also be unbalanced.

So I propose the drones mine like the NKG do - with a mining unit that collects ore and drops it off at a DroneStructure, just like the NKG mining truck currently does. You could roll this functionality into the engineer unit, just like the NKG once had unified builder/miner unit.

Anyways, please do this.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Drone mining needs to be fixed.

Post by SanadaUjiosan »

A few points:

* From a players perspective, I feel Drone mining is extremely efficient. The Drones surround meteor clusters, drain them dry, and move on. For them to be any more efficient I feel would almost be unfair. Of course this is my opinion, and I will observe Drone mining more closely in some games to try and get a more up-to-date opinion of it.

* I really like that the Drones and NKG each have different mining methods. It adds an appropriate level of uniqueness between the two factions, that are already very different.

* A unified miner/engineer unit is a pain in the butt with the current gadget because you have to essentially turn off the unit to make it build. Otherwise, it immediately resumes it's search for meteors. It is a huge hassle for players, and that is why the NKG now has two separate units.

* That being said, I am not wholly opposed to the Drones having a mining unit like the NKG, but I feel it isn't necessary. One of the hallmarks of the Drones is their simplicity, and I feel the current mining system is a great example of that

* The NKG method of mining is actually rather clumsy and cumbersome... even with a dedicated mining units, they like to bump into eachother, stop working for no good reason, and they like to take very long routes from the meteor to the drop zone... I am not sure, but I think some kind of engine update while I was not working on the game made the mining gadget not as effective as it had once been. But that could be my imagination

* Finally, as far as it being balanced, it's true that until a little while ago Drone mining was a bit too... strong? Efficient? Effective? 4 days ago I increased the rate of fire of the drone mining weapon, making it mine slower. It was reloading every 0.2 seconds, now it reloads every 0.3 seconds. This had a noticeable effect on the speed of their mining. And I think this is a great tool to use to balance the mining.

So, what exactly is giving you trouble? As you said, the mining is the best it has been, and I have not seen any problems or less-than-desirable behavior.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Drone mining needs to be fixed.

Post by yanom »

what I really want is an end to the drones having to morph for mining.

Morphing destroyes the old unit and creates a new one with a new UnitID, making it impossible to keep any sort of roster of engineers or orginize them in any way.

Also theres this more complex problem:
In order for the AI to go the the next state-machine level in it's code, it has to build a certain number of mining towers. So to go from stage 14 to stage 15, it must build 14 mining towers. (The AI must keep advancing in stages for it to build up it's army). But building 14 mining towers is hard, because the towers will go back to being engineers once they've spent a few seconds devouring rocks around them ! So the AI stays stuck at low stages forever, maybe stages 6-12.

What I really want is something like the NKG mining truck. Once built, that mining truck has built-in unitAI instincts that tell it what it has to do. It drives around picking up ore and dropping it off. It knows how to behave itself. Do you realize that maybe %25 of the AI is just micromanaging those miners? Wheras if we had something like NKG mining, it would manage itself.

Since you want the factions to mine differently, maybe remove the requirement that drones drop off their ore? But make them mine slower than NKG.

TL;DR: I want a drone mining unit that automatically mines the way the NKG mining truck automatically mines.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Drone mining needs to be fixed.

Post by SanadaUjiosan »

Okay, I understand the problem now. That explains why it never makes roller drones ;)

So... maybe the AI could use a different way to measure when to go to the next stage? Maybe like amount of metal, or # of factories? Or maybe even # of soldier units?

If that's out of the question or too difficult, then I suppose the Drones could switch their mining system...

I've been wondering how a flying miner would work out for a while. How does this sound:

Engineer can build a Drone Drop off Tower. The Drop off Tower can then build hover-flying Drone miners which act like NKG mining trucks.

'Course, this system would require the AI to build a Drop-off point next to meteors, and ones that are actually being mined... That was sort of the beauty of the Mining Towers, they fulfilled two roles.

And yes, the flying drone miners could not require a drop off point... but if they are completely mobile I feel they could be too effective, being able to spread and mine the whole map very easily. Could make them slow, but everyone hates slow units...

Anyways, what do you think of those suggestions?
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Drone mining needs to be fixed.

Post by yanom »

Code: Select all

I've been wondering how a flying miner would work out for a while. How does this sound:

Engineer can build a Drone Drop off Tower. The Drop off Tower can then build hover-flying Drone miners which act like NKG mining trucks.

'Course, this system would require the AI to build a Drop-off point next to meteors, and ones that are actually being mined... That was sort of the beauty of the Mining Towers, they fulfilled two roles.

And yes, the flying drone miners could not require a drop off point... but if they are completely mobile I feel they could be too effective, being able to spread and mine the whole map very easily. Could make them slow, but everyone hates slow units...

Anyways, what do you think of those suggestions?
flying drone miners. brilliant! Yes!

I think each drop off point should be a big building (as big as the factories). It would come with, say, 20 miner-flyers. If one of the miner-flyers got destroyed, it would automake more, but it could never have more than 20 (or whatever number we decide is good). Miner-flyers would automatically seek out meteors and bring the metal back to a miner-flyer tower, like the NKG trucks do.

If that doesn't work, the alternative would be to make the miner-flyers independent of any drop-off-buildings, but make them super-fragile. This would require that the drones establish tactical control over meteor drops before harvesting, else the NKG could block them with just 1 AntiAir truck.

flying drone miners! brilliant!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Drone mining needs to be fixed.

Post by knorke »

The stages-system AI is not really great, I only quickly put it together so that there would be any opponent at all.
You can fiddle around with it to make it a bit better but basically the system is very limited.
But building 14 mining towers is hard, because the towers will go back to being engineers once they've spent a few seconds devouring rocks around them !
Make it so that towers&engineers both count as the same unit. Actually I thought that is already in (isnt there some towersAndEnginnersCount function?), but maybe it is broken or unitnames changed. Eitherway it is a problem that is solveable by an AI, thought maybe not by this one.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Drone mining needs to be fixed.

Post by SanadaUjiosan »

knorke wrote:Make it so that towers&engineers both count as the same unit. Actually I thought that is already in (isnt there some towersAndEnginnersCount function?), but maybe it is broken or unitnames changed. Eitherway it is a problem that is solveable by an AI, thought maybe not by this one.
That sounds like a good idea. Some unit names changed but I am pretty sure I changed them all in the AI... might be wrong but I really doubt it.

I really would prefer to keep the mining towers. An alternative way for the Drones to mine really is an alternative, when nothing else can solve the problem.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Drone mining needs to be fixed.

Post by knorke »

ah, there is such function:

Code: Select all

--returns how many kdroneengineer and kdroneminingtowers a team has
function countTowersAndEngineer (teamID)
        return #Spring.GetTeamUnitsByDefs (teamID, {UnitDefNames["kdroneminingtower"].id}) + Spring.GetTeamUnitsByDefs (teamID, {UnitDefNames["kdroneengineer"].id})
end
It is never used though.

You could modify the unitCount function like this:

Code: Select all

function unitCount (teamID, unitName)
  if (unitname=="kdroneminingtower" or unitname=="kdroneengineer") then return countTowersAndEngineer 
else
        return #Spring.GetTeamUnitsByDefs (teamID, {UnitDefNames[unitName].id}) or 0
end
end
Though it is hacky.

Better would be if in the stages table you could define multiple conditions (and how many must be fullfilled)

Code: Select all

stages[2]= {
    ["unitNumbers"]={
{-----A
        ["kdroneengineer"]=2,
        ["kdroneminingtower"]=2,
total = 3,
},-----B
        {"kdronewarrior]=5,
        "kdronefighter]=3,
total = 6,
}-------
So there would be "substages", (commentated with A and B) and AI continues to next stage once all substages are completed. (or maybe only a defineable amount of substages must be completed)
A substage is complete once the total amount of unit is reached (3 for A) so for A it could either build:
2x kdroneengineer, 1x kdroneminingtower
or
1x kdroneengineer, 2x kdroneminingtower

Sounds a bit complicated, hope it made sense.

-----------

Btw, for military logic I thought of some simple mechanics that work surprisingly good (not in CT but my game, ideas are same though)
eg this is what the AI does when it has build a new jeep (some light scout)

Code: Select all

if (unitName (unitID)=="tpjeep") then
	if (math.random (1,100) > 80) then
		guardRandomHarvester (unitID, "shift")
		revengeMe[unitID] = 0.75
	else			
		doRevengeScouting (unitID, 0.2, "shift")
	end
	return
end
So for the jeep it has 2 behaviours, that are randomly chosen.
First one is guarding a random harvester, which simply means following it everywhere.
(Spring.GiveOrderToUnit(unitID, CMD.GUARD , {guardedUnit}, {}))

Now the lolpart is the revengeMe[unitID] = 0.75
When the jeep is killed, 75% of all units will get a fight command to the last position of the jeep. Since the jeep was following the harvester, it looks like the AI is protecting his harvesters. (while it is actually just suiciding more units into every battle because it always reacts too late, when stuff has already died.)

The second behaviour is doRevengeScouting which simply means to drive around the map via random waypoints, until getting killed. Once killed, units will rush to that position.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Drone mining needs to be fixed.

Post by yanom »

both great ideas knorke. But for some reason I really am drawn to the idea of flying miners :-) - i pictured a swarm of like 15 mosquito-wasp-things drilling into the meteors. super-mobile but fragile.

I made a wings3d model of what a drone mining hub might look like:

Image

The miner-flyers would be just tiny octohedrons compared to that thing. I UV-Mapped it, then (I think) prepared it with teamcolor. I don't know if I did it right, I've never modeled before.

Can you please make this unit for me:
I think each drop off point should be a big building (as big as the factories). It would come with, say, 20 miner-flyers. If one of the miner-flyers got destroyed, it would automake more, but it could never have more than 20 (or whatever number we decide is good)
? Or something like that? Plz? :-) :shock: :-) :shock: :-)
Post Reply

Return to “Conflict Terra”