Can someone help me get started with modding


#1

I wand to try modding for myself, and up to the part of replacing already existing voxel items with my own its going fine. But if I wand to make a .smod file so I can share it/have my own crafting recipes, I’m hopelessly lost. (so I’m not sure if this should be modding or coding category) I tried backwards engineering on existing .smod files but I get nowhere with that.

So I was wondering are there template for these things? or tutorials (some I found are 2 years old and presuming I understand where to cut what in the base game files.)
Are there some basic tutorials on these codes?


Where Can I Find My .json files in my game directory?
#2

I don’t know what you did while “backward engineering”, but just to be sure, you can rename those files to .zip files, and then extract the contents which are just text files you can read and edit.

To add things instead of just replacing, you need to create a new folder or .smod for your mod, and at the root of it you need a manifest.json file which lists all your files and how they will be read (if they will overwrite or just add content to existing files)


#3

“backward engineering” take something that is working and pick it apart to learn from it.

I took 8BitCrab’s Rune Mod: and opened it up. Replaced .qb files and the image with those of my own. I think I renamed all the references that was used in the original files to those of my own and I think something in there is not going right. When I try to run it. it will crash the game, the error log tells me there is still something referring to the original mod.

And besides that he has like 8 items and I am trying too ad one. He uses the carpenter and mason. I intent to use the herbalist. I would need to do some trimming but I have no idea how and where…


#4

first off, while i don’t mind you using my mod as a base, next time i would appreciate if you asked me first.

instead of using my mod as a base, i would suggest taking a look at the startermod, the starter mod was actually made with the intention of the user replacing names/images/etc. so i think it would be a good place for you to start :slight_smile:


#5

Thanks that was what I was looking for!
Sorry thou, :sweat: I do not intent to share stuff based on your work, just waned to see and learn from it.


#6

no problemo, i look forward to seeing what you make!

no worry’s mate, i don’t care if people use my mods as a base, i just prefer to know before they start using it.


#7

@8BitCrab could you help me out a bit more? I think I am doing great up to the recipes part…:cold_sweat:

The tutorials sais (rather trolling) Try and ad in a new recipe. So I copied the sample_recipe_1.json (that is for the piggyback that comes with the tutorial) And name the copy: test_recipe.json. I have changed all the reverences to the sample object that I wand to implement.

but I think I need to put test_recipe.json somewhere in to recipes.json as well. right?

here I the item btw, mini cypress …saplings. XD


#8

hmm… sorry, but i’m slightly confused…

whats the problem? the recipes aren’t showing up in the crafters recipe list, or…?


#9

the tutorial has 2 objects and 1 crafting recipe. Ad the end it ask me to make a new recipe. so I did, but it does not show up in the carpenters crafting UI.

So I looked ad the one that was working and I saw that in recipes.json it was missing the second file (?)

{
“craftable_recipes” : {
“furniture” : {
“recipes” : {
“sample_recipe” : {
“recipe” : “file(sample_recipe_1.json)”
}
}
}
}
}

that sample-recipe_1.json is the working piggybank, I think I need to ad in the new one test_recipe.json (the one that is not working). but I don know how or where.


#10

oh, sorry for my confusion, i’ve just been really tired lately… should probably get some more coffee…

anyways, you can add the test_recipe underneath the sample_recipe. so assuming your recipe is called test_recipe.json, the recipes.json it should look like this,

{
   "craftable_recipes" : {
      "furniture" : {
         "recipes" : {
            "sample_recipe" : {
               "recipe" : "file(sample_recipe_1.json)"
            },            
            "test_recipe" : {
               "recipe" : "file(test_recipe.json)"
            }
         }
      }
   }
}

hope that makes sense and helps :slight_smile:


#11

thanks!, ill try it out.

:coffee: here you go!


#12

I got it, (I think) thanks! After some “infinite loop errors”, vanishing items, CTD’s, a good night sleep with and load of coffee, it finally works!

But what is the .qmo file for? I tried to google it and I think its similar the .qb file… but is it used in anything?
(can I safely remove them?)

And is it possible to craft more items from one recipe… for example one log => crafted into =>4 planks


#13

coffee is always the best solution :wink:

i don’t believe you need the .qmo, at least i’ve never used them…

hmm… i don’t think there is, perhaps @Drotten would know.


#14

The plan is to have a base item made of clay + stone + herb item + log to make 8 "soil "
because I think it will be to expensive to have 5 items to make one decoration.

Soil+ silver ore = silver bell
Soil+ blue berry = bleu berry bush
Soil+ oak log =oak scrub
soil + oak shrub = medium oak tree
(all decoration, none harvestable. )

etc. idk.

Edit, nvm I’m going to turn spoiled food with clay in to 1 soil item XD


#15

The original Qubicle file (not the exported binary)
It’s not entirely necessary, as you can import the .qb, but this is the file as originally saved by the creator. It may contain additional models, as you can export individual parts to qb…


#16

It’s possible, just add all the items you want to have crafted within the produces array for the recipe. For example, when creating a recipe that’s supposed to produce 4 threads:

   "produces": [
      {
         "item": "stonehearth:refined:thread"
      },
      {
         "item": "stonehearth:refined:thread"
      },
      {
         "item": "stonehearth:refined:thread"
      },
      {
         "item": "stonehearth:refined:thread"
      }
   ]

#17

I really appreciate all the help here! thank you all!

Still have more questions thou :stuck_out_tongue: this time resources and stockpiles

1, Im trying to get soil as a base crafting item for the plants. but I don’t know how to put it in a recipe.
I am thinking something like this? :
{
“uri”: “modname:soil”,
“count”: 1
}
2, How do I set items to go in to the plants stockpiles?
I thought it did with tags… but its seems also to be for crafting… I would like to have items go in to the plants stockpiles.

  "stonehearth:material": {
     "tags": " plant"
  },

^this will add to available herbs, needed for bandage and healing potions. when the items are added.

Little rose bushes XD


#18

Assuming that you added that among the ingredients and that the item itself exists and is ready to be used, then yes it should work. Could you please give more information of what you’re attempting and where it’s not acting as it should? You don’t get any error messages of any kind? Checking the log file could also help; it may have more information.

It’s actually done through the item component via its category value:

      "item": {
         "category": "plants"
      },

#19

Sorry I just started modding 3 days ago. I have no idea what is what where is goes. 8BitCrab gave me a link too the starter mod tutorial and I worked from there on. So its not much of a case its not working, it more lack of knowledge on my part. XD
Too answer the questions.

I don’t think I have it as an ingredient, how would I add that and where?
The soil does already work in the game.(it has a working voxel/can be crafted and be placed in a stockpile.)

…And somehow I now mess up my plants. all “iconic” are broken => invisible… the cypress is completely invisible even when placed the roses do show up when placed… and I have not touched the -iconic lines /files.

Is there no place where the code is explained … I feel like I’m just poking around in the dark wasting my time comparing code from the base game to mods and the tutorial and just browsing post here on the forums.
Do you need a degree in java or something similar?

Sorry for ranting but this is really frustrating.


#20

i had this happen with my runes mod firepit, and it turned out that i just had accidentally capitalized a letter in the .qb's name…