Quick Modding Questions Thread

Did you install WL separately?
Because you don't need to, and I'm no sure if in the case you install only Vanilla and Bts, if or if not you then will also get parts of the WL file structure (I mean, even without WL it would make sense for the compatibility to install the missing WL files in new created WL directories, even without WL present).
 
CIV4UnitInfos.xml, check one of them like great prophet and you will know how it works
If you want to make sure it only buildable by the great person, edit iCost of building in BuildingInfos.xml to -1 as well
 
If you set the iWeight value to -1 an event trigger will go off as soon as the criteria are met.

To insure that it can happen, you should also set iPercentGamesActive to 100. It would be silly if it didn't work because that particular event trigger wasn't active in that particular test game...
 
You can also call any event from Python, either "naturally", which is the easiest way to see if it works:

gc.getPlayer(ePlayer).trigger(int eEventTrigger)

or by supplying specific data:

gc.getPlayer(ePlayer).initTriggeredData(int eEventTrigger, bool bFire, int iCityId, int iPlotX, int iPlotY, int eOtherPlayer, int iOtherPlayerCityId, int eReligion, int eCorporation, int iUnitId, int eBuilding)
 
Can't follow you :dunno:.

He meant, is it going to be taxing on performance like python.
For instance, a python code done in onUnitBuilt is going to be activated every time a unit is built. So even if it is just 1 line of code, it is going to slow down turn time abit, no matter how negligible.
Thus, since XML events have various checks as well, is it going to affect turn time as well
 
What is the deal with globaldefines.xml vs globaldefinesalt.xml? If I define a new integer that I will use in the SDK does it make a difference which one I do it in?
 
I think the alt version is theoretically the one which you should use in mods, and it's somehow a modular attempt to the whole thing (means you only put the stuff in which you'd like to change).
If you add a totally new value, then I guess you should use the normal one (since you can't overwrite anything which does not exist).
 
back with more questions.

I like to replicate following effect I saw in another mod:

I want to have a building that requires 2 specific resources to function, and produce a new resource as result.

I looked at buildinginfo wiki and found this:

PrereqBonuses --- Bonus type required for production

FreeBonus -------- Provides the city with iFreeBonus (see below) number of a certain resource, like Hit Musicals (BONUS_DRAMA), Hit Songs (BONUS_MUSIC), or Hit Movies (BONUS_MOVIES).

so I want to set PrereqBonuses to Iron and Coal
then I want to add new resource to the game called Steel, and have this building produce it as FreeBonus . (I assume that building will NOT provide freebonus if PrereqBonuses condition is not met)

Will something like that work?

thanks!
 
How can I make a road/railroad only unit? Like a car or wagon or something that can't go off road, but on the road it goes upwards of 6 squares per turn.
 
Back
Top Bottom