
Mods / Metal Recycling
Author: ilan
Side: Server
Created: Jun 15th 2024 at 7:17 AM
Last modified: Jan 26th at 9:26 AM
Downloads: 4787
Follow Unfollow 143
Latest release (for outdated Vintage Story v1.20.3):
metalrecycling_1.2.0.zip
1-click install
Ever wish you could recycle those bits of metal you seem to "waste" when you make chisels or the like? Well, now you can!
Using the "split" ability on work items now has a chance of giving you a metal bit in return - by default this starts at 50%, but the chance goes down with every metal bit you successfully recover.
Smith away, and rejoice!
This mod is configurable using the MetalRecycling.json configuration file:
- MetalRecyclingChance - The chance that a metal bit will be returned when splitting metal on the anvil. Defaults to 0.5 (50%).
- MaxBitsPerWorkItem - How many metal bits you can get from a single work item. Defaults to 10.
- DiminishingReturnFactor - The "factor" of diminishing returns that affects the recycle chance on every successful bit recovery. Defaults to 0.85.
- RecycleIronBlooms - Whether you get iron bits from splitting iron blooms. Defaults to true.
Diminishing returns
The default factor for the diminishing returns is 0.85. That means that for every bit of metal you successfully recover, the chance to get another metal bit is multiplied by 0.85 (or 85% of 50%). For the default starting chance of 50%, this means:
- You have a 50% chance of getting the first metal bit
- Afterwards, you have a 50% * 0.85 = 42.5% chance of getting another metal bit
- After that, you have a 42.5% * 0.85 = 36.1% chance
- and so on, and so forth..
To make it easier to get metal bits, increase the value of the diminishing returns factor. To make it harder, lower the value.
Examples:
- For a factor of 0.9, the chances will go 50% -> 45% -> 40% -> 36%
- For a factor of 0.5, the changes will halve every time: 50% -> 25% -> 12.5% -> 6.25%
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.2.0 | 2337 | Jan 26th at 9:26 AM | Show | metalrecycling_1.2.0.zip | 1-click install | |
v1.1.0 | 2318 | Jun 15th 2024 at 3:42 PM | Show | metalrecycling_1.1.0.zip | 1-click install | |
v1.0.0 | 132 | Jun 15th 2024 at 8:59 AM | Show | metalrecycling_1.0.0.zip | 1-click install |
Oh, also, I've found another bug. It seems like when the bit pops off, it originates off a certain corner of the anvil (I don't know if it's specifically the back left corner or if a few of my anvils have happened to face the same direction). I like to put my anvils against a wall, and I had a big window behind one of them, every now and then a bit would spawn in the block and phase backwards through the wall.
If the position the bit comes from could be changed to be something like near the bottom center of the anvil relative (and towards) the player, that'd be great.
That would fix it, yeah. Thanks! :>
I wouldn't disable the recipe though, rarely there's recipes like Chute Sections which have you split while making it rather than that being the last thing you'd do. Best compromise would be the prior you mentioned.
prototype464 interesting, I didn't know you could reclaim ALL the bits from an unfinished work item. I'll look into maybe reducing the amount of bits you get from a work item like that if you've already received X bits of metal (or completely disabling the recipe?)
I'm not sure if anyone's already mentioned but this mod has an exploit: You can split bits off of a work item and then chisel the work item, which leaves you with more bits than what you started with.
Not sure how this'd be fixed. Friend found this very early on and didn't use it or tell anyone, I'd found it months later. Might not be too important enough to warrant a fix considering anyone doing it may as well just use creative mode, but could be problematic for servers.
I can confirm this does work using the Split feature on an anvil with Knapster installed.
It does not work if you use Knapster option to complete the entire tool, including removing voxels. Which I kind of like.
Manual removal gets you some extra bits
Easy Knapster method costs those extra bits.
Love the config options too, 10/10 for this mod. I hope you keep it up!
Has this been tested with the Knappster mod?
Ever thought about allowing the bits to be added back in case a person accidentally splits too much like Anvil Metal Recovery or Smithing Plus?
@WolfKann I had to run the game with the mod loaded once before the config generated
Yes I'm looking in the right folder
Ossom There is a problem with AutoConfigLib which causes it to interfere with other mods' configs. Try removing it and trying again.
WolfKann Are you looking in the right folder? On Windows it should be %APPDATA%\VintagestoryData\ModConfig by default. The game is responsible for creating the mod configuration file (the mod just asks the game to create it), so there's not much I can help with..
I don't have any configuration changing mods.
ilan
Yes, both ConfigLib and AutoConfigLib
Ossom WolfKann
It appears you both have the same issue - the mod configuration is not being generated properly. Do you have any mods that change how mod configurations work (e.g. AutoConfigLib)?
I'm Running it on windows ilan
Got DC'd with this in console on my server:
WolfKann are you running the game on Linux?
For some reason this mod will not generate a config file in the mods Config no matter what I've tried to do, I'm not sure if it's just my client being dumb or if there's an issue with the config generation
WaltzingPhantom the mod configuration file is auto-generated in the ModConfig folder, in the game's data folder
It says the mod configs can be changed using the MetalRecycling.json file, but I don't actually see a file with that name in the .zip folder. I only see a MetalRecycling.dll and Metal Recycling.pdb. Opening either of those in notepad shows mostly random symbols.
@dr_jkl so an ingot has 42 workable voxels, and is worth 100 units. which means every voxel if saved would be worth 2.38(roughly) units. That puts your 50% chance at a metal bit, which are worth 5 units each, pretty accurate 👍
For things like copper and bronze, this actually makes smithing more metal efficent than casting, which is actually great!
dr_jkl
I think it's possible - if you smith something that you can melt back down to 100% of its original cost, like a plate.. but on the other hand, you could also just give yourself creative mode and get as many ingots as you want :)
dr_jkl No, this would essentially reduce the cost of smithed items to LESS than a full Ingot. Though if I recall a "bit" is bigger than the individual voxels of a work item. But from the way the percentage chances work, it should be about right and wont result in a net gain (which would require getting enough bits to make a whole other Ingot, which is statistically not posssible)
I have a question about this: doesn't this result in an infinite loop of free metal, since you can break down and re-smelt the work pieces back into a full ingot? So you'd end up with 1 ingot plus whatever bits of metal you got from splits? I may be misunderstanding something about this mod (or the game's metalworking system).
Updated for 1.20.3 (no changes were needed)
Working in 1.20.1
Working in 1.20.1 so far!
Seems to be working in 1.20rc 6 atleast with vanilla tin bronze items.
Anyone know if this still works in 1.20?
Thank you!
prototype464
Good question, I'll edit my original post to clarify.
How does the value for DiminishingReturnFactor work? Does lowering the value increase or decrease the rate?
😁 Glad you like it!
Man, this guy don't miss.