Generic Scripting Problems

MadMage86

Warlord
Joined
Sep 24, 2009
Messages
127
Location
Florida
All right, so... I am trying to wrap my head around map scripting; I don't know the language the game files are written in (I've used LISP a bit) and trying to learn them is difficult because the files want to grab information from somewhere else - nothing is entirely contained within one script, making it hard to read. Knowing where the XML "TXT_KEY" type files are being hidden would be cool. I'm not looking to do anything spectacular, I just want to start by being able to tweak existing scripts and I've got a few goals I need a hand with. Thanks.

1. I'd like to add another option for map sizes designed to host 50% more civs and city states than huge (yeah, I'm insane) - I've already added the class to the xml files but the option won't show up in-game. How exactly do I go about this sort of thing for future reference?

2. I want a standalone function that will pull maps away from the northern and southern borders - basically, I want to avoid useless tracts of frozen land that block naval units. I need it to be flexible (distance based on a percentage of the map's height) and I need to be able to shoehorn it into any of the existing scripts that use the fractal generator without heavy modification. I intend to modify the height of the maps to account for the lost space, if anyone's curious. 5:4 aspect ratio seems to work well. [This probably should have been first, it's the one I'm most concerned with]

3. My main goal is to create a map somewhere between Continents and Small continents - I'm looking for 3-5 decent landmasses not joined by 'land bridges'. As far as I can tell, the 'grain' variable controls this to an extent in the fractal-based maps but it doesn't appear capable of being tweaked much between "2 continents" and "smattering of incoherent islands". Any thoughts on this would be appreciated.
 
Hello. This is probably not the good section for this so I guess the admins will move your topic. Anyway...

The text keys are in Assets/Gameplay/Xml/NewText.
The lua files used by map scripts are all in Assets/Gameplay/Lua.
Notepad++ and its "search in all files" (ctrl + shift + F) feature makes this powerful text editor a modder's best friend.

1. Maybe you did it incorrectly or maybe it's hard-coded in the UI (you would then have to replace this part). Did you look at the setup screen (Assets/UI/Frontend/GameSetup/SelectMapSize.*)?

2. I think there is a constant in GameDefines.xml to to adjust the latitude ice starts to appear. If I am wrong or if scripts ignore that setting, just search "ice" with Notepad++ in the before-mentioned Lua folder, it will be a matter of understanding the code after that.

3. I have absolutely no idea about this since I never studied their fractal scripts. But at worst you should be able to replace one of the common functions so that it loops as long as the landmasses count is wrong (use areas to make counting easy: one ocean, two lakes and three landmasses means 6 areas, you just need to look at the first plot).
 
Top Bottom