Jump to content

Different crafting [SOLVED]


Recommended Posts

Hi guys!

I need a little help. Im making a mod, but its doesnt working. so i want to make a different recipe to the smelter (in the hamlet dlc). For testing i made a different recipe to the science machine (and its worked), but if i change the name for "smelter" its doesnt working (probably becuse its a DLC stuff)

Here are the mod i made:

So pls help me!

another_craft.zip

Link to comment
Share on other sites

You'd be surprised how often I find out halfway through helping someone, that their mod substitutes several original game files with their own copies ;)

I see what you mean with "smetler". Regardless, it would help if you could attach a zip of your mod so I can investigate.

Link to comment
Share on other sites

On 30.6.2019 at 8:30 AM, bizziboi said:

He did in his original post?

Sorry. I was juggling a bunch of posts when I was answering this.

The prefab name for the smelter is "smelter", not "smetler", even though some of the code has the word misspelled. The original Recipe-call that adds the Hamlet recipe for the smelter looks like this:

Recipe("smelter", {Ingredient("cutstone", 6), Ingredient("boards", 4), Ingredient("redgem", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO, RECIPE_GAME_TYPE.PORKLAND, "smetler_placer")

Notice the prefab name is "smelter" and that you need to include the DLC and placer parameters, as well.

Link to comment
Share on other sites

-.-
OMG i said i tried either way without spelling good, without spellig bad, and btw if you scroll down you can see "--some tests:" and under it all the things is tested and DONT WORK
 

SO WHAT DONT WORK:
 

Recipe("smetler", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO)
Recipe("smelter", {Ingredient("cutstone", 6),Ingredient("nitre", 4),Ingredient("redgem", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO)
Recipe("smelter", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO, smetler_placer)
Recipe("smelter", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO, smelter_placer)


AAND this is crashes:

Recipe("smelter",  {Ingredient("boneshard", 1),Ingredient("nitre", 2),Ingredient("feather_thunder", 3),Ingredient("goldnugget",5)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, RECIPE_GAME_TYPE.PORKLAND, "smelter_placer") 

and says that:crash.thumb.png.1dc9f5eb18bf8aaf03e2e4cde6d9d5ec.png

and this is ALSO crashes:

Recipe("smelter",  {Ingredient("boneshard", 1),Ingredient("nitre", 2),Ingredient("feather_thunder", 3),Ingredient("goldnugget",5)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, RECIPE_GAME_TYPE.PORKLAND, "smetler_placer") 

and says that:
crash2.thumb.png.fde4af506244016dc76947494d3f4167.png


SO now when everyone knows everything, NOW help me

Link to comment
Share on other sites

3 hours ago, asd988 said:

-.-
OMG i said i tried either way without spelling good, without spellig bad, and btw if you scroll down you can see "--some tests:" and under it all the things is tested and DONT WORK
 

SO WHAT DONT WORK:
 


Recipe("smetler", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO)

Recipe("smelter", {Ingredient("cutstone", 6),Ingredient("nitre", 4),Ingredient("redgem", 1)}, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO)

Recipe("smelter", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO, smetler_placer)

Recipe("smelter", {Ingredient("cutgrass", 8),Ingredient("spoiled_food", 4),Ingredient("log", 4)}, RECIPETABS.SCIENCE,  TECH.SCIENCE_TWO, smelter_placer)


AAND this is crashes:


Recipe("smelter",  {Ingredient("boneshard", 1),Ingredient("nitre", 2),Ingredient("feather_thunder", 3),Ingredient("goldnugget",5)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, RECIPE_GAME_TYPE.PORKLAND, "smelter_placer") 

and says that:crash.thumb.png.1dc9f5eb18bf8aaf03e2e4cde6d9d5ec.png

and this is ALSO crashes:


Recipe("smelter",  {Ingredient("boneshard", 1),Ingredient("nitre", 2),Ingredient("feather_thunder", 3),Ingredient("goldnugget",5)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, RECIPE_GAME_TYPE.PORKLAND, "smetler_placer") 

and says that:
crash2.thumb.png.fde4af506244016dc76947494d3f4167.png


SO now when everyone knows everything, NOW help me

Try putting the string in the spoiler below at the top of your modmain.

Spoiler

local RECIPE_GAME_TYPE = GLOBAL.RECIPE_GAME_TYPE

 

Link to comment
Share on other sites

14 hours ago, asd988 said:

-.-
OMG i said i tried either way without spelling good, without spellig bad, and btw if you scroll down you can see "--some tests:" and under it all the things is tested and DONT WORK
SO WHAT DONT WORK:
SO now when everyone knows everything, NOW help me

Chill out, m8. We're spending our free time trying to help you here. There's no reason for that kind of attitude. You aren't able to get it to work, and therefore ask other people to help you, but they have no obligation to do so. I did see your tests, but so many small things can be wrong, and none of the tests included the RECIPE_GAME_TYPE.PORKLAND part, which means that the two tests where you tried to add the placer parameter, you were actually passing it the placer where the game type parameter should be. You cannot omit parameters to the left of the right-most parameter you're using, which in this case was the placer parameter. When using a function you're not familiar with (or that has a lot of parameters) always check the function declaration to see the list and order of parameters, to make sure you're using it right.

That said, Portmanteau is right. That line (if put at the top of your modmain.lua) should fix the crashes you got, provided you use the last line of code you posted, where the placer is correctly named "smetler_placer"). You can't really argue with the original game code (which I posted). The 'name' parameter is spelled "smelter" (right, dictionary-wise) and the 'placer' parameter is spelled "smetler_placer" (wrong, dictionary-wise, but right for you).

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...