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

Add craftable dry batteries (zinc-carbon dry cell) #54287

Merged
merged 30 commits into from
Feb 4, 2022

Conversation

Proxima-b
Copy link
Contributor

@Proxima-b Proxima-b commented Jan 11, 2022

Summary

Content "Adds new item 'Dry battery'"

Purpose of change

The disposible alkaline batteries currently requires material from the labs to craft which is not always an option early game, especially in a wildness surviving gamethrough with innawood or rural_mapgen mods.

Describe the solution

This addition adds dry batteries which do not require lab materials to craft, instead, using material which can be mass produced by the players. However this kind of batteris have much lower energy densities than disposable alkaline batteries.

Describe alternatives you've considered

Nothing of sort.

Testing

Playtested, crafted and used.

Additional context

https://www.epectec.com/batteries/chemistry/
This article articulates the difference of energy density between Zinc–carbon primary batteries and Zinc-MnO2 Alkaline batteries, which is roughly consistant with the number I have set, based on the current data in the game.

@NetSysFire NetSysFire added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Battery / UPS Electric power management labels Jan 11, 2022
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 11, 2022
@Proxima-b
Copy link
Contributor Author

Why is there a json style check error and how to fix it?

@NetSysFire
Copy link
Member

Click on the details to get the output of the test, which tells you what needs to be fixed. There is also tools/format/json_formatter.cgi which can do that automagically for you.
You also need to fix the summary of your PR.

@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Jan 11, 2022
@Proxima-b
Copy link
Contributor Author

@Maddremor
Copy link
Contributor

Can you give an example of how one would make a crude battery? Not that I doubt the chemistry, but a practical example (even if only a school science project) could be useful for not skipping a step by accident.

@Proxima-b
Copy link
Contributor Author

Proxima-b commented Jan 11, 2022

Can you give an example of how one would make a crude battery? Not that I doubt the chemistry, but a practical example (even if only a school science project) could be useful for not skipping a step by accident.

That I actully have no idea, but there are already recipes for alkaline batteries, I guess the methods used in making dry batteries can't be that different.
But If I have to guess, I think it would be:
-Smelt a casing somehow.
-Place anode and cathod materials into the casing with as much surface area as possible.(without touching eachother of course)
-Place insulation material.
-Stuff the remaning space with electrolytes (any state).
-Seal the casing.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 11, 2022
@Proxima-b
Copy link
Contributor Author

Why does it failed?

@BrettDong
Copy link
Member

The hosted runner: GitHub Actions 4 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 11, 2022
@Proxima-b
Copy link
Contributor Author

The hosted runner: GitHub Actions 4 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

But my content seems ok , I just don't understand how to resolve this

@NetSysFire
Copy link
Member

It's easy: You do not. Your simple JSON change is unlikely to have caused it. Just ignore it.

@kevingranade
Copy link
Member

Good news, detailed source
https://www.doitpoms.ac.uk/tlplib/batteries/batteries_zn_c.php
Bad news, this is much more complicated than you seem to think. I don't see this being a workable innawoods recipe. It needs a sintered carbon rod and a complex casing.

In broad strokes, I don't think there's an intersection between portable and innawoods craftable, though I'm open to reviewing sources if you find any candidates.

A voltaic pile as you originally outlined would work, but is low voltage and I'm guessing has extremely low energy density.
A lead-acid battery is a good option but needs a difficult to produce casing and isn't portable.

@Alex-Folts
Copy link
Contributor

Alex-Folts commented Jan 11, 2022

Carbon rod is not a problem, it would require extra work to make it.
This process will do: https://www.youtube.com/watch?v=N9B2OAiu95Y

Main problem of this sort of batteries is getting zinc metal.


Another way is to mix conductive charcoal powder with clay, shape it and bake - it will form conductive ceramic. This is probably the easiest way of making non-reactive electrodes.

@kevingranade
Copy link
Member

This also highlights that the existing craftable cells need to be revisited, the casing is pretty complex and there's no electrode in the recipe. Ideally you could harvest battery casings and replace/refresh the active ingredients, after looking at their structure I'm increasingly skeptical of from scratch cells that are drop-in replacements for modern batteries.

Thanks for the electrode source, that seems feasible for a battery electrode at least, though I have my doubts for other applications.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 11, 2022
@Proxima-b
Copy link
Contributor Author

Proxima-b commented Jan 12, 2022

This also highlights that the existing craftable cells need to be revisited, the casing is pretty complex and there's no electrode in the recipe. Ideally you could harvest battery casings and replace/refresh the active ingredients, after looking at their structure I'm increasingly skeptical of from scratch cells that are drop-in replacements for modern batteries.

Thanks for the electrode source, that seems feasible for a battery electrode at least, though I have my doubts for other applications.

The crafting requires blacksmith standard tools with smelting, which is exactly how a complex metal process procedure is represented in dda.
If we look closer, many crafting process of the electronic devices in the game are somewhat simplified, like " electrohackl" and "handheld game system", or the UPS, which I'm pretty sure need a dust-free workshop or something else to craft.
For lack of a complete industrial system, I think these somewhat simplified recipes do well to balance the gameplay and realism elements of the game.
I think the dry battery pieces do not break the overall immersion and game balance. As for the problem of existing craftable cells, they do produce pre-apocalypse batteries, so I think adding the requirement of vaccum molder and polycarbonate sheets would suffice.
For now I will try to make a recipe for carbon electrodes.

@Proxima-b
Copy link
Contributor Author

Click on the details to get the output of the test, which tells you what needs to be fixed. There is also tools/format/json_formatter.cgi which can do that automagically for you. You also need to fix the summary of your PR.

Having problem with the web format html tool, it freezes.
How to use the .exe formal tool provided by the game?

@anothersimulacrum
Copy link
Member

anothersimulacrum commented Jan 12, 2022

This also highlights that the existing craftable cells need to be revisited, the casing is pretty complex and there's no electrode in the recipe. Ideally you could harvest battery casings and replace/refresh the active ingredients, after looking at their structure I'm increasingly skeptical of from scratch cells that are drop-in replacements for modern batteries.
Thanks for the electrode source, that seems feasible for a battery electrode at least, though I have my doubts for other applications.

The crafting requires blacksmith standard tools with smelting, which is exactly how a complex metal process procedure is represented in dda. If we look closer, many crafting process of the electronic devices in the game are somewhat simplified, like " electrohackl" and "handheld game system", or the UPS, which I'm pretty sure need a dust-free workshop or something else to craft. For lack of a complete industrial system, I think these somewhat simplified recipes do well to balance the gameplay and realism elements of the game.

Those recipes are wrong, and should be fixed or removed. Incorrect recipes do not justify more incolrect recipes - the process of making these in-game should be representative of the difficulties of making them in real life.

@Alex-Folts
Copy link
Contributor

Dont forget about electrolyte. It called dry cell but still have electrolyte. Where on earth you've gonna get amonium chloride...


Purpose of change

The disposible alkaline batteries currently requires material from the labs to craft which is not always an option early game, especially in a wildness surviving gamethrough with innawood or rural_mapgen mods.

Another solution for original problem would be to add new alkaline battery type, which use sodium hydroxide(lye) electrolyte instead of potassium hydroxide. It should have lower power density and higher internal loses due to lower conductivity of sodium hydroxide, which results in lower effective energy density.

@Proxima-b
Copy link
Contributor Author

Dont forget about electrolyte. It called dry cell but still have electrolyte. Where on earth you've gonna get amonium chloride...

Purpose of change

The disposible alkaline batteries currently requires material from the labs to craft which is not always an option early game, especially in a wildness surviving gamethrough with innawood or rural_mapgen mods.

Another solution for original problem would be to add new alkaline battery type, which use sodium hydroxide(lye) electrolyte instead of potassium hydroxide. It should have lower power density and higher internal loses due to lower conductivity of sodium hydroxide, which results in lower effective energy density.

Perhaps it is possible to produce ammonium chloride in game, We've got HCL and ammonia water... But could it potentially make the whole production process way too excruciating?

As for the sodium alkaline battery, it seems legit, but it would be nice to have comparing data from sources so I can determined it's actual energy capacity in game

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 12, 2022
@Proxima-b
Copy link
Contributor Author

About electrolyte:

Since the electrolyte for Zn-C cell is actually a moisturized mix of manganese dioxide and several acidic chlorids. I decided to introduce a "acidic electrolyte paste" material in the process, instead of using pure manganese dioxide.

In real life, cadmium and ammonium chloride maybe even mercury could be used in the production of dry batteries, but I fear at this point adding more component into this recipe would unnecessarily complicate things.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 13, 2022
@Proxima-b Proxima-b requested a review from BrettDong January 13, 2022 08:09
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 13, 2022
@kevingranade
Copy link
Member

I fear at this point adding more component into this recipe would unnecessarily complicate things.

The goal is representatives, if something requires a lot of different components and is difficult to execute on because of that, the complication is entirely necessary.

@kevingranade kevingranade merged commit 26b423d into CleverRaven:master Feb 4, 2022
@Proxima-b Proxima-b deleted the Drycell branch March 1, 2022 06:10
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 Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Battery / UPS Electric power management [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.

7 participants