Back to mods
Thrifty Smithing project artwork

Vintage Story Mod DB · Vintage Story mod

Thrifty Smithing

Gives back scrap metal split off of items being crafted on an anvil. Once a smithing work is completed, the player who completed it will be given the amount of whole bits that could be formed from the material removed from the work while it was being crafted.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Thrifty Smithing release should I use?

Updated 1 year ago
Latest stable file 1.2.0
Game version 1.19.8
Loader Built-in Vintage Story mod system

Thrifty Smithing 1.2.0 targets 1.19.8. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Thrifty Smithing required on the client, server, or both?

It must be installed on the client. Installation on the dedicated server is optional.

Client Required
Dedicated server Optional
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This release supports both sides, but the source does not require it on the server.

What else does Thrifty Smithing 1.2.0 need?

1.2.0. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Thrifty Smithing without breaking your instance.

Built for Thrifty Smithing 1.2.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.2.0. It targets 1.19.8; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    It must be installed on the client. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.2.0. It opens that exact file at the source.

About this project

What does Thrifty Smithing add?

Gives back scrap metal split off of items being crafted on an anvil.

Once a smithing work is completed, the player who completed it will be given the amount of whole bits that could be formed from the material removed from the work while it was being crafted.

If a smithing work is completed by a helve hammer, the scrap bits will be dropped to the floor at the base of the anvil.

Configuration

The following configuration options are provided in the thrifty-smithing.json file, with default values based on the base VintageStory experience. Most of these should not be changed unless necessitated by changes from other mods.

{
  "voxelsPerIngot": 42,
  "voxelsPerPlate": 81,
  "materialUnitsPerIngot": 100,
  "materialUnitsPerBit": 5,
  "materialUnitsRecoveredModifier": 1.0,
  "disallowedRecipes": []
}
Option Type Description

voxelsPerIngot

int

The number of voxels a single ingot should be worth.

Valid value range: [1..255]

voxelsPerPlate

int

The number of voxels a single metal plate should be worth.

Valid value range: [1..255]

materialUnitsPerIngot

int

The amount of material required to craft an ingot.

Valid value range: [1..65535]

materialUnitsPerBit

int

The amount of material represented by a single metal bit.

Valid value range: [1..255]

materialUnitsRecoveredModifier

float

Percentage multiplier used to modify the amount of scrap material returned on completion of a smithing work.

The default value of 1.0 represents 100%, a value of 0.75 would represent 75%, 0.5 for 50% and so on.

Valid value range: [0.0..1.0] (max precision of ~4 digits)

disallowedRecipes

array of string

Asset locations for recipes that should not reward any scrap on completion.

For example setting this to ["game:knifeblade-copper"] would mean that players are not given any scrap metal back when crafting a copper knife blade.

Programmatic Extensibility

ThriftySmithing currently offers a limited mechanism through which other mods may alter the inputs used by ThriftySmithing to calculate metal bits returned as scrap after smithing an item.

ThriftySmithing looks for ITreeAttribute instances in an anvil's work item (BlockEntityAnvil.WorkItemStack) attributes whose names are prefixed with the string ef:ts:workData:. These ITreeAttribute instances may contain sub-attribute integer values under the keys voxels, ingots, and/or plates which may contain positive or negative values that will be applied to the scrap bit calculation.

Scrap Calculation

ThriftySmithing calculates the amount of scrap metal to give back to a player based on the number of voxels removed from a smithing work.  By default this is determined by subtracting the number of voxels required by a recipe from the voxels granted based on the number of ingots or metal plates placed onto the anvil.

Example Extension

// Add a bunch of extra voxels to the scrap bit calculation
void SetThriftySmithingVoxels(BlockEntityAnvil anvil)
{
  anvil.WorkItemStack.Attributes["ef:ts:workData:myMod"] = new TreeAttribute
  {
    ["voxels"] = new IntAttribute(36),
  }
}

Attributes

Root Level (directly on the anvil's work item stack)
Key Type Notes

ef:ts:workData:*

ITreeAttribute

A tree attribute that may contain the sub-attributes voxels, ingots, plates.

 

Sub Attributes (under the root ITreeAttribute)
Key Type Notes

voxels

IntAttribute

A positive or negative value in the range [-128..127] that may be provided to add or subtract from the scrap voxels for a smithing recipe.

ingots

IntAttribute

A positive or negative value in the range [-128..127] that may be provided to add or subtract from the count of input ingots for a smithing recipe.

plates

IntAttribute

A positive or negative value in the range [-128..127] that may be provided to add or subtract from the count of input metal plates for a smithing recipe.

Compatibility

  • Thrifty Smithing should be compatible with mod-based smithing recipes that use base game materials.
  • Thrifty Smithing may be compatible with mod-based metals, assuming they provide metal bit items with asset locations matching the base game's metalbit-{material} scheme.
  • Thrifty Smithing is not likely compatible with mods that overhaul or make significant changes to the smithing system, especially with regard to anvils.
  • Thrifty Smithing is not compatible with mods that allow smithing items without the use of anvils at all (it shouldn't cause a problem, it just won't give back scrap without an anvil).

Known Compatibilities

💚 Smithing Plus v1.0.1+ Great together!
💚 Knapster v2.x.x No issues!
💚 Ancient Armory v1.x.x Works fine!
👾 Anvil Metal Recovery Might work but seems silly.

Project description from Vintage Story Mod DB.

Pick your setup

Thrifty Smithing releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Thrifty Smithing versions and loaders

4 of 4 releases match

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.