Jump to content

Want to make my first mod for testing. Just can't find where the crafting recipes in data folder are!


Recommended Posts

/\ title

I'm kind of getting the hang of it so far, by figuring out what is in what folders and what does what in each editors but... I need to find the crafting recipe program, so I can open that in Tiled editor and create harder recipes. I want this to be my first mod. In future, as I create bigger mods, I want the harder recipes to be part of a really big one (bigger than Up & Away), but right now, as a beginning, I want to set the current items for crafting (In the big mod I'll subtitute some with new items) and change the recipes to making some things, may be slightly easier (in a way) but mostly harder (By slightly easier in a wat, I mean like: A normal Chest would require instead of 3 boards, but 2 boards and 7 gold, or something like that).

 

So, can anybody tell me where in data folder I can find the crafting recipe program, so I can open it with Tiled editor and edit the recipes?

 

The main reasons for this mod are going to be to see if it works and especially to see YOUR feedback on it, to say how difficult the recipes are (The craftables will require not up to 3 but up to 9 different kind of items to craft, as far as I'm concerned).

 

I know that It'll all seem like that many of the required items in the recipe screen for a certain craftable might seem off window, but I'll look deeper into changing the size of of the items required that are shown in the recipes.

Link to comment
Share on other sites

Okay, I just found out (thanks to the cheat code) where the functions for the recipe ACTIONS are (data/scripts/components/builder.lua), but I haven't located where the recipes themselves are. I once watched a tutorial video and found out how to change the recipe of a Science machine, but I can't find that video anymore.

 

AND I realized I need to use sublime editor for this...

Link to comment
Share on other sites

"trinket_6"

Thanks, all tho I found it out myself again as well XD

 

So now I'm near the end of my mod. I've looked at other mods and there is just one thing I don't understand:

 

What is .tex file for? Is it a texture? A program code? How do I open one and why do I need one?

Link to comment
Share on other sites

Thanks, all tho I found it out myself again as well XD

 

So now I'm near the end of my mod. I've looked at other mods and there is just one thing I don't understand:

 

What is .tex file for? Is it a texture? A program code? How do I open one and why do I need one?

It is a texture file. The one in the root of your mod folder would be used for the mod icon shown on the mods screen (the path to the icon texture is set in your modinfo.lua). It's not necessary unless you want an icon on the mods screen.

See this thread or any other thread dealing with converting png files to tex files. Also check out the Sample mods.

Link to comment
Share on other sites

So I don't need it unless I want an icon, right? Okay, then I'll check if my mod works, and doesn't crash the game... All thou it probably will because I set the Living log as a craftable item...

 

Okay, so I ran the mod and it crashed the game. I checked on constants.lua file cause may be something there has to do with something in the game, idk... But all I did is:

 

I added more requirements to many of the recipes (up to 9 different requirements), changed some recipes, replaced recipes into different Tabs (and yes, I didn't just cut and paste, but also I did rename like SCINECE section to MAGIC for the specific item and that's it!

 

Could the error accur because the items require trinket items? Cause I did use Frazzled wires in some recipes and melted marbles for one of them...

 

The error showed me 93 so I thought it must be in line 93. I checked and there was a bit of a wrong symboling, but when I tried the mod again, it showed the error again! This is the error:

10cn5gp.png

Link to comment
Share on other sites

There is an unexpected symbol near ',' on line 93 of modmain.lua.

Can't help you any more than that without seeing your code.

Well, here's my line 93:

 

Recipe("purplegem", {Ingredient("redgem", 1), Ingredient("bluegem", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO)

 

I don't see any errors! The only thing I did is put it in magic section and add it to the tab (I also did this to Nightmare fuel and Divining rod).

Link to comment
Share on other sites

Well, here's my line 93:

 

Recipe("purplegem", {Ingredient("redgem", 1), Ingredient("bluegem", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO)

 

I don't see any errors! The only thing I did is put it in magic section and add it to the tab (I also did this to Nightmare fuel and Divining rod).

Post the lines before line 93 as well.
Link to comment
Share on other sites

At me recipes (+ other locals) looks like that (try these ones):

 

local Ingredient = GLOBAL.Ingredient

local RECIPETABS = GLOBAL.RECIPETABS

local STRINGS = GLOBAL.STRINGS

local Recipe = GLOBAL.Recipe

local TECH = GLOBAL.TECH

 

 


local purplegem = GLOBAL.Recipe("purplegem", { Ingredient("redgem", 1), Ingredient("bluegem", 1), }, RECIPETABS.MAGIC, {MAGIC=2})

Link to comment
Share on other sites

Holy god for first time try only with that, if not working, then rewrite my one at your one and them do same thing at the others.

And if not, then just PM your modmain.lua to me and I'll rewrite it (the first version, not rewritten!)

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