Modding Starting Resources, Limits

Hey, folks.

I’m in the process of creating a mod for the game, mainly for personal use, though I intend to post it at some point. I’m basically increasing the build requirements for all wood and stone in items to be whole numbers, partly so as to avoid the rounding issues (though 2nd floor and up building will shoot that in the foot, I know), and increasing the resources granted by trees and rocks to compensate… as well as tweaking the amounts used in various constructions to be a bit more plausibly related to the size and appearance of the built item. (A wooden stand for research costs 15 wood, but a section of wall costs less than 1? Etc.) Obviously it’s always going to be a bit abstract, but for my personal taste I like it to feel a bit more plausible. I’m doing some personal testing to make sure it feels right at the moment.

My issue is that, while I can easily enough tweak the numbers on the storage items capacity, I can’t see a way to modify either the starting limits on resources or the actual quantity a player starts with in a game. I’d like to be able to change those for the mod in order to better suit the increased building requirements. Right now, my settlers in my modded world are hard pressed to make anything useful with what they start with, so always have to immediately build storage items and then go wild on the nearest forest before they can even build a basic hut to stay out of the rain.

If there’s no way to modify those numbers in the patch file, I’ll find a way to balance around the preset values. But it would be really nice if, for example, I could have the villagers start with 150 wood and a starting max capacity of 500 wood. Or something along those lines.

Thanks in advance for any help you can offer!

Hi :slight_smile:

One possibility would be a slight increase in the amount of wood that comes off each tree and you could also adjust the frequency rates as well.

That is easily adjusted in the furniture json.

Just a thought :thinking:

Oh, I know, @roo . I’ve already done that. (50 wood per tree, but all in one go once the tree falls, so increased chopping time… long term, I’d like to change the way that axes and pickaxes work to reduce workSeconds rather than increase the resource gain. But that’s for later.)

Again, I’m mainly interested in changing starting values, so that starting colonists have enough to build a few initial structures before they have to go all in on chopping trees.

What you are needing (game starting values) would be found under the gameConfig.json

Its obviously not there, so I guess it would be up to Daniel to release that information - or not.

Another suggestion could be to reduce all values instead.

Reduce wood required for just the basic fundimentals for starting a game:

  • straw and basic wooden floors from 0.8 to 0.2

  • basic wall from 0.8 to 0.2

  • basket raw food from 15 to 3
    etc, etc…

By reducing just the basic starting requirements for housing, but not other values means an easier game start with less wood but keeping all the later values the same for game balance :smiley:

That’s a fair enough sort of solution, but it’s the opposite of what I’m going for. The whole purpose of the mod is to make the costs plausible based on the visible size of the object, and to avoid the rounding issues caused by decimal values. So a wall needs to require about the same amount of wood as a table, and so on, and needs to be in whole numbers.

Maybe Daniel will make the starting values moddable through gameConfig at some point. Until then, I guess I’ll just have to make building storage items and harvesting wood priority 1 for all colonies before they can start building any structures.

Thanks anyway!

Hi @windhover !

Yes, since the starting resources are not in gameConfig.json at the moment, they are not moddable with configurations only.
It’s relatively easy to do with a script mod, but it takes some time getting into that as it requires some programming.

@Loikas is the author of a couple of script mods on the Steam workshop. Maybe he can advise/help you if you decide to go the script mod route.

Thanks @Daniel! I was afraid of that… I’ve made minor modifications to other people’s python code before, but haven’t tried to write any of my own in about a decade. But if it’s “relatively easy,” I’ll certainly give it a shot. And maybe I’ll go begging to @Loikas about it at some point if and when I can’t figure it out. :smile:

1 Like

Haha @windhover you don’t have to beg :smile: tell me if you need any assistance! If you want i could also make the script part for you but i understand if you want to find out yourself. As @Daniel said it is really easy!

2 Likes

Further question: unrelated, but part of the creation of the same mod so I figured I’d post it here rather than start a new topic.

The syntax in the equipment.json is as follows:

“productionDescriptions”: [
{
“productionFurniture”: “forge”,
“inputResources”: [“ironOre”, “wood”],
“inputCounts”: [30, 20],
“productionTime”: 300
},

I’d like to change inputCounts, for example, but

“equipment/actionEquipment/axeWood/productionDescriptions/inputCounts”: [5, 1],

Doesn’t work and throws errors when trying to load a game, presumably because there’s something different about how everything “inside” productionDescriptions is formatted compared to other elements of the file. I can see that it’s different (section starts with [ rather than {, for one thing), but I don’t know enough about coding to know how to shift the syntax of my patch.json entry to compensate. This is where my lack of even basic understanding when it comes to coding and syntax bites me in the butt…

Any easy fix here? Or is this part of the file just inaccessible to simple modification via patch.json?

Thanks in advance, anyone who can assist.

Haha! I figured it out.

It was as simple as using the same syntax in the patch.json as already existed in the equipment.json, copying all of the relevant sections and changing the one I wanted to. WHY that was difficult to figure out, I have no good excuse. Again, I’m bad at this…

Thanks! Expect further questions as I continue this process…

1 Like

Glad you figured it out!

The reason is because [...] in json is a list and there is no way for patch.json to know if you want to edit the first, second, or whatever element of the list. So the only way to deal with it right now is to replace the list unfortunately.