Quick Modding Questions Thread

a little update on my issues above:

I did extensive testing last night and mostly solved my problem.
The errors I was getting were coming from my own mod. I run my mod without the add-on and still got the same errors. The unit art xml file I used in my mod was from BTS 3.0 version, so when I updated to 3.19 it started giving troubles. I have reworked my unit art xml file to be based of 3.19 and it all working now At least I hope so. ;)

So, an advice for all - before starting working on a mod, make sure to have everything updated to 3.19 - will save yourself lots of headache in the future ;)
 
back to the modding questions :)

1. I have already removed walls and castles getting obsolete. Now I want to remove "defense except vs gun-powdered units". However there is no such property for buildings.
I believe that its the units that have property "ignores building defenses" that causes them to ignore walls and castles. Am i right assuming if i start setting "ignores building defenses" to 0, i will effectively remove those bonuses from the most units? (and maybe only leave it for things like bombers or artillery)

2. Sistine Chapel is insanely overpowered by giving +2:culture: to all specialists in all cities.
I want to nerf it to only give bonus to artists.
I found how Angkor Wat gives +1:hammers: only to priests, but unfortunately its only allows to assign YIELD bonuses and not commerce (:culture: is commerce bonus right?)
any suggestions on how to work around that?

thanks! :)
 
@ChaosSlayer

I think you are right about the defense bonuses. ie. "ignores building defenses" is indeed the trait which causes late-game units to ignore walls and castles. (But you should be aware that if you remove "ignores building defenses" then the bombard reduction effects of walls and castles will apply to late-game units as well. ie. it will take 4 times as long for a cannon to bombard down the defenses of a castle city, because of the -75% bombard modifier.)

As for global commerce for particular specialists from world wonders - I don't think there is any way to do that without adding a new xml field with the DLL. You could give the artists +1 commerce or something (ie. raw commerce), but that's probably not what you want.
 
@ChaosSlayer
hi ChaosSlayer. i think the entry you are looking for is in the file CIV4BuildingInfos.xml and goes like this:

<SpecialistExtraCommerces>
<iCommerce>0</iCommerce> (not sure for this, maybe +extra espionage points per specialist)
<iCommerce>0</iCommerce> (this means +0 extra science for all specialists)
<iCommerce>2</iCommerce> (this means +2 extra culture for all specialists)
</SpecialistExtraCommerces>


for the ignore building defense, the file is CIV4UnitInfos.xml and the entry you are looking for is

<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>

where 0 means NOT ignore and 1 means ignore. for example, an early unit as the trebuchet has

<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>

and artillery, a more powerful unit has

<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>

so i think that from this file you can change the entries from 0 to 1 for specific units without affecting all the units in the game.
 
Nope, the one you suggest adds commerce to ALL types of specialists, like Sistine Chapel as he knew already.

He wants it to be only for specific types, like Artists, which is what he wants.
However, the one meant for specific types, can only adjust yield, not commerce, as he knew already also.

Thus, as Karadoc pointed out, you need SDK to add a new field for this
 
Nope, the one you suggest adds commerce to ALL types of specialists, like Sistine Chapel as he knew already.

He wants it to be only for specific types, like Artists, which is what he wants.
However, the one meant for specific types, can only adjust yield, not commerce, as he knew already also.

Thus, as Karadoc pointed out, you need SDK to add a new field for this

sorry, i thought he wanted to minimize the +2 culture per specialist to +1 culture per specialist :mischief:

edit:
question: when you add a new entry, which file(s) you have to edit in order to include text for this new entry?
for example, i added a building and created a new entry where this building heals 15% air units per turn but this info doesn't appear in the tech tree when i hover my mouse over the pic of this building. is there a file i should edit to achieve that?

question 2: is there a way to enable the forest preserve improvement with the biology tech and not with the scientific tech? when it comes to adding buildings in a tech, so far i was successful (i think, i haven't tested it 100% yet :) )but when it comes to an improvement which is related to a certain tech i can't find the file that connects these two.
 
Hey all!

I have a question regarding the mod component Dynamic Civ Names. The creator is missing from CFC, so I figured I would ask here.

DCN is built only for BtS 3.13, but apparently one can extract it from certain mods and apply it to 3.19? If someone could confirm this, and if possible, give me a quick tutorial or a link on how to do so, that would be great. I am currently downloading Caveman to Cosmos in case this is possible, if not at least I get a great mod out of the deal. :D
 
Does anyone know what file controls which units can be drafted?

I'd like to know, as I am making a new civic - "Militia Service"
Like nationalism, it allows for units to be drafted.

I'd like to remove the ability to draft Mechanized infantry (which will now require oil or "synthetic fuel"), and make paratroopers or marines or a new unit class "modern Infantry" draftable.

And just in case you are curious about my civic idea:
It allows 2x the number of units to be drafted as in Nationalism
It gives +2 starting XP
It gives +25% military unit production.
- The point being to allow a civ to rapidly raise an army
Considering adding: +10 free military unit support
+2 happiness per military unit (to offset the unhappiness of mass drafting)

The drawbacks:
+3 to support cost of military units - 3x that of pacifism!!! having a large standing army will bankrupt you, so when running this civic it is best to keep near the limit for free unit support. (when I say support, I mean the cost of having them, not the supply cost when outside your borders)
+50% war weariness

Also, the unhappiness from having an undefended city has been removed, so one does not need to use up that precious free unit support with city garrison units, and you can instead maintain a navy, or siege/cavalry/armored/air forces which will provide backup for the drafted militia forces.
 
I'd like to remove the ability to draft Mechanized infantry (which will now require oil or "synthetic fuel"), and make paratroopers or marines or a new unit class "modern Infantry" draftable.

That can only be set civic independent, via UnitInfos.xml, the value iConscription.
 
I already posted this because I didn't even know this thread existed, but how would you go about changing the yields of bonus resources?

Such as the happiness of wine, or the health of corn?

I didn't see it in GlobalDefines.xml or the Terrain folder in XML, but I could've missed it.
 
Hey all!

I have a question regarding the mod component Dynamic Civ Names. The creator is missing from CFC, so I figured I would ask here.

DCN is built only for BtS 3.13, but apparently one can extract it from certain mods and apply it to 3.19? If someone could confirm this, and if possible, give me a quick tutorial or a link on how to do so, that would be great. I am currently downloading Caveman to Cosmos in case this is possible, if not at least I get a great mod out of the deal. :D

And I would like to bump my question as well. :)
 
The short answer for your question: Updating the 3.13 version is probably easier than ripping it out of another mod, but the problem is that it's probably too complicated for "noobs" (means everyone without C++ experience, so that includes even me), and it does not seem that anyone with experience and time to do it is currently around :/.
 
If anyone knows how to replace the horse with another animal? I want a knight riding a lizard, wolf, bear or any other animal. How is it possible?
 
This tutorial might be useful.
And it's definitely possible. In FfH2 there are boar riding dwarves, deer riding elves and bison riding barbarians. Somewhere in the database are also giraffe riding Zulus IIRC (not counting the zebra riding ones, that's "just" a reskin).
 
GameInfo\HurryInfo.xml (vanilla file)
Not sure where the min. pop is defined :dunno:.

I also found this in globaldefines.xml, i think its related, but I need to know what anger divisor is:

<Define>
<DefineName>HURRY_POP_ANGER</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
<Define>
<DefineName>HURRY_ANGER_DIVISOR</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>
<Define>
<DefineName>CONSCRIPT_POP_ANGER</DefineName>
<iDefineIntVal>3</iDefineIntVal>
</Define>
<Define>
<DefineName>CONSCRIPT_ANGER_DIVISOR</DefineName>
<iDefineIntVal>10</iDefineIntVal>
</Define>

its also looks like that when you sacrifice to slavery the happiness drops per sacrifice, regardless of how much you have sacrificed 1 pop or 20, which is kind of stupid... :(
 
Back
Top Bottom