Mods / No Charcoal Lost
Author: BillyGalbreath
Side: Server
Created: Aug 18th 2023 at 8:55 PM
Last modified: 14 hours ago
Downloads: 5073
Follow Unfollow 96
Latest file for Various v1.20.x:
NoCharcoalLost-1.0.1.zip
1-click install
Tired of losing firewood to the charcoal pit?
This mod ensures a 1:1 ratio of firewood:charcoal so none of it is lost.
Put 1 block of firewood in (32 firewood) get 1 block of charcoal out (8 layers)! \o/
If you like this mod, you might also like No Coke Lost.
-------------------------------------------------------------------------------------------------------------
Remember, I build these mods for myself and my family. Not you. I owe you nothing. I just like sharing what I've built with others for free. You will receive minimal to no support when using any of my mods.
-------------------------------------------------------------------------------------------------------------
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.0.1 | 63 | 14 hours ago | Show | NoCharcoalLost-1.0.1.zip | Install now | |
v1.0.0 | 5010 | Aug 18th 2023 at 8:56 PM | Show | NoCharcoalLost.zip | Install now |
idk why but it doesent seem to work anymore i get the vanilla ratio of charcoal when using this mod
I never really thought about it before but the loss even with this mod is very large. I know to make charcoal it has to cook to a certain degree but how much is lost should be more fixed, otherwise the wood would "cook" to ash. This should be how it is in vanilla imo.
Thanks for sharing.
Buggi
> Okay, so you are right about the firewood pile. I checked the base game files and 32 firewood goes into every full 'block' stack.
I know I'm right.
> However, you do not ever get 2 charcoal for a layer. The files (and code, I checked) only ever give you a max of 8 charcoal for a full block-height pile of charcoal. There is no randomly given extra.
I'll give you this one. I double checked and the charcoal piles from the charcoal pit indeed only give 8 charcoal (1 per layer). I was under the impression it was the same as a regular block of charcoal's 16 (2 per layer max, with top layer only having 1 if the total block has an odd number of charcoal).
So congrats. You have proved someone wrong on the internet about a mundane and irrelevant semantic. I hope that makes you feel better about yourself.
> So the ratio is at best 4:1.
I still dont think you understand the concept of 1 block to 1 block ratio.
> There is a seperate mod that tweaks the charcoalpile to randomly give an extra, but I'm comparing vanilla here.
No one said anything about other mods..
> So in the description above you have of a 1:1 return, can't be true as you don't have a json patch setting that each layer drops 4 charcoal.
Nope. I'm leaving the description as-is.
> What you did essentially is eliminate the randomness of 'loss'.
Yup. That's the exact goal of this mod. I'm glad you finally realized. You get back 1 full block of charcoal for every 1 block of firewood you put in.
aka 1:1 ratio
> And I looked closely and couldn't find a more elegant way of doing that than what you did. And I hate making Transplier mods so bravo!
Doesn't take much to impress you, I guess? This is one of my simplest mods I've created for this platform. First use of Harmony ever, even. But I'm glad I get your seal of approval..
BillyGalbreath
Okay, so you are right about the firewood pile. I checked the base game files and 32 firewood goes into every full 'block' stack.
However, you do not ever get 2 charcoal for a layer. The files (and code, I checked) only ever give you a max of 8 charcoal for a full block-height pile of charcoal. There is no randomly given extra.
So the ratio is at best 4:1.
There is a seperate mod that tweaks the charcoalpile to randomly give an extra, but I'm comparing vanilla here.
So in the description above you have of a 1:1 return, can't be true as you don't have a json patch setting that each layer drops 4 charcoal. What you did essentially is eliminate the randomness of 'loss'. And I looked closely and couldn't find a more elegant way of doing that than what you did. And I hate making Transplier mods so bravo!
Buggi
> There's actually 16 firewood in a block, but the most charcoal you can get back is always 8.
Well, if you want to get technical.... There's actually 32 firewood in a block, represented by 16 visual firewood. A visual firewood can be an actual 1 or 2 firewood, depending on how many are in the stack. Charcoal works in layers. there are 8 visual layers of charcoal for every 4 visual layers of firewood. Each layer of charcoal is actually 1 or 2 charcoal. So you can get a max of 16 charcoal from a max stack of 32 firewood. When i say "1:1 ratio" i am talking about the whole visual block space.
> For some reason you (the OP) just removes 13 opcodes including the conversion to integer and set the value of charCoalQuantity = (float)val.Value.X
Yes. I remove 13 opcodes from this 17 opcode instruction set to modify this single line of code, which results in charCoalQuantity = val.Value.X (the cast to float is one of the many operations that was removed)
> Why not just set the variable to 8?
Because all this logic is dealing with the entire column of charcoal. It could be 1 block (value of 8), or 13 blocks (value of 104), or any increment of 8 in between.
If you'd like to have a conversation I am available on the VS discord. Just ping me any time ^_^
So the issue could be
A) There's actually 16 firewood in a block, but the most charcoal you can get back is always 8. So even with this mod your still losing half. If the player is using a mod that modifies the original stack of wood or the stacksize of wood it might affect it.
B) Obviously versioning errors since the game just got an update and now uses .NET 7.
Here's the line he changes with this mod:
int charCoalQuantity = (int)((float)val.Value.X * (0.125f + (float)this.Api.World.Rand.NextDouble() / 8f));
For some reason you (the OP) just removes 13 opcodes including the conversion to integer and set the value of charCoalQuantity = (float)val.Value.X
Why not just set the variable to 8?
@BillyGalbreath
I see the logs files.
The only weird thing I've seen is that if I load another mod, it shows up as loaded in the logs. However, if I only load yours, it doesn't show up.
It is as if the mod dll is not loaded.
That could explain why I don't see any change in the charcoal pit behavior.
I downloaded the code of your mod and compiled it and repack it. Now it appears as loaded. But it still doesn't work.
I show server-debug.log partially:
20.8.2023 23:24:11.991 [VerboseDebug] Entering runphase Initialization
20.8.2023 23:24:11.996 [VerboseDebug] Entering runphase Configuration
20.8.2023 23:24:12.055 [VerboseDebug] Entering runphase LoadAssets
20.8.2023 23:24:12.269 [VerboseDebug] [VSCreativeMod.dll] Check for mod systems in mod C:\Games\Vintagestory\Mods\VSCreativeMod.dll
20.8.2023 23:24:12.280 [VerboseDebug] [VSCreativeMod.dll] Selected assembly C:\Games\Vintagestory\Mods\VSCreativeMod.dll
20.8.2023 23:24:12.281 [VerboseDebug] [VSEssentials.dll] Check for mod systems in mod C:\Games\Vintagestory\Mods\VSEssentials.dll
20.8.2023 23:24:12.287 [VerboseDebug] [VSEssentials.dll] Selected assembly C:\Games\Vintagestory\Mods\VSEssentials.dll
20.8.2023 23:24:12.289 [VerboseDebug] [VSSurvivalMod.dll] Check for mod systems in mod C:\Games\Vintagestory\Mods\VSSurvivalMod.dll
20.8.2023 23:24:12.302 [VerboseDebug] [VSSurvivalMod.dll] Selected assembly C:\Games\Vintagestory\Mods\VSSurvivalMod.dll
20.8.2023 23:24:14.221 [VerboseDebug] [nocharcoallost] Check for mod systems in mod C:\Users\Drakonianus\AppData\Roaming\VintagestoryData\Cache\unpack\NoCharcoalLost.zip_6816642cfd53\NoCharcoalLost.dll
20.8.2023 23:24:14.223 [VerboseDebug] [nocharcoallost] Loaded assembly C:\Users\Drakonianus\AppData\Roaming\VintagestoryData\Cache\unpack\NoCharcoalLost.zip_6816642cfd53\NoCharcoalLost.dll
20.8.2023 23:24:14.225 [VerboseDebug] 5 assemblies loaded
20.8.2023 23:24:14.225 [VerboseDebug] Instantiate mod systems for nocharcoallost
20.8.2023 23:24:14.226 [VerboseDebug] Instantiate mod systems for TA_plainsandvalleys
20.8.2023 23:24:14.226 [VerboseDebug] Instantiate mod systems for game
20.8.2023 23:24:14.232 [VerboseDebug] Instantiate mod systems for creative
20.8.2023 23:24:14.233 [VerboseDebug] Instantiate mod systems for survival
20.8.2023 23:24:14.274 [VerboseDebug] Searching file system (including mods) for asset files
20.8.2023 23:24:14.453 [VerboseDebug] Finished building index of asset files
20.8.2023 23:24:14.486 [VerboseDebug] Reloaded lang file with mod assets
20.8.2023 23:24:14.508 [VerboseDebug] Started mods
20.8.2023 23:24:14.531 [VerboseDebug] Patchloader finished
Drakonianus
Not sure what to tell you.
"It works on my machine."™
Maybe check your logs for any errors?
I test the world with your mod only.
https://imgur.com/23HPCc0
You can see what I say in the image
Drakonianus
Maybe you have another mod that messes with the same bytecode I'm messing with in this mod. Other than that, ¯\_(ツ)_/¯
If you find out what the cause is, let us know so I can start a list of incompatible mods.
For me, the mod don't work. I still have charcoal lost. My game version is 1.18.8.
I made a new world to ensure a clean use of the mod
In the real world there are methods of making charcoal with little or no loss, but they require a closed oxygen free chamber with an external fire and fuel source. So a better way to get this effect would be to make a multi block structure like a cementation furnace. In fact, it could be a cementation furnace minus the coffin and the grates in the floor
but in the real, there would be no way to get lossless charcoal in a pit where the fire is in the same area as the charcoal being made.