Ore Merchant

by RedRafe

Adds recipes to trade resource and materials for coins and buy back what you need

Content
1 year, 8 months ago
1.1
1.12K
Cheats

g [Solved] Hand crafting is broken

1 year, 9 months ago
(updated 1 year, 9 months ago)

I don't know how to fix it.
Due to the fact that we have two-sided recipes for basic resources (boards / gears), it does not allow you to craft even the simplest fast belt (edited) - you do not have enough coins.

It's strange that I have not seen the same bug in other mods.

However, we can handcraft parts of the normal recipe separately, and then assemble the final one.
Apparently there is some problem with finding the best recipes in the manual crafting for the available resources.

1 year, 9 months ago
(updated 1 year, 9 months ago)

-del

1 year, 9 months ago

ok, it can be fixed with
allow_as_intermediate = false,
for your recipes (ResourceToCoin & CoinToResource functions)

1 year, 8 months ago
(updated 1 year, 8 months ago)

hello saaadel can help me where i can put allow_as_intermediate = false in 2 methods in recipe.lua file (i not lua devoloper) and thanks :)

1 year, 8 months ago

lib/recipe.lua
---CUT--- #1
local function ResourceToCoin(exchange)
return {
type = "recipe",
name = exchange.resource .. "-for-coin",
allow_as_intermediate = false, -- THIS LINE <<<<<<<<<<<<<<<<<<<<<
order = GetItemOrder(exchange),
---CUT---#1

---CUT---#2
local function CoinToResource(exchange)
return {
type = "recipe",
name = "coin-for-" .. exchange.resource,
allow_as_intermediate = false, -- THIS LINE <<<<<<<<<<<<<<<<<<<<<
order = GetItemOrder(exchange),
---CUT---#2

1 year, 8 months ago

thanks very much for help :)

1 year, 8 months ago

patch for "git patch" terminal command: https://pastebin.com/DRcE1YyD

1 year, 8 months ago

but now if you dont have coins will not use it for craft XD

1 year, 8 months ago
(updated 1 year, 8 months ago)

No, that's a different idea:
Handcrafting only works for common materials/ores, and in case you want to spend coins, the ingredients have to be made separately — explicit recipes (coins => ingredient/product).

So, if you select a some product for handcrafting, it will use common materials only.
a
EDIT: yep, it's not the best solution. But for me, it's convenient. At least it fixed common way via standard/common materials

1 year, 8 months ago

ok i understand what you try to do now thanks :)

1 year, 8 months ago
(updated 1 year, 8 months ago)

it look like mod bug with item in other mod (i remmember before mod work normal untill open more researches happen)

i will try with
ResourceToCoin
allow_as_intermediate = false,

CoinToResource
allow_as_intermediate = true, (i dont think i need make it false (maybe bug from ResourceToCoin i dont know i only test XD))

1 year, 8 months ago
(updated 1 year, 8 months ago)

you know how i can make it like black market 2 have all items you research automatic ? (i know this not one line of code XD i mean is there thing in api get all researched recipes in game ?)

1 year, 8 months ago

Fixed handcrafting for the new release! Thanks for the help & feedbacks

This thread has been locked.