-
Announcement
-
Simtropolis Returns! 05/26/2026
See here for details about our site recovery efforts.
-
Search the Community
Showing results for tags 'slink'.
Found 3 results
-
Add climate and map together into a mod package by Slink
catty-cb posted a topic in Banished's Modding
Having done the first two steps and then 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. 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. 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. -
Make a perfectly flat map with only the river by Slink
catty-cb posted a topic in Banished's Modding
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. -
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.

