Little help with my first mod: Abacus

Hey all,

I have delved and dug through the internet and canibalised several mods and got something my voxelmodel in the game.
However it has a few issues.

-1 Placement. But I found a post with maybe a solution. [Solved]
Thanks to : VoxelShop (Voxel-Editor)
But you have to Check Set Orrigin

-2 When opening the Carpenters Workshop the Abascus shows in the right side pane of the UI
but this maybe because it is at the top of the list.

-3 Brings me to my third problem. It is on top of the list out of boundaries and can’t see it without a
search. It is buildable and placeable. Not interactable with yet. (I haven’t even looked at that part
yet :slight_smile: ) edit: what I meant I wanted it to show in the ‘building parts’ section of the
workshop.

-4 While reading through I though an ‘index.json’ was needed with every mod, but I have seen
mods without?

-5 It was also supposed to be a level-less item, I changed it (in the code) but it still requires a level 1
Carpenter. How can I change level requirements?

-6 Through some bug in my files, it is only stockpiled when a stockpile is set to All. It is’t regarded
as furniture or decoration?

Can somebody check my mod and tell me what I did wrong? (or different)

abascus

edit: with fixed placement, name and a typo in one of the files
abacus.smod (24.7 KB)

Thanks a lot in advance!

Well, for starters, it’s called an abacus, not an abascus. :smirk:

@Averest Great. Wanna know how many times I corrected abacus to abascus, thinking it was how it was written? :crazy_face:

1 Like

Oh gosh! :rofl: I’m so sorry!

@Averest Fixed it though :writing_hand:

1 Like

Hello @Cursedth,

I only had a quick look, but here is some help which might be able to help you forward.

I’ve never worked with VoxelShop, instead I use MagicaVoxel.
Glad to see you were able to solve it - just incase you run into problems down the line, this is how I do it:

In your recipes.json, you need to add the name of the category the recipe will be placed in.
You want it to be placed in Building Parts, so either add
"name": "i18n(stonehearth:jobs.carpenter.recipes.building_parts_name)", or
"name": "Building Parts",; the first one is highly recommended!

  "craftable_recipes": {
    "decoration": {
      "name": "i18n(stonehearth:jobs.carpenter.recipes.building_parts_name)",
      "recipes": {
        "abacus": {
          "recipe": "file(abacus_recipe.json)"
        }

In order for the recipe to be displayed in the crafting-menu, you must also set "manual_unlock": false, in your abacus_recipe.json.

I don’t got any “index.json” in my mod, so this is not required.

Remove "level_requirement" : 1, from your abacus_recipe.json and the recipe will not require any level.

In order to have it be stored in e.g. the decoration-stockpile, edit your “category” and “material_tags” in abacus_ghost.json. It could look something like this

"entity_data": {
    "stonehearth:catalog": {
      "display_name": "i18n(abacus:entities.decoration.abacus.display_name)",
      "description": "i18n(abacus:entities.decoration.abacus.description)",
      "icon": "file(abacus.png)",
	  "category": "decoration",
      "material_tags": "wood crafted decoration stockpile_decoration"
    }
  }

You should also remove your material_tags in abacus.json; the one you got right now makes no sense to me :slight_smile:

Notice how I changed your reference of display_name and description to rely on abacus instead of abacus_ghost?
This is due to the fact that abacus_ghost does not exist in your locales. So that’s just a hint at that you should either do what I did, or add abacus_ghost in your locales :wink:

This is because it is outside the categories. So it is there “floating”.
To fix this, go to your recipes.json and change the “decoration” to the category you want it to fit in the crafter window. Look at the file of the real carpenter recipes to see the names of the categories in the code, it must match exactly else it fails.

This is because you locked your recipes. Remember those recipes that unlock only through quests, like the fountains for tier 2, or the gongs? Yep, like that. At your abacus_recipe.json you must remove the “manual_unlock”

No, a few things are listed in indexes, and so a mod must insert their thing in the list too. For your mod, this “insertion” would be simple the recipe list. That is already recognizing your object.

Because you are asking for a level at the abacus_recipe.json. Just go there and erase the line or change it to ask a level 0.

This is because you are using the material tags wrong. You have “material_tags”: “some wood, metal bars and marbles.”
That is not how they work, you can’t simple right a text there, you must add very specific tags, separated by spaces. The stockpile will read those tags and find the right category. Just look at an item that goes into the category you want and copy its tags.

You should also remove the “client_init_script” from your manifest, it is trying to load an script that simple does not exist in your mod. Also remove the “decoration:index”, it is also trying to load a file that does not exist.
The “render_info”: {“scale”: 0.6 }, inside your ghost is outside the “components” section, and as such, being ignored. If you want it to work, so you can have the model in a different scale, you must move this code to inside the “components”.