Startermod_basic updated with weapons, armor, lights, and particles

not to bring back a dead thread or anything but im trying to use this mod to add in a sword to the game. its not working out though. is there a source i can look at that has each thing in its own serperate folder or something. Like 2hd and all the various codes and folders that just refer to a 2h swords

i can’t review the stream :frowning:

Here :wink:.

Is this still relevant for creating mods?
I’m considering working on some Windows for my own tiny little mod at the side of everything

image

No problems it was just extra folder that messed it up :slight_smile:

When importing a Window from the base game why is all colors wrong ?
It seems to have to do with the palette but no idea how i would get the correct one if even possible?
Should i try a different software for moddeling the QB files?

Seems VoxelShop does it better

Yes, when I worked with MagicaVoxel I stumbled upon this as well. It is indeed the palette - the software imports the model and changes the color to the current active palette instead of getting a palette from the model. There might be a way to fix that but I couldn’t find it, so I just started using other voxel editor

Do you know a guide on how to make something craftable?
atm i’m working on a window and i made so i can import it to game and based it of the normal tall window but not sure where and how i make it into a window that i can put on a house or how to make carpenter to be able to actually craft the item.

image

These is the only files i touched so far and just changed all paths to be for my own window i made

Guess i’m gonna research pawels lostems mod for clues :slight_smile: seems to be something with the Jobs Folder with recipes is my guess ?:slight_smile:

To be able to be put on walls it needs to be a “fixture”. Fixtures are the objects that can be built on building, on walls and such. If you cloned the default Stonehearth Tall Window it is probably already set up as a fixture, no worries.

However it will only show up on the Building menu if you add a recipe for it. So try going to stonehearth/jobs/carpenter/recipes to understand how recipes work. Copy the tall_window_recipe from the carpenter and edit it to fit your liking. Keep the same Stonehearth structure in your mod for easier organization/learning, but you can make your own file structure to be shorter if you feel comfortable.

To add the recipe in game you’ll need two new files: the recipe that you just got and made an edited copy and a Mixinto for the recipes.json of the crafter you want to be able to craft it.

On that mixinto, you’ll need to do it something like this:

{
   "craftable_recipes": {
      "category": { <-- The Category you want it to be in, check the crafter's recipes.json for available categories.
			"recipes": {
				"my_window": {
					"recipe": "file(my_window_recipe.json)"
				}
			}
        }
    }
}

Then add the mixinto on your manifest and make it mix into the crafter’s recipes.json.
To do so, you’ll need to add a line like this to your “mixins”:
"stonehearth/jobs/crafter/recipes/recipes.json": "file(mixins/crafter_recipes.json)"
The first referred file is the one the mixinto will mix into and the second one is the file that will be mixed, from your mod. (Replace “crafter” with the one you use)

So you will have a mod with basically:

  • Your window (the 6 files you already have)
  • A recipe file that crafts your window
  • A recipes mixinto to add your window recipe to a crafter

The manifest only needs your window and the mixinto, you don’t have to declare recipes.

This should work for a basic mod that adds an item and how to craft it :slight_smile:

2 Likes

Thank you gonna read it through and see if i succeed :slight_smile: :heartbeat:

1 Like

Any tips on this?
Does Voxelshop save the model in a different origin or something since its not correct?
I did not tweak any values from the standard tall window

image

image

Also i can see window while designing but not found it in carpenter :S and also why is the name of the item like this?

image

Some code
tall_window_banto_recipe.json

{
“type”: “recipe”,
“effort”: 20,
“work_units”: 3,
“recipe_name”: “i18n(startermod_items.jobs.carpenter.recipes.tall_window_banto_recipe.recipe_name)”,
“description”: “i18n(startermod_items:jobs.carpenter.recipes.tall_window_banto_recipe.description)”,
“flavor”: “”,
“portrait”: “/startermod_items/entities/construction/sample_window_tall/sample_window.png”,
“workshop”: “stonehearth:carpenter:workbench”,
“ingredients”: [
{
“material”: “wood resource”,
“count”: 1
}
],
“produces”: [
{
“item”: “startermod_items:portals:tall_window_banto”
}
]
}

More code
recipes.json

{
“craftable_recipes”: {
“building_parts”: {
“recipes”: {
“my_window”: {
“recipe”: “file(tall_window_banto_recipe.json)”
}
}
}
}
}

Update
Carpenter or someone crafted it i never saw it queued up tho and i never saw it in carpenters crafting menu :smiley: struggle but wanna learn

Actually no one crafted it i had few spawned in the world that’s why

1 Like

For voxelshop exporting, do not follow the recommended options. Check only the “origin at center” and “right hand” options, while making sure your model is exactly at the same place as the one you are basing it from

3 Likes

Yes, I’ve seen people talking about how you have to save it on a specific way when using Voxelshop because it doesn’t work with matrixes like Qubicle does, I’m afraid I’m not sure how to do it tho :frowning: You’d be better off searching the forum about saving files on Voxelshop or talking to someone that uses it :frowning:

As for the rest… You need to create a localization file to assign the localization keys to the recipe name and description. On the root folder of your mod create a new folder called “locales” and inside it create a .json file called “en.json” (for english localization)

Then you need to create the correct text strings.
For the ones you shared, should be like:

{
   "jobs": {
      "carpenter": {
         "recipes": {
            "tall_window_banto_recipe": {
               "recipe_name": "Banto's Tall Window",
               "description": "A very nice window!"
            }
         }
      }
   }
}

If you use SHED - Stonehearth Editor (can be found in Stonehearth’s folder, inside the Shed folder) you can easily edit these strings without having to manually edit the localizations files! I really recommend it :slight_smile:

As for the recipe not being on the carpenter list, your recipe file seems fine. But have you added the “recipes.json” as a mixinto to the carpenter’s recipes.json? And is the recipe in the same folder? The recipe needs to be in the same folder of your mixinto otherwise you need to write the full path on the mixinto, like this:

“recipe”: “file(/startermod_items/jobs/carpenter/recipes/tall_window_banto_recipe.json)”

for example

2 Likes

Thanks once again gonna read it through and thanks @BrunoSupremo aswell for the export settings :slight_smile: gonna see if its correct with that now

My bad; just noticed that my description of the localization file only includes the recipe name and description!

If you look into the .json files of your window itself, it should also contain localization keys for their in-game name, description and such.

Then again, using SHED makes editing localization keys much easier :slight_smile:

1 Like

image
This is how the recipes folder looks

not sure about what the mixinto thing is and how i do it really. This is the first time i really try to do this so noob atm :smiley:

the EN file in Locales looks like this now

{
“jobs”: {
“carpenter”: {
“recipes”: {
“tall_window_banto_recipe”: {
“recipe_name”: “Banto’s Tall Window”,
“description”: “A very nice window!”
}
}
}
}
}

is it perhaps inside the manifest file?

mine looks like this atm after removing all of the other startermod_items items from it now

{
“info” : {
“name” : “Startermod Items”,
“namespace”: “startermod_items”,
“version” : 3
},
“default_locale”: “en”,
“aliases” : {

“sample_window_tall” :
“file(entities/construction/sample_window_tall/tall_window_banto.json)” },

“mixintos” : {
}
}

SHED
want to learn this later also but i have now clue how to use it :slight_smile:

@Banto
to add recipes to the stonehearth job recipe through mixins:
job recipe json file first lines:
{
“mixins”: “stonehearth/jobs/carpenter/recipes/recipes.json”,
“craftable_recipes”: {

and for the carpenter description json file:
{
“mixins”: “stonehearth:jobs:carpenter”,
“crafter”: {
“recipe_list”: “/(your_mod/your_path)/recipes.json”
},

should work xD

1 Like

Gonna try tomorrow my head is dead so late now :smiley: thanks for the tips

is there some guide to SHED?
it’s kinda of confusing what folder i should open and it always throws strange errors and i would prefer to not have to uncompress all other mods the /mods folder just the one i work on

image

image

I think you can open any folder you want that has mods inside. If not, set it to the main stonehearth/mods folder (and move your mod to there) while editing.

1 Like