Miner: Drones Modification - Combat

rhemal

Member
Hey everyone,

I use drones for the sole purpose of defending my ship from rats.

I have had the issue of my drones dying too often. Due to the code telling the drones to deploy right off the bat, they are the ones being targetted first.

I can tank the rats easily, so I modified the code to only launch drones to kill rats if I am being targetted.

Here is the modified code, noticed I also put in a check so that if you are using mining drones it will launch them straight away just like normal so it does not mess up that functionality.

obj_Miner.iss (line 324):

Code:
if ${Config.Combat.LaunchCombatDrones} && \
	${Ship.Drones.DronesInSpace} == 0 && \
	!${Ship.InWarp}				
{
	if ${Me.GetTargetedBy} > 0  || \
	${Config.Miner.UseMiningDrones}
	{
		Ship.Drones:LaunchAll[]

		if ${Ship.Drones.DronesInSpace} > 0 && \
		!${Config.Miner.UseMiningDrones}
		{
			Ship.Drones:SendDrones
		}
	}
}
This should decrease the number of drone deaths if you are using them for the sole purpose of defending your miner AND you have the ability to tank the rats as your drones pew pew them to bits.

(It also makes you look less like a bot :p)
 
Last edited:

crisdan

Well-Known Member
Substituted your code but it has no effect for me. Can you elaborate more on the starting and ending lines you replaced?

Also I assume your leaving the in game evebot check box marked under combat for use combat drones?
 

rhemal

Member
Substituted your code but it has no effect for me. Can you elaborate more on the starting and ending lines you replaced?

Also I assume your leaving the in game evebot check box marked under combat for use combat drones?
Hey Crisdan,

Note, this is for miners. I have the checkbox for combat drones checked. I do not have the miner drones checkbox checked.

There are a few minor bugs im trying to work out, but it generally works well for me.

Here is the basics of what my code change was.

Original:

Code:
If you have combat drones checked AND you are not in warp AND you havent launched drones yet >>>>> Launch drones
Modified Version:

Code:
If you have combat drones checked AND you are not in warp AND you havent launched drones yet

>>>>>

If you have miner drones checked OR  you have enemies targeting you >>>> Launch Drones

>>>>>

If you have drones launched AND you do not have miner drones checked >>>> Send drones to attack.
Now, the last part is what I am still working on. This doesn't technically do anything at the moment due to the fact that I usually have an asteroid targeted, and the drones are sent to attack whatever you are focusing on.

The only problem I am seeing, is that occasionally they do not attack the rats. I added the last bit to try and solve that problem, but it is still a work in progress. The code works perfectly for my needs 90% of the time however, the only time that bug occurs is when rats attack me while I am on my way to an asteroid.

I hope that helps clarify a bit. I will post revisions if I get that last part working properly.
 
Top Bottom