1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Terra Incognita

Discussion in 'Civ5 - Map Scripts' started by rspeer, Sep 26, 2010.

  1. 1000.sassa

    1000.sassa Chieftain

    Joined:
    Sep 25, 2010
    Messages:
    12
    I tried a few times and i must say I got some really nice results!
     
  2. civcivv

    civcivv Warlord

    Joined:
    Dec 1, 2009
    Messages:
    126
    Location:
    London
    Looks interesting, but none of your screenshots show any old world. Or at least even the minimap seems to suggest there is no old world, or a vastly different old world?

    I'm looking for a map that gives the old world and then either a random new world or nothing at all (my own preference being an old map world only and your little ocean takes you from europe to asia - not too large an ocean).
     
  3. rspeer

    rspeer Spearman

    Joined:
    Apr 5, 2006
    Messages:
    101
    The "old world" is still random, not an exact copy of Earth. Like Terra, it rams a few random continents of the appropriate sizes together, which is why it sometimes still makes sense to refer to "Eurasia", "Africa", and "India" as features of how the map is generated.

    I'm not sure what your second question means, but it sounds like it needs a very different map script.
     
  4. Sirian

    Sirian Civ Map Programmer

    Joined:
    Dec 20, 2001
    Messages:
    3,651
    Location:
    Pennsylvania, USA
    That issue resides in the core fractal generator, which hasn't changed since Civ3.

    If I draw the assignment to do the maps for Civ6, I will see about re-engineering the fractal generator from the ground up, including expanding its output range. That won't help the occasional "straight edge" fractal output for Civ5, but there is only so much I can do at one time, and this game got the focus on start points and resources, which had much bigger problems.

    - Sirian
     
  5. rspeer

    rspeer Spearman

    Joined:
    Apr 5, 2006
    Messages:
    101
    Hey Sirian, thanks for the reply.

    Am I right that the bug is most apparent in MultilayeredFractal, because in plain Fractal it will generally happen at the poles?

    Can you think of any better way to tweak the fractal output than what I'm doing (to regenerate the map until I find one without straight edges over a certain length)?
     
  6. rt12568

    rt12568 Chieftain

    Joined:
    May 16, 2010
    Messages:
    19
    EDIT...nm seems to be an issue with bigger worlds mod rather than yours I think. Thanks again.
     
  7. Sirian

    Sirian Civ Map Programmer

    Joined:
    Dec 20, 2001
    Messages:
    3,651
    Location:
    Pennsylvania, USA

    The fractal generator has a lean factor. For a map that wraps x but not y, it leans horizontally. Civ5 doesn't allow for y wrapping, but Civ3 and Civ4 did, and there is a vertical lean. This tends to stretch out landmasses in the direction of the lean. Going with no lean will tend to get clumps in the middle, while leaning both at the same time will stretch the land all over.

    Any of the leans can produce some straight-edge effect, but clumps of land with no lean are not always suitable when trying to do specific things with subcontinents. For instance, when trying to layer multiple subcontinents in to a larger continent, the no-lean output can cause loss of cohesion: the pieces don't touch. If they were jammed tighter together to make them touch, the variability of the total output could be reduced too far.


    Discarding instances with a long straight edge is a reasonable workaround. The straight edge isn't always there, and when it's missing, the maps do look better.

    Having the fractal generation itself dismiss a result with a long straight edge would be a better workaround, but again, I won't be able to look in to something like that in the near term.


    - Sirian
     
  8. Tomice

    Tomice Passionate Smart-Ass

    Joined:
    Oct 5, 2009
    Messages:
    2,319
    Location:
    Austria, EU, no kangaroos ;)
    @ rspeer:

    I really like the vanilla terra script and will try out yours for sure.

    But there's one issue noone on the normal modding forum could answer.

    The mapscript very often generates enclosed oceans, without access to the new world. So there's 2 big bodies of water, and many civ's can't get out of the smaller one with their navies, making it impossible to colonize.

    Most of the time removing a few hexes of polar ice would be enough, but this is no longer possible in civ5 (no ingame worldbuilder). Saving the map as scenario, modding it and reusing it breaks the new world/ old world mechanic, it's treated as continents map afterwards.

    Is this fixed in your version? Otherwise, any suggestion would be greatly appreciated!



    EDIT: This should definitively not mean that I don't like inland seas. In fact, I LOVE maps with a mediterrenean situation. I'm just angry when I'm "Italy" and find out that "Gibraltar" is closed, locking my navy into a better swimming pool.

    Is there a way to make the mapscript remove land or (even better) ice that seperates a body of water larger than 50 or 100 tiles (at the thinnest possible passage)? Maybe two passages would be even better.
     
  9. ColBashar

    ColBashar Chieftain

    Joined:
    Nov 3, 2010
    Messages:
    32
    I was just dealing with this same issue on my own script. A simple workaround I found was to edit the FeatureGenerator:AddIceAtPlot() function so that it does not place ice on plots adjacent to land. A similar alternative could be to keep ice out of shallow water altogether. This would ensure that there is always at least a narrow channel access between the "Pacific" and "Atlantic" oceans.

    Best part of it, only one line of script need be changed, though to concept can be applied easily to any custom function that handles the application of ice:

    Code:
    if(plot:CanHaveFeature(self.featureIce) and plot:IsAdjacentToLand() == false) then
     
  10. Tomice

    Tomice Passionate Smart-Ass

    Joined:
    Oct 5, 2009
    Messages:
    2,319
    Location:
    Austria, EU, no kangaroos ;)
    Great, it worked! :thumbsup: :king:
     
  11. Gewar

    Gewar Chieftain

    Joined:
    Sep 9, 2009
    Messages:
    86
    Location:
    Gdynia - Poland
    I found one issue and do not know how it could be resolved.
    If there is a New World, some CS starts there - so they are not present on the Old World - so you could count them and gues, with high probability of success, if there is significant New World.

    Maybe:
    -you should add option of random number of CS
    -or make script place them, as there is NW and than remove some, if there is no land (so there is constant number of CS in the Old World)
    -or opposite - put all CS in the Old World and than add some to the NW
    -or do not put any CS in the New World
     
  12. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,104
    Gender:
    Male
    Location:
    Kansas City
    I want to say thanks for making this! I've used it for my last three games and they've been the best matches so far. I typically play this with High sea level, so it avoids the ocean problems above. After the next patch, given that the AI will now settle off continent, I expect this to be even better and be the only one I use (except for the occasional Earth map)...
     
  13. LetMyPeopleGo

    LetMyPeopleGo Prince

    Joined:
    Jan 20, 2008
    Messages:
    434
    If this thread is still alive, will someone please explain in simple words what should I do with this line of script?

    I hate land mass that goes from pole to pole.

    Thanks
     
  14. ColBashar

    ColBashar Chieftain

    Joined:
    Nov 3, 2010
    Messages:
    32
    Hello LetMyPeopleGo.

    It might be a little confusing if you're wholly new to Civ5 modding but let's see if we can get you through it. First thing you'll need to do is open up the FeatureGenerator.lua file in the [Civ5]\Assets\Gameplay\Lua\ directory with Windows Notepad or some other text editor.

    The individual functions in this file are separated by lines of hyphons. We need one called FeatureGenerator:AddIceAtPlot. It's about third or fourth from the bottom, I think. Highlight and copy the whole function.

    Now open up the Terra Incognita file in your [Civ5]\Assets\Maps\ directory. Scroll to the bottom and paste the function you just copied. Now that the function is copied, replace the second line of the function (the one indented only once and starting with "if") with the line I provided here on the thread.

    The function added to the Terra Incognita file should look like this:

    Code:
    function FeatureGenerator:AddIceAtPlot(plot, iX, iY, lat)
    	if(plot:CanHaveFeature(self.featureIce) and plot:IsAdjacentToLand() == false) then
    		if Map.IsWrapX() and (iY == 0 or iY == self.iGridH - 1) then
    			plot:SetFeatureType(self.featureIce, -1)
    
    		else
    			local rand = Map.Rand(100, "Add Ice Lua")/100.0;
    
    			if(rand < 8 * (lat - 0.875)) then
    				plot:SetFeatureType(self.featureIce, -1);
    			elseif(rand < 4 * (lat - 0.75)) then
    				plot:SetFeatureType(self.featureIce, -1);
    			end
    		end
    	end
    end
    Actually, you can just copy that and skip opening the FeatureGenerator.lua file altogether if you wanted. Anyway, save the Terra Incognita file and you should be good to go. Note that if you ever download any updates to the map script, you will have to repeat this process.

    Bear in mind that this won't prevent landmasses from reaching the poles but it will keep ice from blocking east-west passages between major oceans. Let me know if you have any trouble.
     
  15. LetMyPeopleGo

    LetMyPeopleGo Prince

    Joined:
    Jan 20, 2008
    Messages:
    434
    Hello ColBashar

    Many thanks for your reply, thanks to E-mail reminder.

    I've read throughout your reply and you did put in a very simple way, I'm on my way to do the necessary changes.

    What if I also change permanently the original (vanilla) generator function in FeatureGenerator.lua, so whatever map I choose will benefit from the change?

    Is it true?
     
  16. ColBashar

    ColBashar Chieftain

    Joined:
    Nov 3, 2010
    Messages:
    32
    Yes, editing the lua files in the Assets/Gameplay/lua directory would be a quick and dirty means of affecting the majority of Civ V's map generation; however, as a rule, I do not recommend editing the include files. It could lead to unexpected compatibility issues down the road. Although you'd probably be safe in this instance, you simply just never know. It would be cleaner and more professional to build a mod, though doing so exists outside the purview of my expertise.

    Any file you do decide to edit, remember to make a backup in case you break something and can't figure out how to fix it. It's a lot more convenient to replace a file than reinstall the game.
     
  17. LetMyPeopleGo

    LetMyPeopleGo Prince

    Joined:
    Jan 20, 2008
    Messages:
    434
    Thanks again, definitely going to back it up all, the file from the game and the Terra Incognita as well, a patch is due any day now, so I'll probably go on line for the patch with my original files in place, you can never know.
     
  18. Steelyglint

    Steelyglint Warlord

    Joined:
    Jun 21, 2011
    Messages:
    181
    Location:
    Britain
    I get Old Faithful, too. But it's always right next to a CS. Happens in both Terra and Terra Incognita.

    One thing I hated about Terra is that there's always a really long, unnaturally straight coast. Still get this with TI. Also, once I was playing as the Aztecs and the game started, but my Jaguar Warrior was about fifty tiles away. Standing on the ocean. I founded and clicked Next Turn, and the JW warped to 5 tiles away from my capital on a hill. Idk if it just happened or it was your script. :/

    Great script, it's all I play on now. C:
     
  19. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Playing this in a MP game with some friends and some AIs. We seem to have an aboslultey massive new world - from what I've seen so far it's even larger than the old world! Seems a bit over the top, but I guess it's part of the randomness.
     
  20. JtW

    JtW Prince

    Joined:
    Aug 23, 2010
    Messages:
    575
    Location:
    Poland
    This is my favorite map script so far!

    Question: would it be possible to somehow merge it with the Perfect World? That would be the ultimate map script for me!
     

Share This Page