Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate SRV "low fuel" events in addition to the status.json one, and generate them more frequently #2462

Closed
slippycheeze opened this issue Jan 1, 2023 · 0 comments
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.

Comments

@slippycheeze
Copy link
Contributor

What happens now

EDDI triggers ShipLowFuelEvent when the flag in status.json for low fuel flips.

  • The event only fires when fuel drops below (or to? not that it matters) 25 percent.
  • It never fires again until fuel is (a) raised above 25 percent, and (b) drops below 25 percent again.
  • It only fires if the player is in a ship, not the SRV.

What I'd like to happen

I'd like to have a script respond to SRV fuel level changes. Especially, I'd like to respond when fuel dropped below 5 percent (not 25), in order to refuel when nearly empty with minimal waste of synthesis materials.

Then I can have the script check vehicle = "SRV" and status.fuel_percent, and yell at me when fuel is getting close to empty ... so I'm no longer surprised by it. :)

How it can happen

Personally, I'd trigger it by emitting VehicleStatusUpdate, or VehicleFuelUpdate, with a speech responder script associated. Firing that when the percentage fuel level changed (up or down) by at least one percent (well, >= 0.99 percent, since these decimals) would allow the cottle script to generate an appropriate response to any/all the actions.

That said, anything which let me capture the fuel level being low in a script would be fine.

For example, the existing ShipLowFuelEvent runs the speech responder Low fuel event – which script internally checks if we are in a ship or not. So, firing that for the SRV would be a start, since I could extend the script to add the new condition.

I would also be satisfied with a more coarse-grained tool: if you fired ShipLowFuelEvent when the status.json fuel_low flag was set, and also every time it crossed a five percent threshold, that'd work too. (eg: fire at <= 25%, <= 20%, <= 15%, ...) -- that'd reduce the frequency of events, without removing utility entirely. (might consider single digit percent changes below 5 percent, too, since yelling at me more when at 3 percent than 23 percent is reasonable.)

EDDI Version

v.4.0.2-b5

@Tkael Tkael added the 9. enhancement The behaviour is as specified, but we would like to modify or extend the spec. label Jan 2, 2023
@Tkael Tkael closed this as completed in 3bfd507 Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.
Projects
None yet
Development

No branches or pull requests

2 participants