
Improved autopilot automatically drops out of autopilot mode and sounds an alarm when enemy ships are noticed.
Ah, not quite. you're talking about how fast it transfers "hp" from the capacitor to the shield. I was thinking about how fast the capacitor charges. I can see that your idea is worth considering too.Bobby wrote:another idea to consider, they could also be rated on time to charge (is that the "regen" you mentioned?).
Say the capacitor charges (and takes power to do so) whenever it is not full and it is not replenishing the shield. When it is full it no longer needs to charge and hence no longer takes power (or takes much less). It should charge quite a bit slower than shields or it will be unbalancing.This can be gotten around by assuming if hp is 0 the shield is off, so a manual switch would need to be added so it could activate on demand as well.
Code: Select all
if device is installed
block
switch
if fuel is dangerously low or device is disabled
don't use any fuel, reduce capacitor charge a bit
if capacitor is fully charged
draw a little fuel to maintain charge
otherwise
use some fuel and increment the data that stores current charge
end switch
switch
if shield is off
do nothing
if shield is fully charged
do nothing
otherwise
transfer some energy from the capacitor to the shield
end switch
end block
end if
Right, but I think that both some sort of disabled device check and a way to use power in script are both slated for the next release and you don't want to be in the position I was in with Mines Plus of spending many hours on a workaround and then having the scripting deficiency I was working around fixed the next day.Bobby wrote:I was thinking of putting some code in an onUpdate on the capacitor.
something like this: (except in Tlisp)as for how exactly it draws fuel, we could have some virtual devices that draw power (say, 2mw per device), and install a certain number of them based on how much fuel should be consumed, or simply deduct it from the fuel tank and say the capacitor has it's own little reactor.Code: Select all
if device is installed block switch if fuel is dangerously low or device is disabled don't use any fuel, reduce capacitor charge a bit if capacitor is fully charged draw a little fuel to maintain charge otherwise use some fuel and increment the data that stores current charge end switch switch if shield is off do nothing if shield is fully charged do nothing otherwise transfer some energy from the capacitor to the shield end switch end block end if
It could be enabled or disabled through an invoke. it's either that, the manual shield boost, a charge status report, or a dockscreen that combines them all.
Ideally we could use a deviceIsEnabled function, if only we had one.