Advertisement
Civilization Fanatics' Center

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

Reply
 
Thread Tools
Old Jul 14, 2012, 01:56 PM   #1
NaturalWonder
Chieftain
 
Join Date: Jul 2012
Posts: 10
Gods and Kings Easy way to add more natural wonders?

Hey guys, I'm a huge Civ fan and have been really enjoying Civ5 lately. Anyway, I really like natural wonders and was wondering if there is a simple way to mod a map (say the archipelago map or continents map) to spawn more natural wonders. It seems like a "normal" sized map always produces 5, but I think it would be cool to have 10 or something.

I'm new to the forum, so if there is a thread where this has already been done feel free to redirect me there.

If it's important I'm using a Mac, play Civ5 through Steam and have all the DLC including the God/Kings expansion.

Thanks!
NaturalWonder is offline   Reply With Quote
Old Jul 14, 2012, 02:00 PM   #2
Pouakai
Tangaroa

 
Pouakai's Avatar
 
Join Date: Jun 2010
Location: The Republic of New Zealand
Posts: 6,058
Images: 24
I would presume it would be possible to add more natural wonders on a proper map (Like the Earth map, it's not actually a script) through WorldBuilder, but I'm not sure about the map scripts
Pouakai is offline   Reply With Quote
Old Jul 14, 2012, 02:10 PM   #3
NaturalWonder
Chieftain
 
Join Date: Jul 2012
Posts: 10
Quote:
Originally Posted by Pouakai View Post
I would presume it would be possible to add more natural wonders on a proper map (Like the Earth map, it's not actually a script) through Worldbuilder, but I'm not sure about the map scripts
Let me see if I get what you are saying. So through Worldbuilder I could manually add more wonders onto a map? But this wouldn't allow me to randomly generate a map with more natural wonders? Thanks for your help in any case.

Also it seems as though I can't download Worldbuilder at the moment. Perhaps because Steam is too busy.
NaturalWonder is offline   Reply With Quote
Old Jul 14, 2012, 02:12 PM   #4
Pouakai
Tangaroa

 
Pouakai's Avatar
 
Join Date: Jun 2010
Location: The Republic of New Zealand
Posts: 6,058
Images: 24
You can randomly generate maps in worldbuilder, but you would have to manually add the extra wonders in and you would know where everything is
Pouakai is offline   Reply With Quote
Old Jul 14, 2012, 02:20 PM   #5
NaturalWonder
Chieftain
 
Join Date: Jul 2012
Posts: 10
Quote:
Originally Posted by Pouakai View Post
You can randomly generate maps in worldbuilder, but you would have to manually add the extra wonders in and you would know where everything is
Ah OK, that's what I thought you meant. Obviously I'd rather have the wonders scattered randomly, but that is pretty good too. Thanks!

If anyone can give me some advice on a script I can use let me know.
NaturalWonder is offline   Reply With Quote
Old Jul 14, 2012, 03:06 PM   #6
NaturalWonder
Chieftain
 
Join Date: Jul 2012
Posts: 10
In case anyone is wondering, I'm making progress. I'm sure most modders know this stuff already, but here is where I am:

1) User > Library > Application Support > Steam > SteamApps > common > Civ 5

2) Right Click the Civ5 Gods/Kind Application and choose "show package contents"

3) Contents > Home > assets > DLC > Expansion > Gameplay

Under XML you can open Terrain then CIV5Features to view a list of tiles, including the 15 Natural Wonders.

Lua seems to have the scripts I want to change though. From looking at the map files they are calling the script AssignStatingPlots.lua, so open that up. Right now I'm browsing that and trying to find where it assigns the number of natural wonders for a map. Hopefully I can change a single number and be done

Edit: Found this part in AssignStatingPlots.lua

-- Determine how many NWs to attempt to place. Target is regulated per map size.
-- The final number cannot exceed the number the map has locations to support.
local worldsizes = {
[GameInfo.Worlds.WORLDSIZE_DUEL.ID] = 2,
[GameInfo.Worlds.WORLDSIZE_TINY.ID] = 3,
[GameInfo.Worlds.WORLDSIZE_SMALL.ID] = 4,
[GameInfo.Worlds.WORLDSIZE_STANDARD.ID] = 5,
[GameInfo.Worlds.WORLDSIZE_LARGE.ID] = 6,
[GameInfo.Worlds.WORLDSIZE_HUGE.ID] = 7
}
local target_number = worldsizes[Map.GetWorldSize()];
local iNumNWtoPlace = math.min(target_number, iNumNWCandidates);
local selected_NWs, fallback_NWs = {}, {};
for loop, NW in ipairs(NW_eligibility_order) do
if loop <= iNumNWtoPlace then
table.insert(selected_NWs, NW);
else
table.insert(fallback_NWs, NW);
end
end

So it seems like all I need to do is change this part. The first thing I will try is to replace the worldsizes with bigger numbers.

Last edited by NaturalWonder; Jul 14, 2012 at 03:20 PM.
NaturalWonder is offline   Reply With Quote
Old Jul 14, 2012, 03:17 PM   #7
Pouakai
Tangaroa

 
Pouakai's Avatar
 
Join Date: Jun 2010
Location: The Republic of New Zealand
Posts: 6,058
Images: 24
Awesome that you found that. I'm not sure how the lua tables are updated, as I've got very little knowledge in that. But I would presume updating that section there through a mod (Not in base game, very dangerous) would change the ammount of natural wonders to be placed.
Pouakai is offline   Reply With Quote
Old Jul 14, 2012, 03:31 PM   #8
NaturalWonder
Chieftain
 
Join Date: Jul 2012
Posts: 10
Hahaha, I just went ahead and edited it for the base game (I had created a backup file, so I assumed worst comes to worst it would be OK) and it worked!

I started a game on a Standard size Pangaea map and my starting warrior found the Grand Mesa in like 5 turns and the game said there were 11 more Natural Wonders still to find!
NaturalWonder is offline   Reply With Quote
Old Jul 14, 2012, 03:33 PM   #9
Barathor
Prince
 
Barathor's Avatar
 
Join Date: May 2011
Posts: 579
Yes, the LUA function is what you want to change. There's also an XML value in Civ5Worlds.xml, but that doesn't seem to be used or have any effect.

Either edit AssignStartingPlots.lua itself and make the changes to: function AssignStartingPlots:PlaceNaturalWonders()

(This will affect all your maps when using this mod.)

or

Copy function AssignStartingPlots:PlaceNaturalWonders() into a LUA map script (such as a custom one you've created or one you use most often) and make the changes there.

(This will affect only that map script and others will be unaffected)

I'm not very experienced with LUA, so I don't know if there's a slicker way to do it. Some functions you don't even need to copy over to the map script and you can just change a list of variables and send them over as "args" when you call the function. But, as far as I know, this one doesn't look like you can do that.
Barathor is offline   Reply With Quote
Old Jul 14, 2012, 03:35 PM   #10
whoward69
Deity
 
Join Date: May 2011
Location: Near Portsmouth, UK
Posts: 5,575
Quote:
Originally Posted by jpbar81 View Post
But, as far as I know, this one doesn't look like you can do that.
It's hard coded; there's even a comment that says it should be moved out into XML! Looks like a job half-complete
__________________
All my mods (.civ5mod files) can be downloaded from http://www.picknmixmods.com/. If you want to incorporate (parts of) my mods into your own mod(s), please read this first

Logging Attach mod File attributes UI Tutorials My Changes Mod DDS Basics Custom Game DLL Tutorials My DLL Source Unit Art Files Civ XML Files
whoward69 is online now   Reply With Quote
Old Jul 03, 2014, 07:18 PM   #11
GerrardCapashen
Emperor
 
GerrardCapashen's Avatar
 
Join Date: Dec 2002
Location: Texas, U.S.A.
Posts: 1,345
Quote:
Originally Posted by NaturalWonder View Post

-- Determine how many NWs to attempt to place. Target is regulated per map size.
-- The final number cannot exceed the number the map has locations to support.
local worldsizes = {
[GameInfo.Worlds.WORLDSIZE_DUEL.ID] = 2,
[GameInfo.Worlds.WORLDSIZE_TINY.ID] = 3,
[GameInfo.Worlds.WORLDSIZE_SMALL.ID] = 4,
[GameInfo.Worlds.WORLDSIZE_STANDARD.ID] = 5,
[GameInfo.Worlds.WORLDSIZE_LARGE.ID] = 6,
[GameInfo.Worlds.WORLDSIZE_HUGE.ID] = 7
}


So it seems like all I need to do is change this part. The first thing I will try is to replace the worldsizes with bigger numbers.
Thread necro!

I tried doing this, and I never get more than 8 even when I have the max set to 14. Is there something else I have to modify?
__________________
Wear courage as your armor. Wield honor as your blade.
GerrardCapashen is offline   Reply With Quote
Old Jul 06, 2014, 10:57 AM   #12
Danmacsch
Warlord
 
Danmacsch's Avatar
 
Join Date: Jan 2014
Location: Copenhagen, Denmark
Posts: 141
Gender: Male
I would also like to know this. Can't really find any new info confirming that it can/can't be done.
__________________
Danmacsch's (Damasc's) New Civilizations:
Released civilizations: Corsican Republic
Upcoming civilizations: The Nuraghians, Duchy of Amalfi, Republic of Ragusa
Danmacsch is offline   Reply With Quote
Old Jul 06, 2014, 01:54 PM   #13
kaspergm
Deity
 
kaspergm's Avatar
 
Join Date: Aug 2012
Posts: 2,157
Quote:
Originally Posted by GerrardCapashen View Post
Thread necro!

I tried doing this, and I never get more than 8 even when I have the max set to 14. Is there something else I have to modify?
No, modifying AssignStartingPlots.lua should be the only change necessary - I say that with some confidence because I've done this change myself, and it works as intended. I suppose some hiccups may arise if you try to place a very large number of natural wonders on a very small map, simply because there will not be enough elegible spots. Are you sure that the game is actually using your modified ASP.lua - i.e. have you imported the file correctly?
kaspergm is offline   Reply With Quote
Old Jul 07, 2014, 04:51 AM   #14
Danmacsch
Warlord
 
Danmacsch's Avatar
 
Join Date: Jan 2014
Location: Copenhagen, Denmark
Posts: 141
Gender: Male
Quote:
Originally Posted by kaspergm View Post
No, modifying AssignStartingPlots.lua should be the only change necessary - I say that with some confidence because I've done this change myself, and it works as intended. I suppose some hiccups may arise if you try to place a very large number of natural wonders on a very small map, simply because there will not be enough elegible spots. Are you sure that the game is actually using your modified ASP.lua - i.e. have you imported the file correctly?
Does this also apply for custom natural wonders?
__________________
Danmacsch's (Damasc's) New Civilizations:
Released civilizations: Corsican Republic
Upcoming civilizations: The Nuraghians, Duchy of Amalfi, Republic of Ragusa
Danmacsch is offline   Reply With Quote
Old Jul 07, 2014, 09:28 AM   #15
Barathor
Prince
 
Barathor's Avatar
 
Join Date: May 2011
Posts: 579
Quote:
Originally Posted by GerrardCapashen View Post
Thread necro!

I tried doing this, and I never get more than 8 even when I have the max set to 14. Is there something else I have to modify?
To increase the total, you just need to increase the values per world size in PlaceNaturalWonders(). Though, as kaspergm said, to increase the chances of getting that total onto the map (especially if it's large -- like 14!!), you'll need to tinker with the ripple radius of placements. Otherwise, they'll easily block each other out.

NW's block other NW's in a radius equal to: (height of map) / 5

Also, remember, civ starts block out NW's too in a radius equal to: 4
(Though, you shouldn't really need to decrease that, even with many civs -- it would unbalance things further. It's just something to keep in mind when determining the other ripple radius.)

Just do a search for "self:PlaceResourceImpact(x, y, 6" and you'll find both of them (6 is the natural wonder layer) and modify the last value.
__________________
MY STEAM WORKSHOP
Barathor is offline   Reply With Quote
Old Jul 07, 2014, 09:30 AM   #16
Barathor
Prince
 
Barathor's Avatar
 
Join Date: May 2011
Posts: 579
Quote:
Originally Posted by Danmacsch View Post
Does this also apply for custom natural wonders?
If you mean ones which use the custom method, then yes.

If you mean new ones added to the game, then yes (if you're also not using a new placement method).
__________________
MY STEAM WORKSHOP
Barathor is offline   Reply With Quote
Old Jul 10, 2014, 12:11 AM   #17
GerrardCapashen
Emperor
 
GerrardCapashen's Avatar
 
Join Date: Dec 2002
Location: Texas, U.S.A.
Posts: 1,345
Quote:
Originally Posted by kaspergm View Post
No, modifying AssignStartingPlots.lua should be the only change necessary - I say that with some confidence because I've done this change myself, and it works as intended. I suppose some hiccups may arise if you try to place a very large number of natural wonders on a very small map, simply because there will not be enough elegible spots. Are you sure that the game is actually using your modified ASP.lua - i.e. have you imported the file correctly?
I figured out the problem I was having. If you have BNW, you have to modify the AssignStartingPlots.lua in the Expansion2 folder. Since I was following these instructions from after GnK, I only modified the GnK file. For those that have BNW, just make sure you change the correct file.

I set the standard amount of NWs on standard maps to be 12. I've seen 12-13 spawn each time now, because the Great Barrier Reef will almost always spawn and thus increase the number of NWs you can find by 1.

On a related note, does anybody know how to make NWs avoid city-states? Having CSes grab half the NWs on the map is kind of annoying.
__________________
Wear courage as your armor. Wield honor as your blade.
GerrardCapashen is offline   Reply With Quote
Old Jul 10, 2014, 12:17 AM   #18
GerrardCapashen
Emperor
 
GerrardCapashen's Avatar
 
Join Date: Dec 2002
Location: Texas, U.S.A.
Posts: 1,345
Quote:
Originally Posted by GerrardCapashen View Post
On a related note, does anybody know how to make NWs avoid city-states? Having CSes grab half the NWs on the map is kind of annoying.
http://forums.civfanatics.com/showthread.php?t=508236

Google helped me out here, so I figured I'd reply to myself to help out anybody else who wants to grab those tasty NWs for themselves. I haven't tried this yet myself but I don't see any reason it wouldn't work.
__________________
Wear courage as your armor. Wield honor as your blade.
GerrardCapashen is offline   Reply With Quote
Old Jul 10, 2014, 01:58 AM   #19
kaspergm
Deity
 
kaspergm's Avatar
 
Join Date: Aug 2012
Posts: 2,157
Quote:
Originally Posted by GerrardCapashen View Post
http://forums.civfanatics.com/showthread.php?t=508236

Google helped me out here, so I figured I'd reply to myself to help out anybody else who wants to grab those tasty NWs for themselves. I haven't tried this yet myself but I don't see any reason it wouldn't work.
Oh thanx very much for the link to the information about Natural Wonder / City State ripple number. I had myself considered changing the placement order of the two, but was woried that it might cause issues, so haven't come to it now. This seems a lot easier - if you do try it out, please let us know how it plays out!
kaspergm is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Easy way to add more natural wonders?

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 06:44 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