Modders Guide to FfH2

Me said:
So how come when I tried to merge patch G with your mod I got an error saying something about the tag <iplotradius> being incorrect and magic resistance being expected instead? I put in the new dll and building schemas and merged the different building infos and building class infos.

My computer just didn't like it, now it works.
 
Cool, makes sense then for the weighting and mechanic and whatnot.

Anyone know why the Catapult and Trebuchet only have 75 Hp instead of the 100 that everything else has?

Thats not hit points, thats the max damage the unit can do. It means that catapults can never kill a unit, they can only reduce a unit to 25% of it total life.
 
Can you please let a promotion grant a bonus vs multiple promotions (e.g., let an elf slaying promotion grant a bonus against both elves and dark elves, let a mage slaying promotion allow a small bonus vs each channeling and spell sphere promotion, or let some promotion grant a bonus vs multiple weapons promotion)

replacing this:
Code:
<PromotionCombatType>PROMOTION_ELF</PromotionCombatType>
<iPromotionCombatMod>50</iPromotionCombatMod>
with this:
Code:
<PromotionCombatTypes>
	<PromotionCombatType>
		<PromotionType>PROMOTION_ELF</PromotionType>
		<iPromotionCombatMod>50</iPromotionCombatMod>
	<PromotionCombatType>
	<PromotionCombatType>
		<PromotionType>PROMOTION_DARK_ELF</PromotionType>
		<iPromotionCombatMod>50</iPromotionCombatMod>
	<PromotionCombatType>
<PromotionCombatTypes>
would probably be best.

Putting these tags in both the CIV4PromotionInfos.xml and the CIV4UnitInfos.xml files would be nice too.
 
I'm not sure that would do exactly what I want (or at least that it wouldn't be the easiest way to do it) but they could be very useful for other things.
 
I'm wondering if anyone knows why there is a lot of redundancy in the setup of requirements and abilities:

For example: Numerous units require a building AND the technology that is required by that building. I suppose this prevents you capturing a city with that building in it and immediately making a unit you do not have a Tech for... but that is something you SHOULD be able to do (if the building stays through capture at least)

Another example: The Drown unit has the promotion Water Walking, but is enabled to travel across water tiles without it. So why the promotion? I guess it allows him to upgrade to a Stygian Guard and still walk on water + now be able to enter Ocean tiles (which a drown cannot do).

Then there are the completely useless promotions: Like Hawk's getting Flying: They can't move... But that is more theme than anything else.
 
Can you please let a promotion grant a bonus vs multiple promotions (e.g., let an elf slaying promotion grant a bonus against both elves and dark elves, let a mage slaying promotion allow a small bonus vs each channeling and spell sphere promotion, or let some promotion grant a bonus vs multiple weapons promotion)

replacing this:
Code:
<PromotionCombatType>PROMOTION_ELF</PromotionCombatType>
<iPromotionCombatMod>50</iPromotionCombatMod>
with this:
Code:
<PromotionCombatTypes>
	<PromotionCombatType>
		<PromotionType>PROMOTION_ELF</PromotionType>
		<iPromotionCombatMod>50</iPromotionCombatMod>
	<PromotionCombatType>
	<PromotionCombatType>
		<PromotionType>PROMOTION_DARK_ELF</PromotionType>
		<iPromotionCombatMod>50</iPromotionCombatMod>
	<PromotionCombatType>
<PromotionCombatTypes>
would probably be best.

Putting these tags in both the CIV4PromotionInfos.xml and the CIV4UnitInfos.xml files would be nice too.

provided that no more than 1 of the promotions already has a counter versus another promotion, you could make the other promotions have a negative combat mod versus the countering promotion
 
Yeah, but I was wanting to add both an "Elf Slaying" and Elf-Bane" promotion to grant a different bonus vs both Elen and Dark elven. I was also wanting to add several pieces of equipment that have a bonus vs multiple promotions (like Basium's War Hammer, which would be strong vs demon, undead, death and entropy promotions.

In general I think that changing the schema would be better.
 
Where was it that Goblins become WolfRiders when defeating wolves before? I've tried reimplementing this, to no avail.
 
Is there a way to create global user variables on the fly? I would like to use them to prevent a random event function from firing multiple times when it is called. For instance:

if int( CyGame().getGameTurn() > CyGame().getIntVar('DIREBEAST') ):
CyGame().setIntVar('DIREBEAST',CyGame().getGameTurn())
... code to add Dire Bear and Dire Lion units to the map, not to be fired more than once per turn, but perhaps more often than once per game ...

Having functions like:
CyGame().setIntVar(string varname, int value)
CyGame().getIntVar(string varname)
CyGame().setStrVar(string varname, string value)
CyGame().getStrVar(string varname)

is extremely helpful for adding additional mechanics without having to go to a lower level. NWN had this capability, does Civ4? The reason I wonder is because I see that the GlobalCounter mechanics are specialized functions and if this capability were available I would have expected to see:

CyGame().setIntVar('GLOBALCOUNTER',CyGame().getIntVar('GLOBALCOUNTER')+5)

rather than

CyGame().changeGlobalCounter(5)


If this is not doable, advice on what to use to prevent multiple function calls per turn would be great! Thanks!
 
I have been looking to find out how to turn the great general feature back on from vanilla civ. I am not going to maje it produce great generals, but a special fighter unit to reward those civs that have successful military campaigns (or successfully defend against them). I thought this would be easy, but I can't figure out how it was turned off and what to do to turn it on again. Any help would be greatly appreciated!
 
I've never seen this one done in XML before, is it legal?

Assets/Gameinfo/CIV4CorporationInfo.xml

Seems like a major typo on this middle line, but not sure if it affects anything.

Code:
<FreePromotion>NONE</FreePromotion>
[B]<UnitCombatFreeExperiences/>[/B]
<iCrime>0</iCrime>


I thought it was an isolated case at first, but I see the same for <PrereqBonuses/>
 
Yeah, its fine. From what I've seen <UnitCombatFreeExperiences/> is just a shorthand form of <UnitCombatFreeExperiences></UnitCombatFreeExperiences>. That type of format is pretty common.
 
Is there a way to create global user variables on the fly? I would like to use them to prevent a random event function from firing multiple times when it is called. For instance:

...
CyGame, CyPlayer and some others have functions called setScriptData and getScriptData. See the API.


Is it possible to break a permanent alliance using python?
There is no way to break up permanent alliances in the game, python or SDK, unless you make one yourself.
 
Thanks Snarko! I have done a few searches for the API. Where is it? Sorry for the dumb questions. I have been modifying the python and XML with success but I am pretty rusty with C++. If I had the doc with the available function calls, that would be fantastic!
 
Top Bottom