Author Topic: Turn few changes into .pkm mod file  (Read 3443 times)

0 Members and 1 Guest are viewing this topic.

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Turn few changes into .pkm mod file
« on: January 14, 2018, 08:41:07 AM »
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... :(

Online kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2650
  • Country: se
  • Never confuse movement with progress
Re: Turn few changes into .pkm mod file
« Reply #1 on: January 14, 2018, 09:32:12 AM »
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!

Online kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2650
  • Country: se
  • Never confuse movement with progress
Re: Turn few changes into .pkm mod file
« Reply #2 on: January 14, 2018, 09:52:15 AM »
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. :)

Offline brads3

  • Banished Expert
  • *****
  • Posts: 2449
  • Country: us
Re: Turn few changes into .pkm mod file
« Reply #3 on: January 14, 2018, 10:00:10 AM »
curious,how high will they work the fields that way?

Online kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2650
  • Country: se
  • Never confuse movement with progress
Re: Turn few changes into .pkm mod file
« Reply #4 on: January 14, 2018, 10:17:56 AM »
You can place the fields as high as they can walk.
No need to place it on 'unusable' tiles, they can't walk there.

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Re: Turn few changes into .pkm mod file
« Reply #5 on: January 14, 2018, 11:27:22 AM »
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?
« Last Edit: January 15, 2018, 06:28:03 AM by Yandersen »

Online kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2650
  • Country: se
  • Never confuse movement with progress
Re: Turn few changes into .pkm mod file
« Reply #6 on: January 14, 2018, 12:49:34 PM »
@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!

Online RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9230
  • Country: ca
Re: Turn few changes into .pkm mod file
« Reply #7 on: January 14, 2018, 07:19:06 PM »
congratulations for your first mod :)

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

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Re: Turn few changes into .pkm mod file
« Reply #8 on: January 15, 2018, 10:02:26 AM »
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.

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 849
  • Country: is
Re: Turn few changes into .pkm mod file
« Reply #9 on: January 15, 2018, 10:24:25 AM »
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. :)

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Re: Turn few changes into .pkm mod file
« Reply #10 on: January 15, 2018, 11:49:46 AM »
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

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Re: Turn few changes into .pkm mod file
« Reply #11 on: January 18, 2018, 10:06:12 AM »
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! :'(
« Last Edit: January 18, 2018, 10:26:02 AM by Yandersen »

Offline Yandersen

  • Vendor
  • ***
  • Posts: 83
  • Country: by
Re: Turn few changes into .pkm mod file
« Reply #12 on: January 18, 2018, 10:57:23 AM »
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.

Online kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2650
  • Country: se
  • Never confuse movement with progress
Re: Turn few changes into .pkm mod file
« Reply #13 on: January 18, 2018, 11:14:21 AM »
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?

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 849
  • Country: is
Re: Turn few changes into .pkm mod file
« Reply #14 on: January 18, 2018, 11:48:55 AM »
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.