Civ 5 .lua map doesn't show up when setting up game

213213213

Chieftain
Joined
Feb 25, 2016
Messages
2
Hey people, so i've been editing the "EE v10 BNW Epic Complete Europe.Civ5Map", because i thought it needed some changes, and a few more players. (can be found here http://forums.civfanatics.com/showthread.php?t=500154)
All good.
It worked smoothly out with the World Builder, i was able to change resources, the terrain, and able to set start locations for the civs, etc. and i have no problems loading the actual map, and the changes i make also work perfectly.

- However.
I also wanted True Start Locations (TSL), to make it more realistic. So i convert the .Civ5Map to a .lua file (with this program http://forums.civfanatics.com/showthread.php?t=504715)

When the file is a .lua file, it still loads up perfectly, however the The Start Locations that i added ( when in the World Builder) are gone and ignored - my french settler starts out in the middle of the Desert.

From what i've gathered, and seen on other .lua maps (which work fine), instead of putting the TSL from World Builder, you need to right click on the .lua file ( in assets/maps) ,and open it with Notepad ++, then put in all the civilizations, and their Starting Positions' values (The values can be found in the World Builder by looking at the original .Civ5map, not converted to .lua) through coding. I'm not specifially experienced with coding, but i tried looking at other .lua maps, and emulated how they did it (but ofc with different values).

So for example, i've added these 3 civilizations like this :

function nORbConvWorld:GetCivStartPlot(pPlayer)
local iCivType = pPlayer:GetCivilizationType();
print("MajorCivType: "..iCivType);

local arCivs = {}
local ResultPos = {-1,-1}
local thisCiv = GameInfo.Civilizations[iCivType];
if (thisCiv.ID == iCivType) then
print (thisCiv.ID..'='..thisCiv.Type..' :: '..Locale.ConvertTextKey(thisCiv.ShortDescription))
if (thisCiv.Type == "CIVILIZATION_EGYPT") then ResultPos = {66,3};
elseif (thisCiv.Type == "CIVILIZATION_ARABIA") then ResultPos = {80,5};
elseif (thisCiv.Type == "CIVILIZATION_ASSYRIA") then ResultPos = {84,19};

- These commands seem to work in all of the other .lua TSL multiplayer-compatible maps - and the .lua map i've converted works in itself too, but AS SOON as i punch in these codes, the map disappears from the in-game set-up screen.

So i'm almost certain, that i'm doing something wrong with the coding, if anyone knows why this is happening, and can show me what i have to do to add the TSL for these civs, and make it appear in-game, please let me know !

Thanks in advance.
 
Seriously? Nobody knows what the problem is? I've seen plenty of people like Gedemon making TSL maps, how do they code their .lua files?
 
If this is a question about Civ V maps, then perhaps posting in the Civ V forums would get you better replies?

Civ BE does not even have a world builder tool, so it's unlikely that any Civ BE modder will be able to help you with Civ V maps.
 
Well, Browd moved it, so he probably accidentally moved it here instead of the Civ5 forum. Reported it so it can be moved to the correct place where people probably know what's going on.
 
Sounds like you have a lua syntax error. Enable logging (see first link in my sig) and check the lua.log file

If the code you've given above is the complete code, it's missing two "end" statements Lua expects "if ... then ... end" and "if ... then ... elseif ... end" and both of your if statements are missing the final ends
 
My tools uses "true start location" information from xml-file, not from civ5map-file. Check my examples for "Play The World Extended BNW MARATHON" (xml-file).
 
Back
Top Bottom