Welcome to Black Liquid Software

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • 0
Sign in to follow this  
Followers 0
HollowfiedChaos

Mod base game buildings

I need help with modding base game buildings, like changing the vale of how much the Storage Barn can hold, eg from 6000 to 10000. The problem is, I'm not entirely sure how to do it, I was able to mod the raw materials files and pack them, but when trying to get an idea from the Banished kit with the Apiary, its like it was designed to make a whole new building from scratch. So could anyone give me any ideas, screenshots or even a simple walk through that could help me, I would appreciate it. Thank you. 

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

In the resource section of the mod kit, find the template for the building you want to change and copy it into the '*yourmod*/Template' folder. 

You can do two things.

1 - you can either edit the part you want to change and leave the rest of the template as it is, then in your *yourmod*resources.rsc file you list 'Template/StorageBarn.rsc'. Then compile it, and it will 'rebuild' the barn with the new numbers but use everything else from the resource pack. 

2 - you can change the part you want, in this case scroll down to the 'StorageDescription storage' section, change the storage value, then delete everything else in the template file so it looks like this...

StorageDescription storage
{
	RawMaterialFlags _storageFlags = Edible | Tool | Health | Clothing | Textile;
	bool _areaBasedLimit = false;
	bool _available = false;
	int _volumeLimit = 6000;
}

Then, in your resources.rsc you list 'Template/StorageBarn.rsc:storage" and nothing else. Compile, and it will rebuild just that section of the storage barn code, and when you play with the mod it will overwrite only that section and nothing else. 

 

Both will work to change the numbers in the barn, and you can do the same to any building. 

 

If you do change the storage barn, make sure you use the template file that has the new 1.0.7 flags. If you don't it won't work with new resources. The files in the modkit resource folder do not have the new things added to them, so you need to do that yourself. Hopefully this will change with the next banished release when it comes out of Beta.

 

Here is the code for the new flags, notice that the capacity has also been increased.

 

StorageDescription storage
{
	RawMaterialFlags _storageFlags = Edible | Tool | Health | Clothing | Textile | Grain | Vegetable | Fruit | Protein | Custom0 | Custom1 | Custom2 | Custom6 | Custom7 | Custom8 | Custom9;
	bool _areaBasedLimit = false;
	bool _available = false;
	int _volumeLimit = 7500;
}

And this is what the *yourmod*resources.rsc will look like...

ExternalList resource
{
	External _resources
	[
		"Template/StorageBarn.rsc:storage",
	]
}

 

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Thank you so much. It worked brilliantly.

2 people like this

Share this post


Link to post
Share on other sites
  • 0

Great stuff! And welcome to the modding community :)

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0