Requesting Help Getting Started

Hello. I will preface this by saying that I have a minimal understanding of coding.

The only mod I have enough desire to put effort into is basic. I want to add a few more colors to the wooden material section in the building editor, preferably to all applicable categories (slab, floor, road, wall, etc). With that said…

Where do I start?

Is there some kind of a template file for a mod? What file type(s) can be used? Is Notepad++ sufficient for what I am looking to accomplish or do I need something else?

Thank you in advance for any assistance.

2 Likes

I believe there is a starter mod kinda thing. @BrunoSupremo i imagine you know the answer to this?

2 Likes

Yes, there is the github with a two starter mods stonehearth (Gareth Loremaker) · GitHub
But they are kinda outdated.

There is a mod that do this already, so it should be a good place to start.

For this you will use only .json files, which are pure text and so any text editor will work. Notepad++ would be good enough for it.

4 Likes

I’ve seen the mod that adds the terrain colored blocks (I was planning on basing my mod off of that one), however I was unable to edit the file as it was an .smod file (which stopped me from repurposing it, leading me to ask on here). Are you referring to that one or another?

Edit:
Oh I also meant to ask the following: considering how basic this mod will likely be, what, if anything, would need to be changed between game version updates to keep it functioning?

a .smod is just a renamed .zip, so you can easily open it by changing the file extension to .zip and then unzipping it :merry:

4 Likes

Probably nothing. The file would be just a list of materials and their colors, plus name of the color. If something changes requiring an updated, it would be a super simple fix.

2 Likes

Oh.

So all I have to do is rename the file extension from .smod to .zip and I’ll be able to use the contained file(s) as the basis for my mod. Well now I just feel silly. Thank you for clearing that up.

Is the reason that they are made into .smod files just for ease of transferring them and using them without needing to unzip them?

Good to know, thank you for the information.

1 Like

I honestly don’t know why they use a special extension. They’ve been smod files as long as I can remember. Perhaps @sdee knows the history behind the decision.

1 Like

Sorry for the belated follow-up but I got a bit distracted by some other stuff. In any event I wanted to see how a few colors looked in the game so I changed the files of the mod I based it off of and attempted to load it but its entry in the mod menu is greyed out and listed as “out of date.” Since I can’t activate it I am once again at a loss and would like to request help.

In the manifest.json file, what is the version number?

3 Likes

Under the name bit? Says version 1. I had assumed it referred to the version of the mod not the version of the game for which it was intended to be used so I left it alone. What should it be?

It should be 3! Hopefully that fixes the issue.

2 Likes

Just tried it out and it worked, thank you very much for your assistance! :jubilant:

2 Likes

Glad to help! I made the same mistake with my own personal mod to add new colors as well! :stuck_out_tongue:

2 Likes

I noticed that the added colors don’t have names when I hover over them like the default ones do. Are there any limitations to the characters that can be used or did I mess something up in the locale file?

Hmm. Not that I’m aware of. “#9966cc”: “Amethyst (Luffly)” is an example of how one of mine is named, shows up as Amethyst (Luffly) when hovered over. It would be hard for me to tell if you’ve made an error without actually seeing the file itself. :sweat:

2 Likes

Specifically what it shows instead of a name is “terrain_colors:data.build.building_brushes.colors”. "#3D3834": "RV1(EWS)", is an example of one of my colors and its name. Considering I’m currently just trying colors out to figure out which I want to use the name is pretty nonsensical.

Also the part leading up to the list is as follows

{ "data" : { "build": { "building_brushes": { "colors": {

Although DIscourse isn’t showing the spacing correctly.

In the manifest.json file, have you renamed the mod to something different? Or have you kept it the original name “terrain_colors”?

1 Like

As in the "name" : "Extra Wood Shades", part? I, once again, assumed that that was mod info and not something that would affect its function. :confused:

Assuming that is what you were referring to, I should presumably change it to "terrain_colors", right?

You can do that, yes. Or in the building_brushes.json file, in the data folder, replace all the “terrain_colors” with your mod name. "display_name": "i18n(luffly_colors:data.build.building_brushes.colors.#faf0be)" is an example of mine. My mod name is Luffly Colors.

2 Likes