ModModding Guide to Wildmana

ok i have an other question:

in the unitclass schema there is flanking and targeting of specific unit types. this does only work with units however not with promotions. am i wrong or is it simply not possible to give a unit a flanking ability towards an other unit type via promotion i tried:
you can give a bonus against a unitcombat via a promotion. I could add unitclass as well but it would take quite a bit of work.
 
hm that depends on you if you are willing to commit. it is not that big of deal but it could open whole new tactical level of items or spells.

some examples i have on my drawing board:


phasing armor: immunity to first strikes, immunity to defensive strikes, bonus against archer units, flanking attacks against archer units


spell: explosive arrows (alternative to flaming arrows enchantment) adds a bit of collateral damage


.... as you can imagine if i could add unit abilities via promotions there would be some new options, but if you say it will take too much work for the outcome i stick to what i have, no problemo :)


i work on three projects as of now: consolidating spells, adding new items for the remaining civilizations and a third secret one.
 
phasing armor: immunity to first strikes, immunity to defensive strikes, bonus against archer units, flanking attacks against archer units
Wouldn't it make more sense to give the bonus against UNITCOMBAT_ARCHER instead of UNITCLASS_ARCHER? and unitcombats are already possible.
 
yes of course i already did that, but the flanking is the important not working aspect :)
i have the feeling we are talking past each other i just name some tags that would be great to have via promotions:



Spoiler :
Code:
             <UnitCombatTargets>
                <UnitCombatTarget>
                    <UnitCombatTargetType>UNITCOMBAT_X</UnitCombatTargetType>
                    <bUnitCombatTarget>1</bUnitCombatTarget>
                </UnitCombatTarget>
            </UnitCombatTargets>


Spoiler :
Code:
            <FlankingStrikes>
                <FlankingStrike>
                    <FlankingStrikeUnitClass>UNITCLASS_X</FlankingStrikeUnitClass>
                    <iFlankingStrength>1</iFlankingStrength>
                </FlankingStrike>
            </FlankingStrikes>


Spoiler :
Code:
            <iCollateralDamage>x</iCollateralDamage>
            <iCollateralDamageLimit>x</iCollateralDamageLimit>
            <iCollateralDamageMaxUnits>x</iCollateralDamageMaxUnits>
 
while i am at it, about wishing for all sorts things:

for spells:

Spoiler :
Code:
<CreateBuildingType>X</CreateBuildingType>


change it to

Spoiler :
Code:
<CreateBuildingTypeY>X</CreateBuildingTypeY>


with Y from 1 to 3 so you could create more then one building per spell


also please keep in mind these are minor requests please don't feel pressed to add them. there are just some ideas in my head that i would like to see come true :)
 
I'm trying to merge some of the latest Wildmana updates into my mod and I've run into a problem with Freaks. Namely, they can't build a Freak Show. The icon doesn't even show up! I've checked the XML and everything matches up. Great People and other building creators (such as Priests) are working fine. It's just the Freaks that are being freaky.

I'm not getting any XLM or python errors. Any suggestions as to where I might look to find the root of this problem?
 
the XML for freaks lists this?

Code:
            <Buildings>
                <Building>
                    <BuildingType>BUILDING_FREAK_SHOW</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
            </Buildings>
 
the XML for freaks lists this?

Code:
            <Buildings>
                <Building>
                    <BuildingType>BUILDING_FREAK_SHOW</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
            </Buildings>

Yep. I'll copy mine here just to make sure.

Code:
            <Buildings>
                <Building>
                    <BuildingType>BUILDING_FREAK_SHOW</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
            </Buildings>
 
ok, then check if the pedia of freaks lists "can construct freak show". If it does you know that the XML was loaded correct and the error is somewhere in the SDK
 
ok, then check if the pedia of freaks lists "can construct freak show". If it does you know that the XML was loaded correct and the error is somewhere in the SDK

The civilopedia does say that Freaks can construct Freak shows. A search in the SDK for FREAK_SHOW returns this:
Code:
Find all "FREAK_SHOW", Subfolders, Find Results 1, "Current Project"
  D:\working\ffh2\CvGameCoreDLL\CvUnitAI.cpp(134):        if (canConstruct(plot(),(BuildingTypes)GC.getDefineINT("BUILDING_FREAK_SHOW")))
  D:\working\ffh2\CvGameCoreDLL\CvUnitAI.cpp(136):            construct((BuildingTypes)GC.getDefineINT("BUILDING_FREAK_SHOW"));
  D:\working\ffh2\CvGameCoreDLL\CvXMLLoadUtilitySet.cpp(457):       SetGlobalDefine("BUILDING_FREAK_SHOW", szVal);
  D:\working\ffh2\CvGameCoreDLL\CvXMLLoadUtilitySet.cpp(459):        GC.getDefinesVarSystem()->SetValue("BUILDING_FREAK_SHOW", idx);
  Matching lines: 4    Matching files: 2    Total files searched: 202

The first two instances are for the AI, so that shouldn't affect a human player being able to use the ability. The second two are part of the same statement which is just setting up a global define.

Code:
       SetGlobalDefine("BUILDING_FREAK_SHOW", szVal);
        idx = FindInInfoClass(szVal);
        GC.getDefinesVarSystem()->SetValue("BUILDING_FREAK_SHOW", idx);
 
the important function is CvUnit::canConstruct. maybe check if you have modified it recently.
 
On further investigation, it seems that some of the other civ-specific buildings arent available. IE, I cant build Breeding Pits as the Calabim. But I can build Governor's Manors.

Edit: I finally managed to fix it. I needed to update my CIV4CivilizationInfos.xml file. Thanks for the help!
 
Ok, I think I'm missing something that should be horribly obvious:

I'm trying to figure out how to make upgrading Scion Centeni (a living unit) become Undead when it upgrades to skeletal archer.

This is from ScionUnitCreated in CvFFPLUS:

Spoiler :

Code:
	if iUnitType==gc.getInfoTypeForString('UNIT_ARCHER'): 
		unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HEADLESS'),true)
		unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNRELIABLE'),false)
		unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ALIVE'),false)
		unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD'),true)
		unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_COMBAT1'),true)


I added the bottom four lines, the "Combat1" line as a test. The upgraded unit *does* get Combat1. However, it stays Alive, doesn't gain Undead, and doesn't lose Unreliable. Any clues?
 
I think what happens is this:
1 new archer unit is created
2 python callback is run
3 then promotions from centeni are copied to archer and centeni is deleted

There is already a loop over all scion units one per turn in python. You could add the code there, so every headless unit gets the undead promotion and every non centeni unit looses unreliable.
 
ok i have a two quick questions:

1)
where and how can i edit nif files?
i just wanted to copy and alter the color of
Art/Structures/Buildings/Hope/sfx_epic_healer_crush_1h.nif
(this is the nif from the inspiration "building")

2)
when i add the lines:
Code:
                         <PrereqBuildingClasses>
				<PrereqBuildingClass>
					<BuildingClassType>BUILDINGCLASS_CIV_BUILDING1</BuildingClassType>
					<iNumBuildingNeeded>8</iNumBuildingNeeded>
				</PrereqBuildingClass>
			</PrereqBuildingClasses>
			<BuildingClassNeededs>
				<BuildingClassNeeded>
					<BuildingClassType>BUILDINGCLASS_CIV_BUILDING1</BuildingClassType>
					<bNeededInCity>1</bNeededInCity>
				</BuildingClassNeeded>
			</BuildingClassNeededs>

the game crashes as soon as i put my mouse courser over the building.
(BUILDINGCLASS_CIV_BUILDING1 = planar gate)
why does this happen?

when i change BUILDINGCLASS_CIV_BUILDING1 to BUILDING_PLANAR_GATE it works but the pedia says it now requires an empty dwarven vault.


i guess this happens because BUILDINGCLASS_CIV_BUILDING1 has no default building?
 
ok i have a request:
want to add a promotion to all units that stay within a city, i tried the <FreePromotion> tag from buildings and while they do work, they apply promotions to all units in that city regardless of limitation placed on the promotion itself (with exception to unitcombat).

so i ask about a tag for buildings that work like <FreePromotion> but pays regards to the limits placed on that unit.

(i implemented a building that gives all demons a certain promotion, but like described above it applied to all units not just the demons)

one workaround is to make an other promotion which applies to all units except demons and use the <PromotionExcludes> tag

or there are two buildings one applies promotion 1 which excludes the demon promotion and the other one applies the wanted promotion and excludes promotion 1

edit: the workarounds do not work :(

edit 2: an other workaround would be to create a spell that allows every demon in a city with that building to cast this spell, but this would add a lot of micromanagement for the player.
 
added a PromotionMustHave tag (XML is similar to PromotionExcludes). Should only be used as a last option since it blocks any way (magic, etc.) to access a promotion if the unit does not have the required promotions.
 
1)
where and how can i edit nif files?
i just wanted to copy and alter the color of
Art/Structures/Buildings/Hope/sfx_epic_healer_crush_1h.nif
(this is the nif from the inspiration "building")

found everything in the tutorial section :)
 
Back
Top Bottom