Quick Modding Questions Thread

Is there a limit to the number of lines in an XML file, e.g. 64K or 65535 ?

My current Units file is 41,000+ and growing.
 
How does one change the food requirement for population (such as in Orbis)? Is this as simple as XML, or does it require python or DLL changes?
 
Not sure ... Trying looking at the Global...XML file in the \Assets\XML folder.
 
Found it, in GlobalDefines.
<DefineName>FOOD_CONSUMPTION_PER_POPULATION</DefineName>
<iDefineIntVal>2</iDefineIntVal>
 
I am hardout coding in over 100+ unique units into RtW. This is to expand and rectify the graphics used by major nations and add new ones for minor nations.

If I can successfully;

1) load a scenario
2) get no XML errors appear
3) add the new units via Worldbuilder

and get no crash, do I need to play a few turns into the game to verify or are the first 3 steps sufficient in testing ?
 
No need imho.

The only thing which is not caught by this are buttons with a size bigger than 64*64. These will lead to a crash in the city menu, but not in the worldbuilder menu.
But i don't think that any technical things else have to be checked.
 
Hey, I've got a few questions:
Can I change the Manhatten project from a world project, to a team project, or some quasi inbetween state:
ideally, to build tactical nukes and ICBMs, a player would need their own Manhatten Project (like they each need to do their own apollo program), but once anyone completes the Manhatten Project, everyone can build bomb shelters/ start SDI.

#2) making SDI a sort of "World Wonder Project", where only one person can complete it (and only one person gets the benefit.
Do I just change "<iMaxGlobalInstances>-1</iMaxGlobalInstances>" from cvi4projectinfo.xml from -1 to 1?
-I intend for SDI to be crucial to winning an all out war-> I'll raise the interception chance to 85%, so only 15%, rather than 25% of ICBMs get through, woe to you if your enemy completes SDI, right about the time you planned to engage in nuclear warfare)
As a side non-modding question: Does SDI intercept tactical Nukes? or do fighters intercept them? or can both do it? I'm new to BTS, and I've only ever seen SDI used against ICBMs

3) Paratroopers: I'd like to add another type of ambibious assault to the repertoire available.... and that is paratroopers launched from a ship.
Either allow a carrier to carry paratroopers as well, or make a new unitclass "assault ship", that can allow one to drop paratroopers a few tiles inland, from the ocean.

With cruise missiles and tactical nukes, we've already had Naval power expanded, such that naval units don't pose an immediate threat to only coastal cities.

I would like to see a naval task force able to send in airstrikes, finish off the defenders with cruise missiles/tactical nukes, and send in paratroopers to secure a city 4 tiles inland, in a single turn.
that would be pwnage
 
1) that's one of the most discussed things, and i'm really not sure if a solution is available. There's a thread about it in the mod comps subforum, maybe look into it.

2) @ the modding question: yes, that should work.

3) Would need some heavy SDK modifications.
 
I'd like to add new unit for a Civ - but it won't replace an existing unit. Is there a simpler way than putting in NONE for every other Civ in Civ4CivilizationInfos.xml in the appropriate section?
 
As I am coding, I keep all my file versions in the same folder.

e.g. CIV4UnitInfos0.39.31.XML, CIV4UnitInfos0.39.21.XML, CIV4UnitInfos0.39.33.XML, etc.

and similarly in the Assets\XML\TEXT folder.

But for some reason, my unit name changes were not registering and it was frustrating me. So just by chance I thought I'll check the XML log file, and lo and behold, it was loading all the text files including my old versions.

Deleted the obselete files and "ta-da", the problem went away.

Does it do this to any other directories, or just this one ?
 
According to Modwiki, iCultureGarrison = The suppression value of a unit while garrisoned in a rebelling city.

If I set some units to a negative value, will that make it worse for city to have the unit in the city.

The only units allowed (i.e. positive values) in cities will be small units, i.e. reserve, security or infantry divisions. All other units would have high negative values.

I am considering this option to have the AI think twice about placing units in cities.
 
Collateral damage is based on iAirCombat for air units. For ground units it is based on iCombat. This value is multiplied by iCollateralDamage (and divided by 100).
 
According to Modwiki, iCultureGarrison = The suppression value of a unit while garrisoned in a rebelling city.

If I set some units to a negative value, will that make it worse for city to have the unit in the city.

The only units allowed (i.e. positive values) in cities will be small units, i.e. reserve, security or infantry divisions. All other units would have high negative values.

I am considering this option to have the AI think twice about placing units in cities.

You should carefully check this.
Negative values are often not evaluted in the right way, the AI often treats them like positive values.
No idea if it's here the case, but you never know.
 
hmmm ... food for thought.

I'll do some testing.
 
Code:
[29978.228] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
[29978.244] info type NONE not found, Current XML file is: xml\Units/CIV4UnitInfos.xml
In my XML logs, I am finding 1,000's of these similiar lines occurring in differing *.xml files.

Can I replace the code below
Code:
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<PrereqCorporation>NONE</PrereqCorporation>
with
this code ?
Code:
			<HolyCity/>
			<ReligionType/>
			<StateReligion/>
			<PrereqReligion/>
			<PrereqCorporation/>
 
Top Bottom