News:

Welcome to World of Banished!

Main Menu

Turn few changes into .pkm mod file

Started by Yandersen, January 14, 2018, 08:41:07 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Yandersen

A rusty old noob decided to make a few changes to the game wishing to create a simple mod. But how?..

Basically I want to place orchards and farms on the cliffs - wherever banny can walk let it be possible to farm. So I tried the Better Fields mod. And it could make me happy if only they would not touch pastures. Because they flatten the terrain now, damn it! So I tried to do the same on my own to leave pastures be the way they are in vanilla.

I modified two files:
D:\BanishedKit\resource\Template\CropField.rsc
D:\BanishedKit\resource\Template\Orchard.rsc
by adding the "Walkable" flag to the CreateDragDescription section, so that the crops and orchards could be placed wherever bannies can walk. I also changed the spacing for orchards to 2 in both dimensions for symmetry reasons and loose the lower size limit to 3x3 for both orchards and crops. Those changes made me quite happy.

And now I want to make a mod's .pkg file out of this. Any quick and simple way to do so? I seem to be too dumb to make sense of the example tutorials... :(

kid1293

Hi! It is just an override file you need.
Very simple. You can use the code or experiment further.
I did not change the spacing or size, you do that!
There are a lot of things to change in game.

Files in Dialog folder are needed for compilation. Program always tells you what it needs.

Welcome to modding Banished!

kid1293

If you want to make less impact on other mods.
Last lines in Package.rsc you call

Template/CropField.rsc:createdrag
Template/Orchard.rsc:createdrag

to specify only the 'createdrag' section you have changed. :)

brads3

curious,how high will they work the fields that way?

kid1293

You can place the fields as high as they can walk.
No need to place it on 'unusable' tiles, they can't walk there.

Yandersen

#5
Thank you so much, kid, it worked!!!111oneoneoneone :P
I minimized the file overwrite pollution as it was suggested, added a preview pic and draw an icon. If I manage to figure out how to publish it on Steam you will be able to see it as "Improved Farming"!

UPD: success! Here it is:
http://steamcommunity.com/sharedfiles/filedetails/?id=1269666222
I also changed the max size to 20x20 and doubled the max workers count modifying the "work" section.
Should I publish the mod somewhere here as well or being available in steam workshop is enough?

kid1293

@Yandersen - Most of us here don't use Steam (for different reasons)
So an entry in Download would be okay! Many already have this override
in some compilation but it is nice to see it separate!

RedKetchup

congratulations for your first mod :)

yeah as Kid said, you can post it in the download section :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Thank you! :D
Uploaded.

Also, just for a practice purpose, did a second "mod" - Improved Woodcutter. Up to 3 workers. Obvious, right? Thought about giving it a storage function for Wood, but decided not to - suspecting possibility of wood required for work being stolen by builders, for example, or even vendors thus creating a loop. Anyway, a mod Chop Wood alone is just a better alternative to default woodcutter (footprint-wise) than my tripled version, imo. Only one thing I can suggest is to change the footprint to 1x1 (3x3 including the road tiles around) and move it to the same menu where the default woodcutter is located. Um, whatever.

Tom Sawyer

Hi @Yandersen, welcome back to Banished!

I've seen your comment on BV but did not answer yet. If you load the woodcutter mod from Steam you get the small chopping block in the production menu. The cutteryard next to it has another icon and already up to 3 worker to not be displaced. I need to clean up my site and upload it there.

Nice you got into modding. :)

Yandersen

Dang, I've seen it, but get confused by the pic with the strange house on it - I thought it is an actual woodcutter building! ;D
Thank you, Tom, you made me happy today!  :D

Yandersen

#11
Need help, oh wise people!!! :(
Just thought I managed to make my old dream come true - to add a food barn functionality to the Gatherers Hut, so the gatherers can store whatever they find in woods right at that building, but can't make it into the mod package for some reason... If I do it directly by modifying the Template/GathererShelter.rsc file, all works as intended. But once I try to put this into mod, I get the default vanilla version of the building. God, why?!

I attached the file, please take a look. If any1 manage to make a .pkm out of this, please be so kind to post back the source archive. No idea why the same approach I succeeded with last two times does not work this time. Compiler chews everything without complains, yet, the mod version gives the vanilla building, not the modified version.

My only suspicion is the point where I used the Tailor interact points for the gatherer hut model (because the GH does not seem to have interaction points so the gatherers can't drop items). But if I just replace the file in the game directory it works, right? So why would it be a problem if compiled as mod? No idea... Please help! :'(

Yandersen

Wow, it turned out being a... bug? In the developer version?! I just tried the output .pkm in the steam version and it works here! But for some reason the mod does not seem to have any effect on dev version. Crazy...

Anyway, here is a source and the output in the attachment. Just uploaded to steam and will do so around here.

kid1293

I found it working perfectly.
I starved the bannies for a year and they came and took what was in store.
Nice work.

What do you mean by dev version?

Tom Sawyer

Wow, you got it.. Great work!

So we now can create gathering huts and herbalist cabins with storage function. How cool is that. I tried this before too but failed with getting either a gatherer or a storage location. Looking at your template I see nothing special in it. You just added the storagelocation section and UI parts and it works. No idea what was wrong.

To make a suggestion, you can add this function to the vanilla herbalist as well. Makes even more sense with this special storage flag and will make your mod more useful. The gatherer storage also can be restricted to vegetables and fruits instead of edible to keep away meat from hunters.