World of Banished

MODS Garage => Tutorials => Topic started by: slink on September 13, 2014, 10:23:04 AM

Title: How To ...
Post by: slink on September 13, 2014, 10:23:04 AM
Add A Mediterranean Climate

Go to Resource\Game\Climate.

Make a copy of Mild.rsc.
Rename the copy to Mediterranean.rsc.
Edit Mediterranean.rsc with an editor that has Administrator's privileges.

Harsh and Mild climate files contain only changes relative to the Fair climate file, so we have to add some additional changes if we want to change the climate very much.  Edit Mediterranean.rsc so that it is as follows.  What you will have done is edited the string name, and also changed the average temperature from temperate to sub-tropical by adding changes from Fair to the base temperature and the range of temperatures.

ClimateGenerator resource : "Fair.rsc"
{
String _text = "Mediterranean";

// base range for temperature over the year
float _baseTemperature = 60.0;
float _temperatureRange = 20.0;

// normal temperature swing
float _temperatureTolerance = 2.0;

// normal distribution range of base temperature change (biyearly?)
float _temperatureVariance = 20.0;

// normal distribution range of weather chance
float _weatherVariance = 0.1;
}


Save the file. 

Now open ClimateList.rsc in the same editor.  Add a line to tell the game to include the new climate file.  It will look as follows, when you are done.

ExternalList resource
{
External _resources
[
"Game/Climate/Mediterranean.rsc",
"Game/Climate/Mild.rsc",
"Game/Climate/Fair.rsc",
"Game/Climate/Harsh.rsc",
]
}


Save the file.

Now you need to add a display string to another file.  This file is in the Resource\Dialog directory, and it is named StringTable.rsc.  Open that file in your editor.  Search for the string table for climate, and add a line so that section appears as follows.

StringTable climate
{
Entry _strings
[
{ String _name = "Mediterranean";         String _text = "Mediterranean"; }
{ String _name = "Mild"; String _text = "Mild"; }
{ String _name = "Fair"; String _text = "Fair"; }
{ String _name = "Harsh"; String _text = "Harsh"; }
]
}


Save your change and run the debug program.  If you make a new world you should see Mediterranean as a choice.  Creating a world with that climate will give you a world that never sees snow.  The temperature ranges from 40(F) in winter to 80(F) in summer, with slight variations.

This does not add the new climate to your ordinary game.  That is a different lesson.
Title: Re: How To ...
Post by: slink on September 13, 2014, 05:01:59 PM
Make A Perfectly Flat Map With Only The River

Go to Resource\Game\Terrain.

Make a copy of Valley.rsc.
Rename the copy to GreatPlains.rsc.
Edit GreatPlains.rsc with an editor that has Administrator's privileges.

Edit GreatPlains.rsc so that it is as follows.  What you will have done is edit the string name, and also changed every numerical value under each size map to zero, except for the first four values.  The first and second values remain the same, while the third and fourth values are set to the same number as the first.

TerrainGenerator resource
{
StringTable _stringTable = "Dialog/StringTable.rsc:terrainType";
String _text = "GreatPlains";
bool _exposed = true;

// materials
WeakMaterialInstance _terrainMaterial = "Terrain/Terrain.rsc";
WeakMaterialInstance _riverMaterial = "Terrain/River.rsc";
WeakMaterialInstance _lakeMaterial = "Terrain/Lake.rsc";

// size of the map
Feature _features
[
// ------ small ---------
{
int _mapSize = 256;

// number of flat areas
int _flatAreaCount = 30;

// size of flat areas
int _minFlatAreaSize = 256;
int _maxFlatAreaSize = 256;

// number of areas to avoid
int _avoidAreaCount = 0;

// size of avoidance areas
int _minAvoidSize = 0;
int _maxAvoidSize = 0;

// how many close nodes to connect to
int _flatAreaConnections = 0;

// rivers
int _streamCount = 0;

// erosion
int _erosion = 0;

// number of lakes
int _minLakeCount = 0;
int _maxLakeCount = 0;

// lake size
int _minLakeSize = 0;
int _maxLakeSize = 0;

// number of parts per lake
int _lakePartCount = 0;

// part sizes
int _minLakePartSize = 0;
int _maxLakePartSize = 0;
}

// ------ medium ---------
{
int _mapSize = 384;

// number of flat areas
int _flatAreaCount = 75;

// size of flat areas
int _minFlatAreaSize = 384;
int _maxFlatAreaSize = 384;

// number of areas to avoid
int _avoidAreaCount = 0;

// size of avoidance areas
int _minAvoidSize = 0;
int _maxAvoidSize = 0;

// how many close nodes to connect to
int _flatAreaConnections = 0;

// rivers
int _streamCount = 0;

// erosion
int _erosion = 0;

// number of lakes
int _minLakeCount = 0;
int _maxLakeCount = 0;

// lake size
int _minLakeSize = 0;
int _maxLakeSize = 0;

// number of parts per lake
int _lakePartCount = 0;

// part sizes
int _minLakePartSize = 0;
int _maxLakePartSize = 0;
}

// ------ large ---------
{
int _mapSize = 512;

// number of flat areas
int _flatAreaCount = 120;

// size of flat areas
int _minFlatAreaSize = 512;
int _maxFlatAreaSize = 512;

// number of areas to avoid
int _avoidAreaCount = 0;

// size of avoidance areas
int _minAvoidSize = 0;
int _maxAvoidSize = 0;

// how many close nodes to connect to
int _flatAreaConnections = 0;

// rivers
int _streamCount = 0;

// erosion
int _erosion = 0;

// number of lakes
int _minLakeCount = 0;
int _maxLakeCount = 0;

// lake size
int _minLakeSize = 0;
int _maxLakeSize = 0;

// number of parts per lake
int _lakePartCount = 0;

// part sizes
int _minLakePartSize = 0;
int _maxLakePartSize = 0;
}
]
}


Save the file. 

Now open TerrainList.rsc in the same editor.  Add a line to tell the game to include the new terrain file.  It will look as follows, when you are done.

ExternalList resource
{
External _resources
[
"Game/Terrain/Valleys.rsc",
"Game/Terrain/Mountains.rsc",
"Game/Terrain/GreatPlains.rsc"
]
}


Save the file.

Now you need to add a display string to another file.  This file is in the Resource\Dialog directory, and it is named StringTable.rsc.  Open that file in your editor.  Search for the string table for terrain, and add a line so that section appears as follows.

StringTable terrainType
{
Entry _strings
[
{ String _name = "Valleys"; String _text = "Valleys"; }
{ String _name = "Mountains"; String _text = "Mountains"; }
{ String _name = "GreatPlains"; String _text = "Great Plains"; }
]
}


Save your change and run the debug program.  If you make a new world you should see Great Plains as a choice.  Creating a world with that terrain will give you a world that has only flat land and the large river.  There will be no streams, lakes, hills, mountains, or bumps in the road.  Of course, you can't mine for iron or coal on this map, but you can maintain farms and forests to your heart's content.

As before, this does not add the new terrain to your ordinary game.
Title: Re: How To ...
Post by: slink on September 14, 2014, 10:06:13 AM
Include the above two in a mod package and use them in your regular game.

This is a somewhat trickier process.  You need to create a directory under BanishedKit\Examples, and name it Override.  Under Override, create directories named Game and Dialog.  Under Game, create directories named Climate and Terrain.

Now, under Dialog, copy your edited version of StringTable.rsc.

Under Game\Climate, copy your edited versions of Mediterranean.rsc and ClimateList.rsc.  You will also need a copy of the original Fair.rsc, because your new climate references that file.

Under Game\Terrain, copy your edited versions of GreatPlains.rsc and TerrainList.rsc.

Into the root of Override, create a Package.rsc file.  It should contain the following lines.  Be sure the word "override" in the very first line is lowercase.  The packaging step won't work if you use an uppercase "o".  Put this down to case-sensitivity in the C programming language and don't worry about it.

PackageFile override
{
String _name = "My Overrides";
String _author = "ME!";
String _description = "This mod adds a Mediterranean climate and a Great Plains terrain type.";
int _userVersion = 1;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"
]
}

ExternalList list
{
External _resources
[
"Game/Climate/Mediterranean.rsc"
"Game/Climate/ClimateList.rsc"

"Game/Terrain/GreatPlains.rsc"
"Game/Terrain/TerrainList.rsc"

"Dialog/StringTable.rsc:climate"
"Dialog/StringTable.rsc:terrainType"
]
}


Next create a batch file named buildoverride.bat, in the root of BanishedKit.  It should contain the following lines.

bin\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\Tools-x64.exe /mod Package.rsc:override /pathres ../example/override /pathdat ../example/override/bin


Create a DOS window in administrator mode.  Change directory to the BanishedKit directory.  Run buildoverride.bat.  If everything goes well, you should find a file named override.pkm in the BanishedKit\bin\WinData directory.

Copy this file into the WinData directory of your regular game.  Now if you run the regular game, you can load your saves made from the toolkit version using the new climate and terrain.  You can also create new games with these things. 

If you look under Map, however, the entries for terrain and climate are blank.  Obviously I missed two new string entries somewhere.  The changes still work, but the mod isn't ready to distribute.  I am attaching it to this post anyway, so you can see that it works, along with the source code and the batch file.

I was able to rename override.pkm to My Overrides.pkm with no problem.  Some people appear not to be able to do this without breaking the mod.  I am using Win 7.
Title: Re: How To ...
Post by: Paeng on September 14, 2014, 06:34:47 PM
Wonderful tutorial, thank you... seeing the whole process laid out step-by-step (and without omitting steps C, H, X and Y) really helps a lot to wrap one's head around this...  :)
Title: Re: How To ...
Post by: slink on September 14, 2014, 07:21:35 PM
As an addendum, I searched and searched for another place in which to add strings.  I finally decided that I had changed everything required.  I loaded the saved game and checked for the text under Map.  It was missing.  I went to Mod, and the mod was unchecked.  I checked it, told it okay for saving and reloading, and then checked Map again.  The text now appeared.  It may have happened when I renamed the mod, or perhaps it was because the map was created in the toolkit without an actual mod being present.  Either way, the mod was after all ready for distribution, except for renaming properly.  My Overrides is hardly a unique name.   :D

As a note, I use one batch file to compile and package all of my mods.  Therefore I name them all "override" initially, and then rename the directory and mod afterward to an appropriate name.  I do this because batch files are automatically edited by Notepad by right-clicking and choosing Edit instead of Run.  Notepad when run in that fashion is not in Administrator's mode, and won't save anyplace except to Documents.  Rather than continually creating, editing, and copying from Documents to BanishedKit, I just made the one batch file and rename everything else.  I use another editor, in Administrator mode, for editing rsc files by simply clicking on them, so that is no problem.  Theoretically I could always log on as the Administrator, instead of as a user with Administrator rights, but I was taught that is a security risk so I don't do it.
Title: Re: How To ...
Post by: Pangaea on September 20, 2014, 08:18:05 PM
Tried to follow your recipe, letter by letter, but I'm not getting the .pkm file :( Instead, I get a load of *.crs files

I only made a very small change in the orchard trees files, just to test out this modding business. Can somebody look over and see if you see any glaring mistakes? I didn't get an error when running the batch file. Before running it, I copied over the files I had changed to the overrides folder like you suggested. They're now in BanishedKit\example\Override\Template

Package.rsc
PackageFile override
{
String _name = "Pangaea's Mod";
String _author = "Pangaea";
String _description = "This mod does all kinds of naughty stuff.";
String _icon = "icon.png";
int _userVersion = 1;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"
]
}

ExternalList list
{
External _resources
[
"Template/NaturalResourceAppleTree.rsc"
"Template/NaturalResourceCherryTree.rsc"
"Template/NaturalResourceChestnutTree.rsc"
"Template/NaturalResourcePeachTree.rsc"
"Template/NaturalResourcePearTree.rsc"
"Template/NaturalResourcePecanTree.rsc"
"Template/NaturalResourcePlumTree.rsc"
"Template/NaturalResourceWalnutTree.rsc"
]
}




Batch-file, copied the text from your file above
bin\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\Tools-x64.exe /mod Package.rsc:override /pathres ../example/override /pathdat ../example/override/bin

Why is one override in uppercase and another in lowercase btw?


Edit: It appears the file was created after all, it was just located in the root/bin/WinData instead. Unfortunately the site just went down (I'm getting an SQL message now), but this tutorial was very useful: http://banishedmods.com/showthread.php?tid=90
Title: Re: How To ...
Post by: RedKetchup on September 20, 2014, 10:15:26 PM
so did it worked ?
Title: Re: How To ...
Post by: Pangaea on September 20, 2014, 11:08:17 PM
Yes, I managed to run it in the end, and have now managed to make a mod that removes the annoying wind when you are zoomed out :)

Can somebody else check it out, just to make sure it actually works on your end too?
Title: Re: How To ...
Post by: RedKetchup on September 20, 2014, 11:17:56 PM
yup works awesomly fine :)

Thanks you :)
Title: Re: How To ...
Post by: Pangaea on September 20, 2014, 11:55:31 PM
Quote from: RedKetchup on September 20, 2014, 11:17:56 PM
yup works awesomly fine :)

Thanks you :)

Excellent :)

Finally managed to retrace my steps, I think, and redo it with just a slightly different name. The guide I read on that other site (still down atm) had a run.bat file that opened the game and when I create a new game, some files are added to the bin folder. Then there is a pack.bat file. Is there a way to do all these steps without having to fire up the game and create a game?

This is what the bat files look like right now

Run.bat
..\..\bin\Application-x64-profile.exe /pathres ../mymods/NoWindTo /pathdat ../mymods/NoWindTo/bin

Pack.bat
..\..\bin\Tools-x64.exe /mod Package.rsc:NoWindTo /pathres ../mymods/nowindto /pathdat ../mymods/nowindto/bin

Earlier I tried what was mentioned in this thread, but I couldn't get that to work, so I'm a bit confused here...
Title: Re: How To ...
Post by: RedKetchup on September 21, 2014, 12:01:19 AM
i dunno every little change i compile, move my .pkm to the game windata and lauch the game and start a new game each time i do a little change ^^
Title: Re: How To ...
Post by: Pangaea on September 21, 2014, 12:12:21 AM
That's what I'm wondering about really, because now I have to start up the game just to create some files that are needed before I can even compile the .pkm. How do you compile it more quickly?

Have uploaded the NoWind (http://banishedinfo.com/mods/view/627-NoWind) file to BanishedInfo, so I hope it works for others too :) As I wrote there, I still hear some slight wind noise at times, but it's very faint.
Title: Re: How To ...
Post by: RedKetchup on September 21, 2014, 05:26:35 AM
i dont understand how you start the game to make thing before you compile it :P

it s sound like doing something at Rome while you are on the road and just left London :P
Title: Re: How To ...
Post by: RedKetchup on September 21, 2014, 05:33:19 AM
me :

1. i do my changes
2. delete bin and build folders
3. launch my .bat in DOS window
4. look how it compiles
5. go in the 2 little Windows folder at top of my screen (kit bin windata and the game windata)
6. click and drag the .pkm from bin/windata to my game windata
7. launch the game with steam launcher
8. start a new game
9. check in game what i did
10. close the game

11+ rince and repeat. with more changes
Title: Re: How To ...
Post by: slink on September 21, 2014, 06:32:56 AM
When I was creating these tutorial posts I did have to occasionally delete the bin directory that was created by the batch files.  I forgot to mention that.  It appears that if the bin directory already exists, that old files within are not removed and they get included in the final package.

Quote from: Pangaea on September 20, 2014, 08:18:05 PM
Tried to follow your recipe, letter by letter, but I'm not getting the .pkm file :( Instead, I get a load of *.crs files
...
Batch-file, copied the text from your file above
bin\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\Tools-x64.exe /mod Package.rsc:override /pathres ../example/override /pathdat ../example/override/bin

Why is one override in uppercase and another in lowercase btw?


Edit: It appears the file was created after all, it was just located in the root/bin/WinData instead.

Yes, that is what I said, only I called "root" by the name "BanishedKit" because that is where I have the toolkit installed.

"Override" is capitalized in one place and not in the other because I typed it that way one time and the other way the next time.  One gets out of practice if one hasn't touched a C compiler in ten years.

I am glad that you found a tutorial that works for you.  Everyone's mind works differently.  I had to buy several books before I found one that explained OOP to me in a way I could utilize.
Title: Re: How To ...
Post by: Pangaea on September 21, 2014, 09:13:11 AM
Quote from: RedKetchup on September 21, 2014, 05:33:19 AM
me :

1. i do my changes
2. delete bin and build folders
3. launch my .bat in DOS window
4. look how it compiles
5. go in the 2 little Windows folder at top of my screen (kit bin windata and the game windata)
6. click and drag the .pkm from bin/windata to my game windata
7. launch the game with steam launcher
8. start a new game
9. check in game what i did
10. close the game

11+ rince and repeat. with more changes

I noticed the issue of not overwriting files in the bin folder too when trying to get to the bottom of this, so have also been deleting files there in between each buildmod attempt. I genuinely don't understand why that /build command does not work on my end. As long as including all the files I've changed in the ExternalList works, then that is good at least, but it would be nice if all those *.crs files were compiled by the /build command itself. That does not happen for me (without the list).


This is what I'm doing
1. Copy files I want to change into /mymods/newmod, retaining folder structure from /resource
2. Make the changes to the files
3. Delete /bin folder if present
4. Make sure paths are correct in Package.rsc, and include all files I have edited in ExternalList (okay now, but would be a nightmare in big mods). For example:
PackageFile orchard
{
    String _name = "orchard";
    String _author = "Pangaea";
    String _description = "Improves the lifespan of all orchard trees in the game. By default they live on average ~8 years. With this mod they should live ~20 years on average.";
    String _icon = "icon.png";
    int _userVersion = 1.0;

    // all files in resource directory
    String _includeList
    [
        "*"   
    ]
   
    // exclude package files, mod files, file used for building packages
    String _excludeList
    [
        "Package_*.crs"
        "*.pkg"
        "*.pkm"
    ]
}

ExternalList list
{
External _resources
[
"Template/NaturalResourceAppleTree.rsc:growth"
"Template/NaturalResourceCherryTree.rsc:growth"
"Template/NaturalResourceChestnutTree.rsc:growth"
"Template/NaturalResourcePeachTree.rsc:growth"
"Template/NaturalResourcePearTree.rsc:growth"
"Template/NaturalResourcePecanTree.rsc:growth"
"Template/NaturalResourcePlumTree.rsc:growth"
"Template/NaturalResourceWalnutTree.rsc:growth"
]
}

5. Run the .bat file (thanks you slink, as this finally works now)
..\..\bin\Tools-x64.exe /build Package.rsc:list /pathres ../mymods/orchard /pathdat ../mymods/orchard/bin

..\..\bin\Tools-x64.exe /mod Package.rsc:orchard /pathres ../mymods/orchard /pathdat ../mymods/orchard/bin

6. If everything worked well here, and I see all the *.crs files in the modded /bin folder and in the main WinData folder, then it should be ready to go
7. Run a *.bat file that only loads the *.pkms
bin\Application-x64-profile.exe /onlypkg
8. There I check that the mod is available, and tick it and restart if it's not selected
9. Check in the game to see if the mod works as intended (for this orchard mod, that has taken many hours).
10. Close game, rinse and repeat.


I think that was all, and precise, but it's been many hours since I did it now, so maybe my jellyfish brain has forgot something already  ;D :-X
Title: Re: How To ...
Post by: RedKetchup on September 21, 2014, 02:41:13 PM
i dunno.  my PackageFile DecorativeItems

my bat:


bin\Tools-x64.exe /build DecorativeItemsResources.rsc /pathres ../fence /pathdat ../fence/bin
bin\Tools-x64.exe /mod Package.rsc:DecorativeItems /pathres ../fence /pathdat ../fence/bin
Title: Re: How To ...
Post by: Pangaea on September 21, 2014, 02:52:52 PM
Hmm. Could it be because you're making your own files, while I'm just editing existing files? I really don't know, but it's an odd one.

As long as @slink 's trick with list works, that is fine enough, though - at least I can create the pkm file now and the mods work, and at the end of the day that is what matters.
Title: Re: How To ...
Post by: slink on October 09, 2014, 03:03:52 PM
A note for makers of mods that create new items, as opposed to overrides, is that the name inside the package.rsc must correspond to the name of the mod you distribute.  Renaming won't work with mods that create new items.  This may or may not have been the case only since the most recent beta, but it is true now regardless.

Because of this, underscores can be used in mod names but not space should not be used.  Likewise disallowed are characters relating to the directory structure such as forward-slash, back-slash, and the period.
Title: Re: How To ...
Post by: salamander on October 12, 2014, 05:40:39 AM
From way back at the start of the thread:

Quote from: slink on September 14, 2014, 07:21:35 PM
I use another editor, in Administrator mode, for editing rsc files by simply clicking on them, so that is no problem.

@slink -- just out of curiosity, what editor are you using for the .rsc files?  Notepad is good for a lot of things, but something with a little more oomph would be nice.  Thanks.
Title: Re: How To ...
Post by: slink on October 12, 2014, 05:49:05 AM
I use a program called PFE, short for Programmer's File Editor.  I downloaded it just before the turn of the century.  It is freeware.

Title: Re: How To ...
Post by: RedKetchup on October 12, 2014, 07:30:23 AM
personally i open and associated .rsc to notepad :)
Title: Re: How To ...
Post by: Pangaea on October 12, 2014, 12:24:34 PM
I like NotePad++. It's a great program, and has colour highlighting, so I like it better than normal Notepad for a bit more complex tasks. Admittedly there isn't colour highlighting for .rsc files, but I'm sure that could be associated if I bothered to go looking for it. The program is also free.
Title: Re: How To ...
Post by: salamander on October 12, 2014, 12:33:05 PM
Thanks to all who replied to the last question about editors.

And special thanks to @slink, whose tutorials  in this thread about override mods have been a great help.  @slink -- your opening posts here have been very helpful.  :)   My first attempt at a mod is an override, and probably pretty useless, but mirroring your examples made it much easier to understand what was going on.
Title: Re: How To ...
Post by: Bradley on November 30, 2014, 02:43:08 PM
I am trying to follow you tutorial to learn how to mod, but i am stuck where you say to " Change the directory to banishedkit".

I am new to programming and have googled how to open the DOS, but i can't find a way to change the directory.
Title: Re: How To ...
Post by: RedKetchup on December 01, 2014, 12:34:39 AM
cd <dir>

like:
cd banishedkit

or

cd mymods

depending where you put it
<dir> = the folder you want to go


if you need to swap drive you can do

d:

or e:
for example
Title: Re: How To ...
Post by: slink on December 01, 2014, 06:38:01 AM
Sometimes the path must be designated from the root.  In that case the format is:

cd /whatever/whatever2/whatever3

The first "/" says to start from the root directory of that drive.  Otherwise the OS only looks in the current directory for the target.  The opening directory in Windows 7 for an admin level DOS window is \Windows\system32 which is not what you want.
Title: Re: How To ...
Post by: Bradley on December 01, 2014, 08:33:44 PM
Thank you for the help.

I have a new problem now. When i run the override.bat i get this

An assertion failure has occurred. A crash dump has been saved.

Location: IO\TextReader.cpp(70)
Message: C:\Banmods\MyMod\modded\Package.rsc (0): error: Unexpected character '\' found!
Expression: false

Callstack:
Runtime-x64-profile.dll(0x00000000e8e7a733)
unknown(0x00000000fffffffe)
unknown(0x00000000001ed890)

I have tried the tutorial that a link was posted earier and have ran into the same problem when i run the package.bat
Title: Re: How To ...
Post by: RedKetchup on December 02, 2014, 03:13:51 AM
copy paste your Package.rsc here
(there is a \ inside where there shouldnt be)
Title: Re: How To ...
Post by: RedKetchup on December 02, 2014, 04:07:22 AM
Quote from: slink on December 01, 2014, 06:38:01 AM
The opening directory in Windows 7 for an admin level DOS window is \Windows\system32 which is not what you want.

personally my user account has admins rights. i dont use the 'admin account'

when i open c: command prompt i arrive here:

c:\Users\Michael

if we want to go back to c:\ we need to do :

cd ..
cd ..

each time you do cd .. to go back 1 folder closer to the root.
Title: Re: How To ...
Post by: slink on December 02, 2014, 05:17:30 AM
Quote from: RedKetchup on December 02, 2014, 04:07:22 AM
Quote from: slink on December 01, 2014, 06:38:01 AM
The opening directory in Windows 7 for an admin level DOS window is \Windows\system32 which is not what you want.

personally my user account has admins rights. i dont use the 'admin account'

when i open c: command prompt i arrive here:

c:\Users\Michael

if we want to go back to c:\ we need to do :

cd ..
cd ..

each time you do cd .. to go back 1 folder closer to the root.
My account also has admin rights, but the copy of DOS that opens in my own name instead of the one that opens as "run as administrator" has no admin rights.

cd \ (or cd /, since DOS can't tell the difference) works just as well to go directly to the root.
Title: Re: How To ...
Post by: Emton on November 27, 2015, 09:22:00 PM
Can anyone explain what float _temperatureTolerance and float _temperatureVariance does?
Title: Re: How To ...
Post by: RedKetchup on November 27, 2015, 10:41:47 PM
where did you found that ?
Title: Re: How To ...
Post by: Emton on November 27, 2015, 11:18:07 PM
They are in the files for climates in /Game/Climates specifically in Fair.rsc (which the other climates are based off of) I figured out how float _baseTemperature and float _temperatureRange work  (to set the overall temperature range, for instance baseTemperature= 50 and temperatureRange= 40 will make the temperature range go from 10 degrees to 90 degrees, 50-40=10, 50+40=90)
But I'm trying to figure out what float _temperatureTolerance and float _temperatureVariance do exactly. I'm making a climate that is harder than harsh (because harsh is real easy) but I'm trying to keep it like vanilla, I just want more chance for heat in the summer, chance for frost to come sooner, overall more cold in the winter. Well I'm gonna keep tweaking it to see if i can figure out how it works...
Title: Re: How To ...
Post by: RedKetchup on November 28, 2015, 06:54:09 AM
ok.
often is it faster to test ourselves :) than wait an answer ^^
Title: Re: How To ...
Post by: rofldiekatz on January 12, 2016, 04:37:56 AM
Hey!
So after spending about 639 hours trying to figure this out I finally have to ask for your help :D

The only things I changed were age values (age for marriage, work etc) and I thought "Oh nice, that seems to be very easy". Well.. nope. I just don't know how to create that damn package file. And the bat file, too.. :D I've tried a hundred times to change the batch file text etc, but I either get an error ("Failed to load resource") or there appears a bin folder with .crs files but no pkm file at all :/ I just don't get it and I'm absolutely new to this modding thing. Could anyone pls check my files and tell me what's wrong?

Package file; path is H:\BanishedModkit\example\Override (tried to copy the tutorial)
edited/copied (complete) Citizen.rsc file is in H:\BanishedModkit\example\Override\Template

PackageFile override
{
String _name = "Mona's Mod";
String _author = "Mona";
String _description = "Changes age values.";
String _icon = "icon.png";
int _userVersion = 1;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"
]
}

ExternalList list
{
External _resources
[
"Template/Citizen.rsc:citizen"
]
}


and the sad tries of batch files:

buildoverride, path H:\BanishedModkit

bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\x64\Tools-x64.exe /mod Package.rsc:Override /pathres ../example/Override /pathdat ../example/Override/bin


and 2. try buildoverride1:

bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\x64\Tools-x64.exe /mod Package.rsc:Citizen /pathres ../example/Override /pathdat ../example/Override/bin


So you can see that I actually had no idea what I was doing x) But I tried.. :D
I wanted to make this mod for my own entertainment, not for publishing it :(
Any advice would be appreaciated :D

Thanks
Title: Re: How To ...
Post by: RedKetchup on January 12, 2016, 07:44:53 AM
hello :)

ok just a little typo error :) sometime it is case sentitive and sometimes not

change : Package.rsc:Override
for Package.rsc:override 

your 2nd line has a capital O that should be a little o
because at the top of your package.rsc , 1st line,  you have written:


PackageFile override
{



like that
bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../example/Override /pathdat ../example/Override/bin

bin\x64\Tools-x64.exe /mod Package.rsc:override /pathres ../example/Override /pathdat ../example/Override/bin



your .pkm should be in : H:\BanishedModkit\bin\WinData\






Title: Re: How To ...
Post by: RedKetchup on January 12, 2016, 08:40:14 AM
just to make sure you see the last changes cause i edited it.
Title: Re: How To ...
Post by: rofldiekatz on January 12, 2016, 08:46:55 AM
(http://fs5.directupload.net/images/160112/temp/6f3ov9rk.jpg) (http://www.directupload.net/file/d/4231/6f3ov9rk_jpg.htm)

You saved me! Thanks :D

Just in case anyone else needs to know and is confused about everything edited, this is the actual bat file:

bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../example/override /pathdat ../example/override/bin

bin\x64\Tools-x64.exe /mod Package.rsc:override /pathres ../example/override /pathdat ../example/override/bin

Title: Re: How To ...
Post by: RedKetchup on January 12, 2016, 08:51:02 AM
i usually always work with a ressource.rsc file like overrideResources.rsc where all the external lists are in (i tend to make very big mods with is thousands of things called)
but put the list in package.rsc file at the bottom is acceptable too ^^

so this is the reason of my EDIT
Title: Re: How To ...
Post by: Pressure on June 22, 2017, 05:06:44 PM
I know I'm doing a necro here, but this is still a valuable thread. I have been pulling my hair out all day trying to create my first mod for Banished. Editing the rsc files and seeing the changes from that was working great, I just could not actually create the pkm file to use in my real Banished install. Now with your guidance, I just did.

Thank you so much!!!
Title: Re: How To ...
Post by: RedKetchup on June 22, 2017, 08:04:24 PM
awesome !! congratulations ! @Pressure  :)
Title: Re: How To ...
Post by: cenarius451 on February 13, 2018, 10:08:29 PM
Making a 3d model in 3DSMax and adding it into Fallout 4 is FAR easier than just trying to change the music files for this game and the lack of a basic step by step video tutorial doesn't help at all. Just decided to register to say this. Totally dissapointing.
Title: Re: How To ...
Post by: Discrepancy on February 13, 2018, 10:30:00 PM
Quote from: cenarius451 on February 13, 2018, 10:08:29 PM
Making a 3d model in 3DSMax and adding it into Fallout 4 is FAR easier than just trying to change the music files for this game and the lack of a basic step by step video tutorial doesn't help at all. Just decided to register to say this. Totally dissapointing.

Fair enough point, though as modders we are all in the same boat.
We learn from our mistakes. The great modders who started on this game years ago did all the leg work, search these forums, ask questions, ask for help, we make mods by trial and error.
We don't bite.
Title: Re: How To ...
Post by: Tom Sawyer on February 14, 2018, 02:50:03 AM
Yes, no manual, tutorial or such but it's a one person indie game and to make a documentation for this modkit would be a lot of work. Also, to figure things out can be part of the fun. Just ask here and you get help from modders. To change music and sound files is rather simple. You still want to do this?
Title: Re: How To ...
Post by: cenarius451 on February 15, 2018, 11:10:26 PM
Jesus christ. Forget it.

I just discovered the nexus site for Banished and there is like 5 or 6 people posting mods there. Visited the "Buildings/Constructions" category and there is only one guy (or group of guys) adding stuff into the game with the "discrepancyOK" name, so yeah a bunch of guys modding the game and for some reason they aren't willing to share their methods. There is nothing worst than a community not willing to share. That means there is no community at all.

So yeah, Banished modding support, dead on arrival. At least i tried.

Bye ;)
Title: Re: How To ...
Post by: RedKetchup on February 16, 2018, 01:24:12 AM
hey !

doesnt mean if we dont post on nexus that doesnt mean we dont share our knowledge !!!
i think there is no such banished website like this one, here !! and there is no website whos modders help as much as here !!


i know i personally think Nexus is an obscur place i dont know at all... but the fact is, i only post here because i want to make THIS website working and be THE major place for everything that is Banished :)

So like Tom said... if you have questions.... just ask ! you didnt asked anything, you only said your were disappointed.
Title: Re: How To ...
Post by: hadrian900 on June 18, 2018, 12:12:55 PM
I wonder how the modding became a thing in the first place when you actually have to chase right people to ask them bit by bit how to?
Title: Re: How To ...
Post by: RedKetchup on June 18, 2018, 12:49:24 PM
Quote from: hadrian900 on June 18, 2018, 12:12:55 PM
I wonder how the modding became a thing in the first place when you actually have to chase right people to ask them bit by bit how to?

bah us, particular me, there wasnt anybody to answer my questions :( so i've got to figure out everything alone.
Title: Re: How To ...
Post by: hadrian900 on June 18, 2018, 01:34:45 PM
To not make another thread:

How to put together two buildings into one mod properly?
Title: Re: How To ...
Post by: RedKetchup on June 18, 2018, 01:38:46 PM
Quote from: hadrian900 on June 18, 2018, 01:34:45 PM
To not make another thread:

How to put together two buildings into one mod properly?

you add a line to your resource file like ...


ExternalList resource
{
   External _resources
   [
      "Template/StorageBarn.rsc",
      "Template/StorageCart.rsc",
      "Template/StorageYard.rsc",
      "Template/CropField.rsc",
      "Template/Orchard.rsc:orchard",
      "Template/TradingPost.rsc"   
      "RKEditorChoiceEdition.rsc:RKGardenWallsGreenHouse",
      "RKEditorChoiceEdition.rsc:RKGardenWallsStables",
      "RKEditorChoiceEdition.rsc:RKGardenWallsWell",
      "RKEditorChoiceEdition.rsc:RKGardenWallsFodderFarmers",
      "RKEditorChoiceEdition.rsc:RKGardenWallsCustom5Barn",
      "RKEditorChoiceEdition.rsc:RKGardenWallsFlorist",

   ]
}

my example has 12 buildings... you just add lines.