Quick Modding Questions Thread

Is that a valid domain - all I see in the Modiki is AIR, SEA and LAND ?

Will I still need to set a iMoves of 1 ?
 
Hi, a few questions to the wise men/women:

What is this in the globaldefines.xml:

<DefineName>MAX_DISTANCE_CITY_MAINTENANCE</DefineName>
<iDefineIntVal>25</iDefineIntVal>


Maximum distance city maintenance, I get it what it means but is it in gold or is it in %? If I increase it, how much does the city maintenance increase?

<DefineName>COMBAT_DAMAGE</DefineName>
<iDefineIntVal>20</iDefineIntVal>

What about this one, what kind of tricks can I do with this one? This is how much combat damage a unit does IF it does damage in a combat turn, so with 100 hitpoints ALL units do 20 points of damage per combat turn, correct? Can I refer to this value in a units info and change it to a different value for different units, for example an archer does 10 damage and a swordsman 20 etc. etc. I could play a little with that value with units. Can I do it?

What about hitpoints can I change different units hitpoints too? And most importantly HOW?

<DefineName>RANGE_COMBAT_DAMAGE</DefineName>
<iDefineIntVal>30</iDefineIntVal>

This is ranged combat damage, can I refer to this value too with units?

<DefineName>COLLATERAL_COMBAT_DAMAGE</DefineName>
<iDefineIntVal>10</iDefineIntVal>

This is for artillery.


<DefineName>MAX_HIT_POINTS</DefineName>
<iDefineIntVal>100</iDefineIntVal>


HERE, can I make a referral in unitinfos.xml to this value and change different units to have different hitpoint values? For example a knight would have 500 hitpoints.

<DefineName>COMBAT_DIE_SIDES</DefineName>
<iDefineIntVal>1000</iDefineIntVal>
</Define>


This is interesting, the combat dice has 1000 sides, so if a unit throws the dice ONCE for every strength point then every strength point has 1 in a 1000 chance of being 1000 times as strong, so if two warriors with str 2 clash, both throw the dice 2 times and the higher score does damage, both str points have the chance of being anything from 1 to 1000 with the laws of propability governing how much each str point is worth on every throw. Basically to guarantee victory, a tank has to have the str of 2001 in case the warrior has a lucky day and throws 1000 with both str points.

So basically, which is better, to have 1000 sides on the dice or to have just a few like 3 or 2? How does the propability theory work on this? I suck in math so I don´t know, please explain it to me. :confused:


<DefineName>FOUND_RELIGION_CITY_RAND</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>
<Define>
<DefineName>FOUND_CORPORATION_CITY_RAND</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>

What are these RAND things, what do they do?

<DefineName>INITIAL_FREE_UNITS_POPULATION_PERCENT</DefineName>
<iDefineIntVal>24</iDefineIntVal>
</Define>
<Define>
<DefineName>INITIAL_FREE_MILITARY_UNITS_POPULATION_PERCENT</DefineName>
<iDefineIntVal>12</iDefineIntVal>
</Define>


<DefineName>NUKE_BUILDING_DESTRUCTION_PROB</DefineName>
<iDefineIntVal>40</iDefineIntVal>
</Define>

Can you change this like with building technologies, make buildings stronger and lower their propability of being destroyed. What about wonders are they immune to nukes, or can they be MADE immune to nukes?

What tricks can you do with these values, can you refer to these values in civics for example and change these values?

Basically, can you refer to different values in different xml scripts and change them for different units, buildings, civics etc. AND HOW ?

Oh yeah, and how many resources is the maximum requirement for units? Can you have a unit (or a building) requiring for example 4 resources to build?

EDIT: Yeah, and can I make buildings cost extra gold, I mean can I specify a gold sum a building costs instead of % of maintenance?


EDIT: <DefineName>NUKE_POPULATION_DEATH_RAND_1</DefineName>
<iDefineIntVal>20</iDefineIntVal>
</Define>

What are these death RANDs? How do I use them?


What is this boolean, what does it do, in buildingclassinfos.xml

<bMonument>
0
</bMonument>

It defines a building as a monument but what does that mean?


What do these mean in buildinginfos.xml

<iAsset>
3
</iAsset>
<iPower>
3
</iPower>

Asset and power but WHAT asset and WHAT power?

Thank you.

Cheers! :goodjob:
 
HERE, can I make a referral in unitinfos.xml to this value and change different units to have different hitpoint values? For example a knight would have 500 hitpoints.

[...]

What tricks can you do with these values, can you refer to these values in civics for example and change these values?

Basically, can you refer to different values in different xml scripts and change them for different units, buildings, civics etc. AND HOW ?

No to all with XML.
Maybe with python, sure with SDK.

Can you change this like with building technologies, make buildings stronger and lower their propability of being destroyed. What about wonders are they immune to nukes, or can they be MADE immune to nukes?

For the first again no, but nuke immunity is set in the BuildingInfos.xml

Oh yeah, and how many resources is the maximum requirement for units? Can you have a unit (or a building) requiring for example 4 resources to build?

Maximum is Resource 1 AND (Resource 2 OR Resource 3 OR Resource 4 OR Resource 5).

EDIT: Yeah, and can I make buildings cost extra gold, I mean can I specify a gold sum a building costs instead of % of maintenance?

Buildings don't cost maintenance, and extra cost can't be done via XML.

EDIT: <DefineName>NUKE_POPULATION_DEATH_RAND_1</DefineName>
<iDefineIntVal>20</iDefineIntVal>
</Define>

What are these death RANDs? How do I use them?

I guess they are just basic values for a nuke explosion. The death rate of population is for every nuke different (randomly -> rand).

What is this boolean, what does it do, in buildingclassinfos.xml

<bMonument>
0
</bMonument>

It defines a building as a monument but what does that mean?

This tag doesn't do anything, it's something which has never been implemented.
Boolean: This means the options for the value are True/False, respectivly 1/0.

What do these mean in buildinginfos.xml

<iAsset>
3
</iAsset>
<iPower>
3
</iPower>

Asset and power but WHAT asset and WHAT power?

Thank you.

Cheers! :goodjob:

Click me ;).
 
Here's my quick question: is there a way to move all the files/folders at once to a PAK file (with PakBuild)? So far it seems I have to go to every folder and subfolder (492 Art folders total) to add files to the PAK... Thanks in advance.
 
:confused: just File -> New, select the folder and create a new .fpk.
No need to asign the single folder.

Oh, I thought I have to Add>> files to the box on the right, but leaving it empty packs everything. Not sure if game launches any faster now but it works!

But attention, don't pack the "shared" folder, the other art files will not find it in the .fpk.

Thanks for the tip, probably saved me another 20 minutes figuring out what's wrong ;) especially since I've put a lot of files in there.
 
I am just getting started messing around with modding units and I created my own mod following the Sovern tutorial however after I load my mod up the Custom Game and Play Now buttons are disabled. I am only able to load a game.

Does anyone know how I can fix this? Thanks.
 
I'm trying to replace the cartoon animated leaders with static pictures, but I haven't been able to find a guide that addresses this. Do I just need dds files? Should I change the nif and kfm entries in the xml, and if so what should they point to?
 
I'm trying to replace the cartoon animated leaders with static pictures, but I haven't been able to find a guide that addresses this. Do I just need dds files? Should I change the nif and kfm entries in the xml, and if so what should they point to?

Just the .dds files are needed.
In the artDefines, you have to mention the .dds instead of the nif file.
The kfm entry has to be empty.

Empty in this case means
PHP:
<empty/>

and NOT
PHP:
<empty></empty>
 
I am just getting started messing around with modding units and I created my own mod following the Sovern tutorial however after I load my mod up the Custom Game and Play Now buttons are disabled. I am only able to load a game.

Does anyone know how I can fix this? Thanks.

As I stated in the other thread... I figured out that this was caused by my config file that I had copied over from some other mod folder.

However, now my problem is that I am getting a CTD when it is trying to do "Player Setup". The game seems to compile the xml just fine but when I am loading a game it CTD.

All I am trying to do is add a unit to the Americans. It is a special unit so it should take place of the warrior.

I followed the example of the Incan Quecha but I am still getting this CTD. I have changed the unitinfo, the artdefines and the civinfo. I did not change the class of the unit so I did not add a new class.

What am I missing?
 
Sorry, but i'm not if i understand when it does crash.
During loading a game (before you've ented civ), or after selecting your civ and starting to generate the map?

In the first case:
Re-check if the ART_DEF_ entry in the unit infos is really the same like the entry in the ArtDefines_units.xml.
 
i thought i may as well ask here, is there away to change this bit of xml on fall from heaven 2

<UnitCreateFromCombat>UNIT_VAMPIRE</UnitCreateFromCombat>
<iUnitCreateFromCombatChance>80</iUnitCreateFromCombatChance>

so that it only creates vampire units from combat with living units.
 
@The_J

Thanks for the help, and grats on becoming a moderator.

thanks :).

i thought i may as well ask here, is there away to change this bit of xml on fall from heaven 2

<UnitCreateFromCombat>UNIT_VAMPIRE</UnitCreateFromCombat>
<iUnitCreateFromCombatChance>80</iUnitCreateFromCombatChance>

so that it only creates vampire units from combat with living units.

I guess this can't be done just with XML.
If there's no restriction to only living units, this will everytime create a new unit.
You would have to implement the effect via python (there are modcomps in the database, look at it) or SDK.
 
I got this response from one of my beta-testers
i did discover...when i play in window mode (no full screen) your mod DONT crash..the last time i did play 4 hours straight and no crash happen.., but if i play in FULL SCREEN MODE, your mod crash every 2 turns aprox.
any ideas ? ... could it be the level of graphics ?
 
Yes, it's valid, look at the ICBM in Bts.
And yes, 1 move is needed.

In my mod i have an not movable big gun, which has even a movement of 3 and blitz promotion, works very well.

What happens when you trade your city the cannon is inside?
 
I got this response from one of my beta-testersany ideas ? ... could it be the level of graphics ?

No idea :dunno:.
Do you have a debug dll? Maybe it would show something.

What happens when you trade your city the cannon is inside?

Has never happend yet :dunno:.
I guess:
- If open borders, then it will just stay where it is
- If no open borders, then it will just be moved to the next possible plot...could be somewhere out of a city...er...not nice.
 
Back
Top Bottom