Advertisement
Civilization Fanatics' Center  

Go Back   Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - Modding Tutorials & Reference

Reply
 
Thread Tools
Old Feb 10, 2012, 08:33 AM   #1
Optional
Deity
 
Optional's Avatar
 
Join Date: May 2007
Location: It Dockumer Lokaeltsje
Posts: 2,852
How to restore normal CS placement in Pangaea- and ContinentsPlus

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 = "TXT_KEY_MAP_PANGAEA_PLUS",
		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!
__________________

Last edited by Optional; Apr 24, 2012 at 07:56 AM.
Optional is offline   Reply With Quote
Old Feb 21, 2012, 06:27 AM   #2
zomg
Chieftain
 
Join Date: Sep 2010
Posts: 88
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!
zomg is offline   Reply With Quote
Old Mar 27, 2012, 10:33 AM   #3
Snoopaloop
King
 
Snoopaloop's Avatar
 
Join Date: Jun 2007
Posts: 607
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

Last edited by Snoopaloop; Mar 27, 2012 at 11:06 AM.
Snoopaloop is offline   Reply With Quote
Old Apr 24, 2012, 08:05 AM   #4
Optional
Deity
 
Optional's Avatar
 
Join Date: May 2007
Location: It Dockumer Lokaeltsje
Posts: 2,852
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.
__________________
Optional is offline   Reply With Quote
Old Sep 25, 2012, 03:43 PM   #5
jamesphillip
Chieftain
 
Join Date: Feb 2010
Posts: 7
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?
jamesphillip is offline   Reply With Quote
Old May 26, 2013, 07:23 PM   #6
Monado
Prince
 
Monado's Avatar
 
Join Date: Jul 2005
Posts: 498
I want to give a thanks to Optional. Continents Plus "Plus", as I call it, is now my favorite map script.
Monado is offline   Reply With Quote
Old Jun 22, 2013, 03:00 PM   #7
comatosedragon
King
 
comatosedragon's Avatar
 
Join Date: May 2008
Location: Harrisonburg Virginia
Posts: 796
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!
comatosedragon is offline   Reply With Quote
Old Jul 13, 2013, 06:56 AM   #8
pkf
Warlord
 
Join Date: Mar 2012
Location: Vienna
Posts: 163
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?
pkf is offline   Reply With Quote
Old Jul 15, 2013, 12:25 PM   #9
Thalassicus
Bytes and Nibblers
 
Thalassicus's Avatar
 
Join Date: Nov 2005
Location: Texas
Posts: 11,055
@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 / 2;
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.
__________________

We are the Modders. CiV will be assimilated.
We will enhance its biological and technological distinctiveness with our own.
Resistance is futile.


Communitas Expansion Pack
Wiki - Discussion - News


Forum Icons ~ Starting Civ5 Mods ~ Forum Tables
Thalassicus is offline   Reply With Quote
Old Aug 10, 2013, 02:22 PM   #10
joeyconnick
Chieftain
 
Join Date: Apr 2007
Posts: 4
Quote:
Originally Posted by pkf View Post
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.
joeyconnick is offline   Reply With Quote
Old Oct 19, 2013, 07:39 PM   #11
Monado
Prince
 
Monado's Avatar
 
Join Date: Jul 2005
Posts: 498
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.

Last edited by Monado; Oct 19, 2013 at 07:58 PM.
Monado is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Civ5 - Modding Tutorials & Reference > How to restore normal CS placement in Pangaea- and ContinentsPlus

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 04:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR