How to restore normal CS placement in Pangaea- and ContinentsPlus

Optional

Deity
Joined
May 22, 2007
Messages
2,935
Location
It Dockumer Lokaeltsje
This small tutorial is meant to show you how you can edit your PangaeaPlus or ContinentsPlus mapscript to deliver a normal City State placement.

Firaxis' mapscripts make sure the CS's get placed on the islands, but players mostly like these scripts for the added islands, not for the insular City State placement.
This can be helped! By deleting the part of the mapscript that deals with CS placement you will make the game fall back on generic CS placement.

If you do anything to a mapscript, it's best to first backup the original. Actually, you don't even need to touch the original. You can just copy it, then edit it, and put the edited version next to your original mapscript. Under a new name, of course, to prevent overwriting and for you and the game to tell the edited version apart from the original.
I cannot upload my own edited script here, that would be the easiest thing to do, but then you can play these mapscripts without having the Explorers map pack and this would constitute a legal issue. So you need to do your own editing.

Where can I find the original script?
The PangaeaPlus and ContinentsPlus mapscripts can be found in C:\program files\steam\steamapps\common\sid meier's civilization v\assets\DLC\DLC_SP_Maps\Maps
Alternative way of finding them is simply use the search function on your comp. That's probably easier with such a long file path.

If you have found the file, you can open it with a simple text editing program like notepad. Best make a copy of the file, rename it, only then start to edit.

How to edit it?
You need to look for the bit you need to cut out. It's way down the file, almost at the bottom. Look for this bit:
Code:
-----------------------------------------------------------------------------
function AddFeatures()
	print("Adding Features (Lua Continents) ...");

	-- Get Rainfall setting input by user.
	local rain = Map.GetCustomOption(3)
	if rain == 4 then
		rain = 1 + Map.Rand(3, "Random Rainfall - Lua");
	end
	
	local args = {rainfall = rain}
	local featuregen = FeatureGenerator.Create(args);

	featuregen:AddFeatures();
end
------------------------------------------------------------------------------

------------------------------------------------------------------------------
function AssignStartingPlots:AssignCityStatesToRegionsOrToUninhabited(args)
	-- Assign all city states away from the main continent.
It's not the 'function AddFeatures()' bit you need to cut out, it's where that bit ends you start to cut. I only included it here to help you find the bit you want. You can start cutting between the two dotted lines you see in the above bit.
It's a long bit you need to remove, all the way until the next dotted line:
Code:
end
------------------------------------------------------------------------------
function StartPlotSystem()
The word 'end' is the last bit you'll cut out.
Cutting this out is a matter of scrolling down with the left mouse bit pushed down and the 'Ctrl' pushed in at the same time to select it all. Then right click with the mouse to bring up the 'cut' command.

For both mapscripts it's very much the same procedure.

To make sure your edited mapscript has a unique name in-game, it is also recommendable to make an edit right at the top of the mapscript, where the in-game name gets determined:
Code:
------------------------------------------------------------------------------
function GetMapScriptInfo()
	local world_age, temperature, rainfall, sea_level, resources = GetCoreMapOptions()
	return {
		Name = "[COLOR="Purple"]TXT_KEY_MAP_PANGAEA_PLUS[/color]",
		Description = "TXT_KEY_MAP_PANGAEA_PLUS_HELP",
		IsAdvancedMap = false,
		IconIndex = 0,
The purple bit is the bit you need to change to give the map a unique name in-game, different from the original PangaeaPlus.

If you then rename your edited text files to, for example, 'ContinentsPlusEdit' or 'PangaeaPlusEdit', and you would put these together with the original ones, they would be selectable in-game and you can play Continents and Pangaea with island chains, but with normal CS placement!
 
Cool!!

Thanks for doing this, I always wanted to try pangea plus but the lack of city states ruined it for me. Never understood they did this on purpose!
 
I followed the directions and renamed each new file, ContinentsPlusEdit and PangaeaPlusEdit, like you suggested. I turned on civ and now in the map menu I have two ContinentsPlus and two PangeaPlus maps.

How do I get to rename the editted one in game? Or how do I tell which one is the editted file?

EDIT: Figured it out. There is a file name towards the top section of each map file...I had to edit that...not just the file name in the directory folder
 
Sorry, I've been a bit lax with this (also didn't follow this thread closely). I indeed forgot about changing the in-game name of the map. I've now added a bit to explain that.
Also someone expressed concern about the available space on the map after having the CS's in the mix again. Obviously the space will be less then, but in the original PangaeaPlus or ContinentsPlus the space was huge, this CS placement edit brings the available space more back to normal, comparable to what it is on normal Pangaea and Continents maps.
 
Hiya, I have a problem with your little modification, I do as you say, but when I do it, all the trees in the map disappear, everything else seems ok. I've entered debug mode to see if the modification worked correctly, but apparently it didn't. What did I do wrong?
 
I want to give a thanks to Optional. Continents Plus "Plus", as I call it, is now my favorite map script.
 
I have been playing with the Pangaea version of this, and I must say, I love it. It seems to place the city states about 50/50 (50% mainland, 50% island); which is perfect in my opinion. Thanks to Optional for this tip!
 
sorry for digging this out - i have been able to edit the map file properly, but the recommended way to change the displayed map name (in-game) hasnt been working for me.

so i end up with 2 maps named continents plus. tried editing the header (including the author etc), renaming and editing and the key_txt thing multiple times.. no success. can someone help?
 
@comatosedragon
If you want 50/50 citystate placement, you can just change this part of the original file:


Code:
-- Determine the number of City States to assign to uninhabited areas.
self.iNumCityStatesUninhabited = self.iNumCityStates;

to include a "/2":

Code:
-- Determine the number of City States to assign to uninhabited areas.
self.iNumCityStatesUninhabited = self.iNumCityStates [B]/ 2[/B];

This will put half the citystates on islands, instead of all of them. You can edit the original map file if this simple change is all you want, though it will get reset when the game patches.
 
sorry for digging this out - i have been able to edit the map file properly, but the recommended way to change the displayed map name (in-game) hasnt been working for me.

so i end up with 2 maps named continents plus. tried editing the header (including the author etc), renaming and editing and the key_txt thing multiple times.. no success. can someone help?
I have a related problem: I just don't see my copied (and edited) map file at all. :(
 
Just downloaded the new map script dlc. It has Small Continents Plus. I've played one game on it and it seems its another one where the city states are off in the corner on small islands.

Had to find this thread to try to fix it again!

EDIT: It seems the map script is a little bit different.

"Note: Unlike the other "Plus" maps, this one does not force City States to the tiny islands."

Found this but in my game, it sure seemed the city states were forced to the tiny islands.
 
I've done this before following the directions, but I can't seem to get this to work now. Just delete everything after addfeature but before Function StartPlot and change the name, right? I'm not seeing Continents PlusPlus (what I named it) as an option on the map list.
 
I've done this before following the directions, but I can't seem to get this to work now. Just delete everything after addfeature but before Function StartPlot and change the name, right? I'm not seeing Continents PlusPlus (what I named it) as an option on the map list.

Same
 
Because this thread still returns on google and the solution didn't work 100% for me and other people seem to have the same problem (albeit a long time ago):

Follow the guide, except instead of:

Code:
Name = "[COLOR="Purple"]TXT_KEY_MAP_PANGAEA_PLUS[/color]"

set Name to whatever you'd like to appear, in my case:

Code:
Name = "Pangea PlusPlus"
 
Top Bottom