Quick Modding Questions Thread

I'm not sure if this really counts as a quick question or deserves its own thread, but here goes. Relevant for this post are the following XML tags in CivicInfos:

iBaseFreeMilitaryUnits
iBaseFreeUnits
iFreeMilitaryUnitsPopulationPercent
iFreeUnitsPopulationPercent
iGoldPerMilitaryUnit
iGoldPerUnit

As far as I am aware iBaseFreeMilitaryUnits, iFreeMilitaryUnitsPopulationPercent and iGoldPerUnit are unused in the unmodded game, while the other half is being used by Vassalage for free units and Pacifism for extra cost military.

I suspect iGoldperUnit would be an even more hardcore variant of Pacifism, as even workers, missionaries, executives, spies etc. would cost extra upkeep, correct?

What intrigues me even more though is iBaseFreeMilitaryUnits and iFreeMilitaryUnitsPopulationPercent. I suspect that no matter how high you set them they are completely useless if you don't have any units that either cost extra upkeep by themselves, (I think UnitInfos has a tag for extra upkeep) or are also running a civic which adds military unit upkeep, that is Pacifism, to counteract that.

Is my conjecture correct? If so making a civic decrease military unit upkeep would only make sense if I wanted it to be preferably used together with another civic in another category which does increase military upkeep.
 
Hi, I am making some xml tweaks for ashes of erebus (a rise from erebus modmod). I added a new civic and I want it to give a free citizen per town improvement but I haven't been succesful. I would be glad if someone could tell what do I hace to type in order to make it work.
 
Hi, I am making some xml tweaks for ashes of erebus (a rise from erebus modmod). I added a new civic and I want it to give a free citizen per town improvement but I haven't been succesful. I would be glad if someone could tell what do I hace to type in order to make it work.

The easiest but also inelegant solution would be to add a new cheap building which can only be built when running that civic. To make a civic provide that effect by itself requires some actual C++ programming I'm afraid.
 
I'm playing a mod, Realism Invictus, in which barbarian culture is producing "We want to rejoin our homeland" unhappiness, which I am pretty sure I have never seen before. I want to mod it back so barb culture does not do this, but I don't know what file this would be in. Help?
 
The easiest but also inelegant solution would be to add a new cheap building which can only be built when running that civic. To make a civic provide that effect by itself requires some actual C++ programming I'm afraid.

Thanks for your answer. I added <PrereqCivic>CIVIC_ARISTOCRACY</PrereqCivic> to a building and the line doesn't work. What do I have to do?
 
Without appropriate coding in the dll, you can't add a tag in a file and expect it to work.
 
Quick Question &#8212; sorry for the repost if this one (the forum's custom search is disabled) &#8212; is there any way to backup a copy of your Civ files while installing mods? Other than reinstalling. For example if I get one mod to work and want to try installing more, I want a copy of the first arrangement so I can return to it if I mess up later.
Will backing up the registry work?
 
Installing a mod should do nothing but adding a folder inside MODS in the game directory. The game will not read anything in that folder unless you order it to load the mod in question.

Having said that, who knows what the installer will do? Personally I really prefer just a zip file and then I can copy the folder into MODS myself.

I guess you could make a copy of the entire game directory if you are scared that you can screw up your game. I never tried doing that and I never had problems installing mods.
 
I was wondering where I would find and edit map generation specifications? Specifically land/water-ratio. Is it python or xml file, or would I need to recompile something?

I love Archipelago, but even with low sea level, there is a bit too often players stuck in small areas in middle of ocean (really kills 3+ players multiplayer attempts). By my estimation, there is 60% water tiles, and I'd like to edit it closer to 55%. Of course, I'd also like more landy Snaky Continents and Small Islands -options too, now they're too few and far apart for any early exploration to take place.

Do I need to also add "grains" in order to generate more of them or something?
 
Most of this is done in python in the map scripts.

I can't remember if some stuff is stored in the dll or not...

In some mapscript files you see mention of various 'math systems' like a 'soren's land mass' or 'steve's island geometry' (I made these two up I can't remember actual ones I have seen when looking in pangaea myself) these might be stored in the .dll, again I can't really remember.

Most of it however is in python, someone helped me reduce the amount of water that there was in pangaea and it involved jsut the python in that mapscript (we had to delete some of the randomness, as it had 1-3 different ways of making the map that it randomly picks from each time)

look in the maps script you want, and search for words like sea, water, landmass, etc. and you should find code with numbers you can change, then begin experimenting with those numbers and the maps they generate.

I was going to post a link to an old thread I made that looked at this, but it looks like threads from the main discussion board are not there at the moment, so I can't find it.. sorry.
 
Okay, smallish further question.

I have successfully used cvmapgeneratorutil to have all map types calling fractalworld (like archipelago and islands) have more land (waterpercent from 78 to 75). So that's fine.

However, the script refers to sealevelchange variable, which is defined as self.gc.getSeaLevelInfo(self.map.getSeaLevel()).getSeaLevelChange(). That does not come from the specific map python scripts, at least I couldn't find it.

So, where does it come from?
Or, easier one: How much is it with each sea level?

I don't even necessarily want to edit it, I just would like to know how big it is.

EDIT: And, how do I make, if I can, it so that the continents aren't bigger, but there are more islands? Occasionally, the increased landmass shows up only by having megasnakecontinents (archipelago-archipelago), whereas I would like more of as is continents but more or bigger islands.
 
The CyGlobalContext object, which is what the self.gc is a shortcut for, has functions (like getSeaLevelInfo()) which are actually calling functions in the DLL. The actual functions are not in the Python.
 
self.map.getSeaLevel() should tell you which sea level the map is using.
self.gc.getSeaLevelInfo(self.map.getSeaLevel()).getSeaLevelChange() will then refer to CIV4SeaLevelInfo.xml to get its value.
 
Hi! Why do units dissapear on next turn when spawn units script is activated?

How to make a certain territory unavailable for settlers to settle?
 
I've been modding the Fury Road mod for a bit now. Adding/replacing a whole mess of units. Everything seems to be going fine. However the resettle button(presumably a python button), for the refugees/caravans, is no longer showing up at all. At first I thought it was because I edited python, so I reverted that. The problem was still present. Eventually after taking apart the changes I made one painful piece at a time I found that it from having too many new art assets. Even if the file in Assets/Art weren't being used for anything their existence was somehow stopping the resettle button from showing up.

Long story short: Having too many art files lead to python buttons not showing up. Does anyone know of any way to fix this?
 
Would packing the art with pakbuild have any impact? I attempted unpaking fury road's art but it didn't change anything.

edit: that didn't change things either.

 
I've been modding the Fury Road mod for a bit now. Adding/replacing a whole mess of units. Everything seems to be going fine. However the resettle button(presumably a python button), for the refugees/caravans, is no longer showing up at all. At first I thought it was because I edited python, so I reverted that. The problem was still present. Eventually after taking apart the changes I made one painful piece at a time I found that it from having too many new art assets. Even if the file in Assets/Art weren't being used for anything their existence was somehow stopping the resettle button from showing up.

Long story short: Having too many art files lead to python buttons not showing up. Does anyone know of any way to fix this?

Coming from Caveman2Cosmos I doubt it is the number of art files or the packed/unpacked nature of them. (Our packed art is about 0.9 GB!)

I think we have had this problem, button not showing up for unit, when there is something not quite right about the graphics of the unit that uses the button.
 
Like Dancing Hoskuld, I don't believe in your conclusion. Do you play with Python exceptions enabled? Any message?

Edit: did you change the unit types of the refugee/caravans?
 
Top Bottom