Mining: Restart after Status FLEE (after Rat Attack)

Dixi

Active Member
My Mining-Ship is weak.
That's a risk but I am usually mining in High Sec anyway so that's no biggie.
However, after being hit by rats hard, the bot returns to the station and stays there ... the whole night.

I didn't like that. So here is what I did:

1.) obj_EVEBot.iss
change
Code:
	variable bool ReturnToStation = FALSE
	variable bool Paused = FALSE
	variable time NextPulse
	variable int PulseIntervalInSeconds = 4
to
Code:
	variable bool ReturnToStation = FALSE
	variable bool Paused = FALSE
	variable time NextPulse
	variable int PulseIntervalInSeconds = 4
	variable bool Shieldsdown = FALSE
2.) obj_Miner.iss (Behaviour)
in method SetState() change
Code:
		;	If we're in a station HARD STOP has been called for, just idle until user intervention
		if ${EVEBot.ReturnToStation} && ${Me.InStation}
		{
			This.CurrentState:Set["IDLE"]
			return
		}
to
Code:
		;	If we're in a station HARD STOP has been called for, just idle until user intervention
		if ${EVEBot.ReturnToStation} && ${Me.InStation}
		{
			This.CurrentState:Set["IDLE"]
			if ${EVEBot.Shieldsdown} 
			{
				UI:UpdateConsole["Setting current state to BASE"]
				EVEBot.Shieldsdown:Set[FALSE]
				This.CurrentState:Set["BASE"]
				EVEBot.ReturnToStation:Set[FALSE]
			}
			return
		}
then go to function Mine()
change
Code:
		;	This checks our armor and shields to determine if we need to run like hell.  If we're being attacked by something
		;	dangerous enough to get us this damaged, it's best to switch to HARD STOP mode.
		if (${Me.Ship.ArmorPct} < ${Config.Combat.MinimumArmorPct} || \
			${Me.Ship.ShieldPct} < ${Config.Combat.MinimumShieldPct})
		{
			UI:UpdateConsole["Armor is at ${Me.Ship.ArmorPct}: ${Me.Ship.Armor}/${Me.Ship.MaxArmor}", LOG_CRITICAL]
			UI:UpdateConsole["Shield is at ${Me.Ship.ShieldPct}: ${Me.Ship.Shield}/${Me.Ship.MaxShield}", LOG_CRITICAL]
			UI:UpdateConsole["Miner aborting due to defensive status", LOG_CRITICAL]

			EVEBot.ReturnToStation:Set[TRUE]
			return
		}
to
Code:
		;	This checks our armor and shields to determine if we need to run like hell.  If we're being attacked by something
		;	dangerous enough to get us this damaged, it's best to switch to HARD STOP mode.
		if (${Me.Ship.ArmorPct} < ${Config.Combat.MinimumArmorPct} || \
			${Me.Ship.ShieldPct} < ${Config.Combat.MinimumShieldPct})
		{
			UI:UpdateConsole["Armor is at ${Me.Ship.ArmorPct}: ${Me.Ship.Armor}/${Me.Ship.MaxArmor}", LOG_CRITICAL]
			UI:UpdateConsole["Shield is at ${Me.Ship.ShieldPct}: ${Me.Ship.Shield}/${Me.Ship.MaxShield}", LOG_CRITICAL]
			UI:UpdateConsole["Miner aborting due to defensive status", LOG_CRITICAL]
			
			EVEBot.Shieldsdown:Set[TRUE]
			UI:UpdateConsole["EVEBot.Shieldsdown ${EVEBot.Shieldsdown}", LOG_CRITICAL]
			Ship.Drones:ReturnAllToDroneBay
			
			This.CurrentState:Set["DROPOFF"]
			EVEBot.ReturnToStation:Set[TRUE]
			return
		}
It worked for me ... I haven't been attacked by PVP-Players ever since. So I hope if that's the case the bot will stay in the station.
 

Dixi

Active Member
You should set your Flee-Settings to something like 40% Shield. The Shields will be reset to 100% once you are in the station.
Set Armor to 100% as that will not be automatically repaired.

The Miner will try to kill the npcs (always have some Scout-Drones to to the job) until it drops to 40% shield, then returns to station, then does back to the asteroid to kill some more rats.

This will not work until you have some scouts and can kill (or seriously damage) at least one rat before dropping to 40% shield.
 

Dixi

Active Member
in the obj_Miner.iss file you might also want to change the following part in the method SetState():

Code:
		;	If we're in space and HARD STOP has been called for, try to get to a station
		if ${EVEBot.ReturnToStation} && !${Me.InStation}
		{
			This.CurrentState:Set["HARDSTOP"]
			return
		}
to
Code:
		;	If we're in space and HARD STOP has been called for, try to get to a station
		if ${EVEBot.ReturnToStation} && !${Me.InStation}
		{
			This.CurrentState:Set["FLEE"]
			UI:UpdateConsole["FLEE!"]
			return
			
			; This.CurrentState:Set["HARDSTOP"]
			; return
		}
sorry, forgot about that.
 
Top Bottom