"Blueprint_State_Transfer" Issue #5016
Replies: 1 comment
-
The next update cleans up the crafting code a fair bit, but the "state transfer" option remains relatively untouched for the meantime. It's a weird one: transferring all properties from the first input item even if incompatible (e.g. gun to beans) and with special handling for attachments and fire modes. As part of the update, blueprint "type" is separated into "category" (customizable) and "operation" (e.g. repair, refill). I think state transfer makes most sense as a kind of operation, rather than general to all blueprints. It'd then be a question of making it more parameterized, ideally leaving it open-ended for interesting uses like the one your describe. 🤔 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed this option:
Blueprint_#_State_Transfer
Transfer the current state of any supplies to the product, when applicable. For example, some states that can be transferred include: amount (e.g., rounds in an ammunition box), quality percentage, selected firing mode, or fuel units (e.g., from a gas can).
This works well, but there are problems with some synthesis: for example, I have a Double Military Magazine, this item has 30 rounds of ammo, but when I want to Salvage it, it will produce two Military Magazines filled with 30 rounds of ammo.
Is there a new option "Blueprint_State_Transfer_Average" that can divide the value of the items in the Blueprint_Supply by the number of Blueprint_Output or Product, and add the obtained value to the number of items in the Product.
For example, Double Military Magazine, this item has 30 rounds of ammo, Salvage it into 2 Military Magazines, according to the calculation (30÷2=15) it will produce two Military Magazines filled with 15 rounds of ammo.
Of course, there may be the following situation:
For example, Double Military Magazine, this item has 29 rounds of ammo, what should I do?
Here is a code that can solve this problem:
Of course, this also applies to combining multiple magazines into one, for example, a 14-round Military Magazine and a 7-round Military Magazine make a 21-round Double Military Magazine.
Beta Was this translation helpful? Give feedback.
All reactions