Idea: Shield capacitor + Improved autopilot

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

Shield capacitor - This takes up a device slot and stores energy. When you turn your shields on the capacitor is emptied, and the shield receives a large boost to its initial HP value. This is basically just for people who go around with their shields off to save power ;-) Shield capacitors would have be rated by 'hp' and 'regen' values, but instead of providing any defence themselves the hp value they reach is used as the "switch on" value of the main shield. Shield capacitors would take a fair amount of power while they are charging, but not continue to drain after they are full.

Improved autopilot automatically drops out of autopilot mode and sounds an alarm when enemy ships are noticed.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I have no idea how to do the improved autopilot, and suspect it isn't possible currently.

The shield capacitor shouldn't bee all that hard to do, the only trouble is we can't tell if a device is currently enabled or disabled. 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.

another idea to consider, they could also be rated on time to charge (is that the "regen" you mentioned?). A pure capacitor model could perhaps empty all it's energy in 1 second, but a cheaper hybrid capacitor/battery model might take 7. It could also be set up to artificially improve your shield's regen during combat.
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

Bobby wrote:another idea to consider, they could also be rated on time to charge (is that the "regen" you mentioned?).
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.
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.
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.

We assume that if the shield has been turned on it will have non-zero hp. (it might be on with zero hp when you're under fire - but I suppose it will briefly jump from zero once a second when the hp regen takes effect) If the shield hp is below the hp rating of the capacitor then hp can be transferred to the shield (either instantly or at your "transfer rate").

You could get some 'bonus regen' effect while under fire, but it would not be very significant (because of the capacitor's low regen rate).
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

The problem here isn't knowing if the shield is enabled or not. It's knowing if the capacitor is enabled or not. Currently there's no way for any device with a timer or overlay based implementation to stop functioning when disabled.

And this is something that can only be done with a timer or overlay based implementation.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I was thinking of putting some code in an onUpdate on the capacitor.

something like this: (except in Tlisp)

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


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.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Bobby wrote:I was thinking of putting some code in an onUpdate on the capacitor.

something like this: (except in Tlisp)

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


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