1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

How to restore normal CS placement in Pangaea- and ContinentsPlus

Discussion in 'Civ5 - Modding Tutorials & Reference' started by Optional, Feb 10, 2012.

  1. Optional

    Optional Chieftain

    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!
     
  2. zomg

    zomg Chieftain

    Joined:
    Sep 17, 2010
    Messages:
    89
    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!
     
  3. Snoopaloop

    Snoopaloop Chieftain

    Joined:
    Jun 23, 2007
    Messages:
    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
     
  4. Optional

    Optional Chieftain

    Joined:
    May 22, 2007
    Messages:
    2,935
    Location:
    It Dockumer Lokaeltsje
    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.
     
  5. jamesphillip

    jamesphillip Chieftain

    Joined:
    Feb 1, 2010
    Messages:
    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?
     
  6. Monado

    Monado Chieftain

    Joined:
    Jul 9, 2005
    Messages:
    737
    I want to give a thanks to Optional. Continents Plus "Plus", as I call it, is now my favorite map script.
     
  7. comatosedragon

    comatosedragon Chieftain

    Joined:
    May 5, 2008
    Messages:
    857
    Location:
    Harrisonburg Virginia
    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!
     
  8. pkf

    pkf Chieftain

    Joined:
    Mar 28, 2012
    Messages:
    163
    Location:
    Vienna
    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?
     
  9. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    @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.
     
  10. joeyconnick

    joeyconnick Chieftain

    Joined:
    Apr 10, 2007
    Messages:
    12
    I have a related problem: I just don't see my copied (and edited) map file at all. :(
     
  11. Monado

    Monado Chieftain

    Joined:
    Jul 9, 2005
    Messages:
    737
    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.
     

Share This Page