Jump to content
catty-cb

Add climate and map together into a mod package by Slink

1 post in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

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.   :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.

 

  • Like 1

Share this post


Link to post
Share on other sites

×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections