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

Doc outlining how batteries are represented in the game #76065

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

kevingranade
Copy link
Member

Summary

None

Purpose of change

With some recent battery overhauls and discussions around them, it's clear that there's enough confusion that a doc outlining how we handle batteries and power consumption is warranted.

Describe the solution

I sketched out some decisions about how batteries and power are handled and rationales for them.

Describe alternatives you've considered

Not doing so?
I don't think documenting specific items in a centralized doc is particularly helpful because something like "this is expected to be able to run for 4h" fits better in a comment in the item definition itself and maybe in a unit test that verifies it.
I'm sure there's more that could go in here, if people have tips for how to look up or otherwise determine device runtime or power draw that would be good to go in here.
This could also go in some other doc, but I didn't see anywhere I'd expect it to fit at a glance.

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Aug 30, 2024
Copy link

@x-qq x-qq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a list of requirements for electric devices similar to what was proposed in #76056 (which on its own was inspired by specific useful data sets provided in GAME_BALANCE.md, MELEE_BALANCE_SPREADSHEET.md and other similar documents) would be a good addition that would allow further work to be built directly on this design document.

@GuardianDll
Copy link
Member

as told, it would be better to hold it in the item description

@IdleSol
Copy link
Contributor

IdleSol commented Aug 31, 2024

Is there an example of the calculation?

I haven't looked at the documents very closely. But I didn't see any mention of the batteries being charged in kilo joules. Only found it somewhere in the posts.

The internet told me that watts are joules divided by time. From this it comes out that:

  1. Add an instrument that needs to be on (example, mp3 player)
  2. Select the existing battery in the game or the capacity of the built-in battery (in kJ).
    { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 40 } },
  3. Choose how long it should work under game conditions
    For example, 24 hours or 24x60x60 = 86400 sec.
  4. Divide the capacity by the run time in seconds and get the consumption
    /// 40 x 1000 / 86400 = 0.463 W
    "power_draw": "460 mW",

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 31, 2024
@Maleclypse Maleclypse merged commit cdbde2c into master Sep 6, 2024
21 checks passed
@kevingranade kevingranade deleted the battery-doc branch September 16, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants