Jump to content

Is there a way of making my character craft everything for one item less?


Recommended Posts

That's pretty much all I want to do for my character. So for example an alchemy engine which is normally 2 electrical doodads, 4 boards and 2 cut stone would be reduced down to 1 doodad, 3 boards and 1 cut stone, or a pickaxe would be only 1 twig and 1 flint instead of 2 of each. I know it's possible because I used to have a character mod with this ability, but it vanished from the internet and I can't remember how it was done. I just want to know what the line is, to put into the character prefab.

Any help would be appreciated :)

Link to comment
Share on other sites

I found it from builder.lua:

inst.components.builder.ingredientmod = 0.5

Add this line to your character and your character will craft everything for half price.

For 'only' one less, will be very hard because it has to be searching every ingredients from recipes.

It would work like you didn't intended for sure, like recipe that needs lots of ingredients, like Rabbit Hutch(20 carrots) or Glossamer Saddle(48 butterflies) will drastically discounted (to 10 carrots and 24 butterflies respectively), and this line will render Construction Amulet to not work at all - because already 'ingredientmod' is halved (though you can edit amulet.lua if you want to use both).

but this is the easiest way for now I think.

if you think half seems too OP, you could edit value to be like 0.66 or 0.75 but as game logic does round up, it will not affect ingredients that needs 2 or less (or 3 or less if you chose 0.75), because 2 multiplied by 0.66 is 1.3333, which will be rounded up to 2 again.

Again, make recipes require only one item less from every ingredients is hard to code(not impossible?), but I can't think of it now.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...