Discovery Gaming Community

Full Version: Suggestion: Autobuy jump batteries
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
An option like /autobuy jump on
to autobuy jump batteries when you got a jumpdrive
Yes please.
Well, if it's a thing with Cloak Batts, it should be with JD's.

also bring back /setmsg pls
I support this ease-of-life addition. Sounds like a winner to me!
I'll probably do this one between classes tomorrow. It should be an easy addition.

A few questions just to make sure I'm understanding the mechanics of it right, the fuel simply a commodity that sits with the rest of your cargo called 'Jumpdrive Fuel', correct?

How much should autobuy purchase for you? The minimum + small padding required in order to make that class jumpdrive run? More? How do you determine how much more?
What should it do if you don't have enough cargo space for the minimum it wants to purchase? Should it simply do nothing, without alerting you? Should it alert you? (Will that get annoying?)

I don't know if this was changed or not, but back with the old fuel mechanics, you could be at 100% charge and it'll still consume fuel until you actually type the '/jump' command. You'd want more than the minimum, if that's still the case. But how much would be reasonable? Autobuy which puts you in a weird situation doesn't sound very ease-of-life-ish
I'll explain everything over Discord about it if you want. Also to point out, this is already possible by adding jump bats to the config. It would seem very silly to go and make an entire new FLHook command to do something that has already been done. When the autobuy plugin was redone by Alley, it was to add this extra functionality. If we simply renamed the cloak element to "special" or something, then add all FLHook based equipment to that, we'll save a lot of time and effort for an unneeded change.

(adding this to autobuy.cfg will, in the meantime, allow jump bats to be auto bought when the cloak bit is enabled. It's a very easy change to make it so it just calls them batteries)
item = dsy_hspace_jump_drive_1, mine01_mark01_ammo
item = dsy_hspace_jump_drive_2, mine01_mark01_ammo
item = dsy_hspace_jump_drive_3, mine01_mark01_ammo
[Image: vOAEZcn.png]
[Image: FS3QCmK.png]
Done for restart.
Wizard. Thank you.
Splendid.
Oh, that's fantastic. I was looking at the prospects of simply adding it to the config, although I was under the impression that it was treated as commodity instead of something which slotted in with the cloaking batteries. That being said..

I'm slightly concerned about the limits still. I don't think the configuration listed above should be implemented, and here's why.



Note the configuration. You specify an item to check for, and if it exists, you feed it an entry from weapon_equip.
The one listed above is mine01_mark01_ammo

Lets take a look at that part. There's more to it, but to show the relevant bits..
Code:
[Mine]
nickname = mine01_mark01_ammo
explosion_arch = mine01_mark01_explosion
loot_appearance = ammo_crate
units_per_container = 10
requires_ammo = true
ammo_limit = 1000

Note ammo_limit being 1000. That's why you were given 1000 ammo when autobuy kicked in.
I don't like that value being a flat 1000. I think it should be scaled depending on what equipment you're using, and how much space your vessel has. It's not a very 'smart' approach when the system makes decisions on what you should, and should not have, given only a flat value. If you're aiming for convenience, tailor the system a little more to give just the right amount. Even if you have to do that using a custom supplied flat-value for each cloak, fine. Using some vague mine entry with a value of 1000 doesn't really have any correlation to how much fuel each jumpdrive should have. (I'm not saying it's a bad ballpark value mind you!)

Scaling it can be done in two ways.
A) A mathematical formula which is run whenever it checks if you need jump batteries which would use: Your ship max limit, your jumpdrive type, the amount of batteries currently available
or
B) A new addition to the plugin/ini file where you can set flat values. (Something like: item = dsy_hspace_jump_drive_1, 1200 (Being kept under a different ini tag so it doesn't automatically get an ItemID for the supplied value))

Either of these options would be a more proper approach.



While you're at it, just make an option to enable it. (/autobuy jump on)

Note: I'm already 85% done with implementation of the above. I'd wait a day. Or a few hours. You'll get a Github pull request in a bit. I'd say just get the plugin updated if you want this. It's a new category. Let it be added as such.



Which do you folks think is more appropriate?
- Being able to simply define a number in the configuration, and add the autobuy section?
- Trusting a mathematical formula to decide how much is appropriate, or if it should attempt to buy them at all if numbers aren't within correct bounds.

Honestly, the flat value isn't that bad of an idea. It'd be easier to do as well. The problem with the config file right now though, is that it runs all of the ammolimit values through a function which creates the internal ID reference which may or may not match another object loaded in through 'weapon_equip' or 'misc_equip'. (Which is great for actual ammo values! Jumpdrives are a special case, along with cloaks.)
Pages: 1 2 3