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

Allow Placement of Motorbike Batteries as Appliances #77901

Merged

Conversation

TheMurderUnicorn
Copy link
Contributor

Summary

Content "Allow Motorbike Battery Appliances"

Purpose of change

#77816 mentioned the lack of powergrid placement for motorbike batteries. While these batteries are smaller and significantly less useful than our other batteries, they are basically identical in function/form to other vehicle batteries. Thus, they should probably be place-able from a realism perspective, even if they are niche or less useful.

Describe the solution

Make both the motorbike batter and the small motorbike battery place-able as appliances to use the power grid system.

  • Create construction groups, one for motorbike battery, one for small motorbike battery.
  • Create appliance construction entry, one for each battery.
  • Create appliances themselves in furniture/terrain for each battery.
    • Copied car battery entries, but tweaked breaks_into, which was apparently based on the vehicle part drops (which are absurd, IE: 1.5kg battery produces up to 7-8x weight in steel). Amended to be more reasonable, added lead drops to reflect the deconstruction producing lead.
      - Adjust the breaks_into for the battery vehicle parts themselves to reflect my changes above for the same reasonings. I have decided this is best left for a separate PR, so that if I were going to audit them, I could do all of them at the same time and it's out of scope for this PR, no reason to do this here.

Describe alternatives you've considered

I debated if this was even worth it. Motorbike batteries are substantially smaller than car batteries (especially the small motorbike battery). However, they are functionally identical to car batteries in terms of how they could easily be hooked into our appliance system.

While these are generally 'not worth' using when car batteries are so readily available, using realism as guidance, these should be placeable. Hence, I have made both place-able.

I also debated splitting this into two PR's, in case people don't like the small battery being made placeable, but really, like I said, there's no real reason they shouldn't be, in my opinion.

Testing

Ensured they appear in construction menu, are constructable/place-able using only the battery and electronics 1, checked that it functions as a battery/has charges, and then verified the breaks_into by smashing them to bits.

Additional context

breaks_into is fucked for most vehicle parts, this extends to appliances which at least the battery place-ables seem to use the vehicle part breaks_into as a reference rather than actually making them accurate to the materials that would be gained.

I may attempt to audit this, or at least to audit the battery appliances/vehicle parts, depending on how my apathy plays out.

General math for battery breaks_into:
While I found it difficult to find exact ratios of materials typically found in car batteries/motorbike batteries, etc. I do know that what is on many of the batteries (all steel) is complete nonsense.

So, for determining breaks_into for the appliances, I used the following ratios based on the materials weight to determine the 'maximum' dropped value:

Lead = 70% (primary material, grids, electrodes)
Acid = 22% (electrolyte/acid)
Plastic = 6% (case, separators, structure)
steel = 1% (terminals and connectors, battery only, where it sits in the vehicle is the frame not the battery)
rubber = token value <1% (barely any, tiny bit for rubber seals)

All I can really say is that if I used the existing values for the car batteries/vehicle parts, these batteries would break down into a huge amount of steel, which is complete nonsense. So, in my opinion, even if I am wrong, this is still much more accurate than the alternative.

These are just rough values, I absolutely do not know the exact breakdown of any given battery, this was research from several websites, although who tf knows what's true on the internet, and I also asked chat-gpt which gave me similar values to what I found through random googling and forum threads. Please don't hate me if this is wrong.

Spreadsheet showing the breakdown of each of these batteries breaks_into/how I arrived at those values:
image

I sure hope all this made sense and that I didn't make some glaring mistake.

closes #77816

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Appliance/Power Grid Anything to do with appliances and power grid <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 16, 2024
@ampersand55
Copy link
Contributor

Your breaks_into values seem consistent with the disassembled item version of the batteries, assuming HHGC is correct:

Disassembles Into: sulfuric acid (3)lead (342)2 plastic chunks

https://cdda-guide.nornagon.net/item/battery_motorbike

Disassembles Into: sulfuric acid (1)lead (171)1 plastic chunk

https://cdda-guide.nornagon.net/item/battery_motorbike_small

@TheMurderUnicorn
Copy link
Contributor Author

I'm not sure if I even had looked at their disassembly recipes, it's nice to know those are at least consistent, that makes me feel less worried about the math. I tried to make it into an actual breakdown, but ultimately it's based on some rough estimates.

@Night-Pryanik Night-Pryanik merged commit 70e6f1f into CleverRaven:master Nov 16, 2024
20 of 26 checks passed
@TheMurderUnicorn TheMurderUnicorn deleted the MotorbikeBatteryPlacement branch November 16, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to place motorbike batteries
3 participants