Soulash 2

Soulash 2

Not enough ratings
How to add settlements to your race
By V0ID
This is a guide on how to create and add settlements to your race in the game.
   
Award
Favorite
Favorited
Unfavorite
Introduction
This simple guide is about creating and implementing a settlement to your modded race.

Before wanting to create a settlement you'll need to create a race. I strongly suggest following Draken's guide on creating a new race before following this guide.

Soulash 2 - Modding a new race by Draken
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3316988156

During the guide I'll be using the Dragonkin race mod from Aly to exemplify and showcase how it was implemented.
Dragonkin Race by Aly
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3137368773

For this guide you'll need:
    - any text editor. I recommend using notepad++ or visual studio code. Any text editor with json liquidators will suffice.
Entities
Before creating and building our settlement maps and workplaces, we need to setup the entities that will be working in these places.

By default all the core races have different entities for each job that the settlement uses:
For this guide we will have an entity that will be able to work on any job, but it is recommended to create entities for each job.

The easiest way to create a new entity is by coping an existing one from the core game. You can do this clicking the in game button in the ingame modding tool.


You can edit this entity stats and details as you see fit, but the most important thing that you need to set is the entity "Allow production" section to what you want this entity to do and the race in the "Humanoid" section.

In this case, we added everything:

And set the race to Dragonkin:

Don't forget to save the entity by pressing ctrl+s or pressing the button on the top of the screen. Now the entity we created should be in our mod folder.
\mods\{your mod name}\entities\{entity name}.json

Extra
For a npc to be able to speak you need to create a conversation file where you'll place all your conversations.
\mods\{your mod name}\conversations.json

I wont go in deep on how conversations go but, this simple json will allow your entity to speak with the player.

{ "conversations": [ { "answer_negative": "I cry your mercy, I cannot help you.", "answer_positive": "Good morrow traveler, do you need something?", "entities": [ "dragonkin_race_Dragonkin_Adult" (your entity id) ], "id": "core_2_begin_1", "options": [ "core_2_directions_1", "core_2_ask_trainer_1", "core_2_trade_1", "core_2_train_1", "core_2_marry_1", "core_2_marry_2", "core_2_exit_1" ], "text": "", "type": "begin_conversation" } ] }


Buildings and location setup
Now that we have an entity that the game can use to populate the settlement, we need to create buildings for the settlement. We start by creating the most important building, the settlement center.

The settlement center is well, the center and where the player will spawn when entering the region.

In the mod folder create another folder and name it buildings. Inside the folder create a json with the name you want to give to your building like this:

In the json we will write the following code:
{ "id": "dragonkin_race_center", "image": 158, "name": "Settlement Center", "occupation": "-1", "produces": [], "race": "34532", "workers": [ 0, 0 ] }

Since we are here already, we can also create a simple building that will be used by our settlement to produce/consume items. Why not a farm?

Create another json that will contain the farm data.

{ "id": "dragonkin_race_Wheat_Farm", "image": 3, "name": "Wheat Farm", "occupation": "dragonkin_race_Dragonkin_Adult", "produces": [ { "entities": [ { "daily": 1, "id": "796" } ], "takes": [] }, { "entities": [ { "daily": 10, "id": "800" }, { "daily": 1, "id": "802" } ], "takes": [ { "amount": 1, "id": "796" } ] } ], "race": "34532", "tier": 1, "workers": [ 1, 4 ], "allow_player": true, "required_entities": [ { "entities": ["797", "3095"], "count": 10 }, { "component": "resting_place", "count": 4 } ], "min_area": 50, "group": "food" }

There are a lot of different building that can be created. Here is a list of all the elements that exist for buildings.

  • id - The building id.
  • image - Index on the tilesheet defined in assets.json. Number from bottom left, going to the right.
  • name - Name of your building. This will be visible in the Editor and possibly for settlement buildings in the game.
  • occupation - Index of entity that should be used when NPC begins working in the building.
  • produces - Defines what this building can produce.
  • produces.entities.id - Which entities this building produces. Use entity ids.
  • produces.entities.daily - How much of this resource is produced daily.
  • produces.takes - What this building needs to consume to produce new items.
  • race - Which race can build this building, use id from character.json.
  • tier - Define the tier of the settlement this building can be built. Unless you define new levels in locations.json, it's a number between 1 and 3.
  • workers - Defines how many workers are in this building. First number defines minimum, second maximum.

Right, now that we have a simple building and a settlement center, we need to assign them to the race, and build them in the ingame editor.

In the character.json on the main mods folder, we will need some new elements on our race.

"settlement": { "carve": false, "center_id": "dragonkin_race_center", (settlement center building id) "road": true, "start_spawn_rate": 0.5, "caravan_image": 275 }

The final code should look like this:

{ "races": [ { "ages": { "adult": 1600, "child": 12, "elder": 2000 }, "base_entities": { "adult": "dragonkin_race_Dragonkin_Adult", "child": "dragonkin_race_Dragonkin_Adult", "leader": "dragonkin_race_Dragonkin_Adult", "recruit": "dragonkin_race_Dragonkin_Adult" }, "description": "The Dragonkin, a formidable and ancient race, embody the majestic essence of dragons in humanoid form. Towering in stature, with scales that shimmer in a myriad of iridescent hues, they command an imposing presence. These beings are gifted with a regal and otherworldly aura, reflecting their deep connection to the primordial forces that govern the realms.\n Physically, Draconics possess a blend of dragon and humanoid features. Their eyes gleam with an intelligent, ancient wisdom, often radiant with a hint of the elemental magic coursing through their veins. Elongated, serpentine tails gracefully trail behind them, capable of both finesse and strength. Their hands bear elongated, claw-like fingers, each tipped with razor-sharp talons. Even though draconic blood runs through their veins granting them immense strength and endurance, the Dragonkin do not develop wings. \n\nDragonkin live around [color=244,247,118,255]::elder_age[/color] years. \n\n[color=244,247,118,255]Strength + 3, Endurance + 2, Intelligence + 2, Dexterity + 1, Willpower + 1[/color]", "id": "34532", "items": [], "name": "Dragonkin", "names": { "female": "npc/names/reptilion_female.txt", "male": "npc/names/reptilion_male.txt" }, "passives": [ "dragonkin_race_butcher", "core_2_claw_fishing", "dragonkin_race_fire_starter", "core_2_hot_blood" ], "settlement": { "carve": false, "center_id": "dragonkin_race_center", "road": true, "start_spawn_rate": 0.5, "caravan_image": 275 }, "playable": true, "recipes": [], "statistics": { "endurance": 2, "strength": 3, "intelligence": 2, "dexterity": 1, "willpower": 1}, "tags": [ "24" ], "courting": { "female": [ "2302", "2436" ], "male": [ "2045", "297" ] } } ] }

WARNING
Don't add settlement names to the character file if you don't have custom ones. This will cause the race to not load.

WARNING
Don't set the base entity of the race the same as the base entity of your work/job entity. This will cause a crash in the game, in case you try to marry a character of this race.

There is still one last step before we can go build and test our buildings.

In the main mod folder we need to create a file named locations.json. This file will define how our settlement will spawn in the world.

Inside the locations file we will write:
{ "cultures": [ { "id":"34532", (race id) "name":"dragonkin" (culture name) } ], "settlements": [ { "biomes": [ "grasslands" ], "buildings": [], "cost": 10000, "culture": "34532", "full_name": "{} Dragonkin Den", "image": 180, "level": 1, "min_population": 0, "name": "Village", "starting_weight": 0.3 }, { "buildings": [], "cost": 100000, "culture": "34532", "full_name": "{} Dragonkin Den", "image": 181, "level": 2, "min_population": 100, "name": "Town" }, { "buildings": [], "cost": 1000000, "culture": "34532", "full_name": "{} Dragonkin Den", "image": 182, "level": 3, "min_population": 200, "name": "City" }, { "buildings": [], "cost": 0, "culture": "34532", "full_name": "Ruins of {}", "image": 183, "level": 0, "min_population": 0, "name": "Ruins" } ] }

For a settlement to spawn we will need to add at least this 4 elements. There are a number of things that you can create in this file related to world POI but we won't go to deep in this guide.
Creating buildings
Finally we can start creating our actual buildings.

For creating the maps for our builds I recommend you watch this video on how to create maps for the game. It's not a full use case for this but it will help you understand how to use the tool.


We already have created the location and buildings. In the modding tool search for {race name} - Settlement Center or any other name you gave to the building.

You don't need to add the entity with the job to the map!


Do the same for the farm or other building you decided to create.


Remember to save and preview the map in the procedural maps, like in the video.
Extras
Adding names to buildings.
TODO
Adding custom art to buildings and settlements.
TODO

Ending
To test your settlement, create a new world and (hopefully) it will work.

And we've reached the end!

Remember that this is guide was to simply explain on how to create a extremely simple settlement. If you want to create a good settlement you will have to create multiple buildings and entities for each job/work and also create custom assets to give it a little shine.
If you have any questions, you can dm me on discord to V0ID (krarphi#4444)
4 Comments
V0ID  [author] 7 Sep, 2024 @ 4:44am 
thx draken ^^
V0ID  [author] 7 Sep, 2024 @ 4:43am 
hi junior!
no you don't to give it a name. what would show up in the world would be something like "unknow - {"full name" element on the locations file}. usually that means there is something wrong in the race elements or in the buildings. check in the in game editor if any of the buildings you made start with something like "unkown" - {name of a building}
Sire Junior 7 Sep, 2024 @ 2:02am 
the settlement doesnt appear, do i have to give it a name so it appears?
Draken 7 Sep, 2024 @ 12:43am 
Very nice guide!