[WIP] Adventurer's Tavern items

Hey there! I just got this game recently since I love city builder games especially with the idea of including my own models. Used StoneVox for these since I didn’t have any voxel programs that let me export as qb. files but here are a few images of the models for my tavern build so far.


I know how to put them in the game, but I’m not sure how to change the item display name, in the _ghost.json there is this line which I’m presuming would be where the name and the description goes? Which part of it should I edit so that it just displays the name as “bar shelf” and description as “Got to have some where for those cups.”

  },
  "unit_info": {
     "display_name": "i18n(stonehearth:entities.decoration.bar_shelf.bar_shelf_ghost.display_name)",
     "description": "i18n(stonehearth:entities.decoration.bar_shelf.bar_shelf.description)",
     "icon": "file(bar_shelf.png)"
8 Likes

Nice Idea and great Moddels, i like the shelf :).

  },
  "unit_info": {
     "display_name": "i18n(stonehearth:entities.decoration.bar_shelf.bar_shelf_ghost.display_name)",
     "description": "i18n(stonehearth:entities.decoration.bar_shelf.bar_shelf.description)",
     "icon": "file(bar_shelf.png)"

if you want to rename it change the text in the breakets like
},
“unit_info”: {
“display_name”: “i18n(Bar Shelf)”,
“description”: “i18n(Got to have some where for those cups)”,
“icon”: “file(bar_shelf.png)”

thats the easiest way to change it.

if you want the mod to be “translation friendly” you have to make an en.json or some such thing, but i dont know anything about i18n so i’ll page @Wiese2007

P.S. welcome to the discourse @dragoonwys :smile:

2 Likes

The easiest way would be to add the text directly to the name and description, so that it looks like this:

  },
  "unit_info": {
     "display_name": "bar shelf",
     "description": "Got to have some where for those cups.",
     "icon": "file(bar_shelf.png)"

However, it’s recommended to create your own locale file that has those texts within them and use an i18n path to refer to each text.

First of all, the MY_MOD/locales/en.json file has to be created. It will contain any and all text that an "i18n(...)" is looking for.

Here’s an example of an en.json file that would work for your bar shelf:

{
   "entities": {
      "decoration": {
         "bar_shelf": {
            "bar_shelf_ghost": {
               "display_name": "bar shelf",
               "description": "Got to have some where for those cups."
            }
         }
      }
   }
}

It will work similarly for all other text, just make sure to add the text to the locale file when needed.

For the game to register that you have a locale file in your mod, you’d have to go into your mod’s manifest and add a "default_locale" entry, like so:

{
   ...
   "default_locale": "en",
   ...
}

You’d also have to edit bar_shelf_ghost.json so it can find the correct localized text. To reflect the en.json example above, it’s going to look something like:

  },
  "unit_info": {
     "display_name": "i18n(MY_MOD:entities.decoration.bar_shelf.bar_shelf_ghost.display_name)",
     "description": "i18n(MY_MOD:entities.decoration.bar_shelf.bar_shelf_ghost.description)",
     "icon": "file(bar_shelf.png)"

There’s only a few differences to this and what you supplied. The obvious change was that, instead of stonehearth, you’re going to have to write in the name for your own mod; since that’s the one that has the correct locale file. The other change was to add a missing “_ghost” string to the description path (you could have it without “_ghost”, but then the locale file has to be changed to reflect that).

Hope it helps!

4 Likes

Ah I see, yeah this does help! Thank you very much~ ^^

Oh so that’s what an en,json is used for. Just one more question since I was trying it out and I’m really beginning to learn about coding, I can add the “default_locale” entry anywhere in the in the mod’s manifest?
I have been trying to put it in but it causes the added items to disappear from the craft screen when they were there before, maybe I placed it in the wrong place.

it should at the beginning :wink: directly under the version number

{
“info”: {
“name”: “patrol_mod”,
“version”: 2
},
“default_locale” : “en”,

"aliases": {
1 Like

It works now, thank you~ >u<

That’s one place to put it, but it doesn’t have to be there. :slight_smile:

It could be anywhere, as long as it’s not within any object. For example, it could also look something like the following:

{
   "default_locale": "en",
   "info": {
      "name": "my_mod",
      "version": 2
   },
   "aliases": {
   }
}

or

{
   "info": {
      "name": "my_mod",
      "version": 2
   },
   "aliases": {
   },
   "default_locale": "en"
}

Either will work. It’s common that it’s placed in the way that you showed, @Wiese2007, that’s why we always see it there. :wink:
Also, placing it there makes it easier to follow the structure in the manifest, so it’s to be recommended, but, again, it’s not really mandatory. Just wanted to clear that up!

3 Likes

Ahh I see, thank you for pointing that out. I’ll stick with the recommended option, really new to codes so the ones so playing it safe for now. ^^

2 Likes

And made two more variants for the bar shelves

Here’s how the entire shelf set looks like in game so far.

10 Likes

WANT!!! wantwantwantwantwant!

2 Likes

Very nice models. Keep up the good work! :slightly_smiling:

2 Likes

This hearthling really couldn’t wait for the tavern to be officially opened. He rushed in as I was testing out the counters and stools LOL

11 Likes

I don’t blame him, I can’t wait either!

7 Likes

-stalks for any kind of news or update-

2 Likes

TvT Been a bit on a haitus sadly, got busy hueuhe.
Gonna get back here once things settle!

2 Likes