Modders Guide to FfH2

If you do make that as mini-mod, please figure out a way to connect the two wonders (building one blocks the other), otherwise Kurio Always get 1 more city. To me, that sounds like the main challenge.
Just make them the same buildingclass.

*edit*
Actually, there's a bug in BtS related to world wonders that is limited by civ: AIs can still rush it with units, even if their civ isn't supposed to be able to build it. Might be easier to just allow the Kuriotates to build CoaTS in settlements but not hubs.
 
I'm currently trying to make the barb-trait AI incapable of declaring war on barbarians, as a fix until they can better decide when it would be applicable (although mind you, it basically never will be a good idea). The two best ideas i've had so far are:

A) To literally block the AI from making this decision, which would be the best fix

I'm thinking a ninja edit in CvTeamAI/CvPlayerAI? Anyone know a good place to simply add another clause? (IE check if civ is barbarian during the declare war decision, and, if true, return false). This would presumably only effect barb trait civs as no other civ has to consider declaring war on the barbs.

B) Create an event that activates (and re-peaces) every time they declare war (but this would be a dodgy fix at best.)

Shouldn't be too hard, but not sure if it's possible to have AI-only events?
 
Is it possible to use a python call instead of an integer in the <iImmobileTurns>0</iImmobileTurns> tag of a spell. I was hoping it was (and that I coulddefine this amount in the same file as the python calls for spells and spell requirements), but it doesn't seem like it is :(

Since I noticed that the immobility caused by the Entangle spell (nature III divine) wears off before it is your your rivals turn to move, and is thus useless, I was trying to correct this. I didn't want it to be just like the Sun II sorcery spell, so I wrote a a little piece of python code that made the length of the immobility be dependent on the amount of nature mans the caster's civ controls and on the type of terrain.


@ Blakmane: if you would have the event that "re-peaces" the civ with the barbs happen whenever they declare war, then I'd definitely say A was better. However, I would much rather see a random event (or more than one) added that made barb trait leaders able to make peace with the barbs whenever they are at war (possibly with a high price, and other options) and not currently the "too civilized" (i.e., when their score isn't high enough to trigger war again)
 
@ Blakmane: if you would have the event that "re-peaces" the civ with the barbs happen whenever they declare war, then I'd definitely say A was better. However, I would much rather see a random event (or more than one) added that made barb trait leaders able to make peace with the barbs whenever they are at war (possibly with a high price, and other options) and not currently the "too civilized" (i.e., when their score isn't high enough to trigger war again)

It's a good idea but, at the moment i'm more interested in primarily stopping the AI from declaring war for no reason. Adding an event like that wouldn't stop them from simply declaring war again right after making peace.
 
Forgive if this is the wrong place to ask, but I was wondering if it would be possible to add +2 :gold: from state religion buildings under Theocracy civic?

I have tried adding

Code:
            <iStateReligionCommerce>
	    	<StateReligionCommerces>
			<iCommerce>2</iCommerce>
			<iCommerce>0</iCommerce>
            	</StateReligionCommerces>
            </iStateReligionCommerce>

to the civicinfos.xml file under Theocracy, but the game crashes on loading:

Spoiler :
Failed Loading XML file xml\gameInfo\CIV4CivicInfos.xml...
Reason: Element content is invalid according to the DTD/Schema.
Expecting: {x-schema:CIV4GameInfoSchema.xml}-SpecialistValids.

Line: 456, 30
Source: <iStateReligionCommerce>


Is what I propose not possible via xml editing? Thanks in advance :D
 
XML tags in themselves don't do anything. It's the SDK which handles the "doing" with them. If you want new XML tags you must add them in the SDK, so the game know how to deal with them. So yes, what you propose is not possible via XML editing alone.
 
Can anyone tell me what this piece of code does? Changing the value from false to true seems to make no observable difference.

Spoiler :
void CvGame::initDiplomacy()
{
PROFILE_FUNC();

int iI, iJ;

for (iI = 0; iI < MAX_TEAMS; iI++)
{
GET_TEAM((TeamTypes)iI).meet(((TeamTypes)iI), false);

if (GET_TEAM((TeamTypes)iI).isBarbarian() || GET_TEAM((TeamTypes)iI).isMinorCiv())
{
for (iJ = 0; iJ < MAX_CIV_TEAMS; iJ++)
{
if (iI != iJ)
{
 
That false is if you should get a diplomacy popup with a greeting. In this case changing it won't do anything. The code is making you meet yourself. You do not get automatic greetings from humans, even with it set to true. You are human, so you do not get a greeting.
 
Can anyone tell me why this piece of code wouldn't prevent barbarian trait civs from declaring war on the barbs? It's added right after kael's barbarian trait edit

Spoiler :
//FfH: minimod Traits: Modified by Blakmane 13/01/2008
if (!GET_TEAM((TeamTypes)iJ).isBarbarianAlly())
{
GET_TEAM((TeamTypes)iJ).declareWar(((TeamTypes)iI), false, NO_WARPLAN);
}
//Ffh: minimod End add


Where (TeamTypes)iI is the barbarians.
 
In initDiplomacy? Pretty sure that's only called at the start of the game. It certainly has nothing to do with civs declaring war on eachother in the normal gameplay.
 
Has anyone tried merging the Revolution Mod or the JFort Mod with FFH? I'd assume not, since I haven't seen anything for it.
 
In initDiplomacy? Pretty sure that's only called at the start of the game. It certainly has nothing to do with civs declaring war on eachother in the normal gameplay.

Must be because barbarians can't normally declare war through diplomacy? This call is enough to prevent them from going to war with barb trait civs. Looks like it's not going to work the other way round though =/
 
If I wanted to give a unit the possibility to spawn another unit upon victorious combat, much like the Baron does. Would it be enough to edit CIV4UnitInfos.xml or must I go looking in other places as well?
And do I need to change both units or only the one of them and if so which?
 
Im just fed up with runes, its always founded first and keeps spreading way to fast resulting in 2/3 of the world following it and besides everyones neutral and loves each other it doesnt make any sense for everyone to worship the earthmother.

So my question is which is the easiest way to prevent clan or balseraph to accept runes ? My knowledge to scripting is rather limited but good enough to edit stuff here and there.

i found this in kaels explanation, and it seems the easiest way to limit acess to religions. Any suggestions what could be done exept that ?

ReligionWeightModifiers- Modification the leader gives to any configured religion. Setting a valus to -100 or lower will make the leader unable to adopt the religion.
 
Where do you put the python defines for the <PyPerTurn> tag in CIV4PromotionInfos.xml?

Edit: Never mind, I just found that its in the CvSpellInterface.py file, just like the python requirements/effects/miscast effects for casting spells.
 
ReligionWeightModifiers- Modification the leader gives to any configured religion. Setting a valus to -100 or lower will make the leader unable to adopt the religion.

this IS the way you do it. In civ4leaderheadinfos.xml
 
Already changed the values according to kaels map and personal thoughts. Thanks now ill have to try it out :)
 
Top Bottom