Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding reaction to repeat & renew reagents as products  (Read 482 times)

FantasticDorf

  • Bay Watcher
    • View Profile
Modding reaction to repeat & renew reagents as products
« on: November 06, 2017, 06:29:56 am »

This suggestion covers some reactions for workshops that i think would allow additional depth in the functions that players can currently do, and provide a shortcut to long lines of reaction code that modders put into their newly inserted code to try and cover these functions.

Repeat

[REPEAT_REAGENT:A] put into the products category would simply recreate (minus decorations) the product that was put in, which can be used for multiplicative crafting or "craft 10 of these" orders at a workshop all at once.

I assign for instance a weaponsmith to 'copy a weapon' from a stockpile of invader gear, they'd trot over, get a weapon & then go pick up a metal bar (with details assigning which one to use if not referencing directly from the material its made out of) and recreate that weapon on the spot without actively defining the civilisations ability to craft those weapons, just one-off's like obsidan swords. And this can stretch out to things like clothes & armor obtained from sieges or rare example artifact pieces

A similar function is used in how Meph created reactions to reverse engineer weapons, the proposed reaction function is quite similar but with far less work & just one tag that isn't discriminatory.

Repair

[REPAIR_OBJECT:A] after the reaction is created, it will take the adequate materials by backwards crossreferencing [GET_MATERIAL_FROM_REAGENT] on the named reagent to call upon a matching base material or a fixed into the reaction product as being nessecary to maintaining & potentially improving the quality of a broken or damaged product.

In the given example you can't fix iron with copper bars, so that would be dependent on crossreferencing a metal object, but you could patch up & repair cloth clothes with yarn silk or thread from your used clothes pile. In which case you would leave [REPAIR_PRODUCT] blank instead of assigning a reagent as to accept what is put into the reaction as necessary. [PRESERVE REAGENT] would also stop the original object being consumed.
Logged