ModModding Guide to Wildmana

Very nice.

Just got to lookin at the tech tree and thinkin. I'd like to give them alternate techs for Bronze Working and Advanced Warfare available after KotE and Arcane Lore respectively. Any ideas how that could be done?

Edit: Also, is there a tag to replace an improvement with a unique version? Pretty obvious what I'm thinking here.
 
Would anyone know the old code for restricting basium until hyborem comes?

I belive it's python.. but I wouldn't know how to start this code..

I always found this un-flavorful.

Thank you in advance to anyone that helps.

No one knows how to do this? :cry:
 
Yeah, I've hit a roadblock. I'm trying to create those new techs for the Fey's melee line, but I can't get the game to load my FAERIES_CIV4TechInfos.xml file.

What I did was start off by copying the Malakim Infos and Schema files in FFHPLUS then edit them how I needed, bbbuuutttt I seem to get them to load.
 
to be honest i would not even go that route and make civ specific techs, for one it clutters the screen for all civilizations and the ai might get problems with it.
if you want to reassign the availability for your troops i would just give them different tech prerequisites. i don't know where your problems are, but adding new techs can be easily done although i don't know if the techtree xml works modular. i once added new techs in a prototype modmodmod and it worked fine by editing the original techtree xml.
 
Would anyone know the old code for restricting basium until hyborem comes?

I belive it's python.. but I wouldn't know how to start this code..

I always found this un-flavorful.

Thank you in advance to anyone that helps.

Well, I don't know how to restrict Basium until Hyborem comes, but I think you could make that Mercurian's Gate can be built only after Hyborem comes. IIRC, old versions of FfH used this kind of rule. But Kael changed it because it placed player's choice into AI.

The code is in CvGameUtils.py, def cannotConstruct(self,argsList):

Original code
Code:
		if eBuilding == gc.getInfoTypeForString('BUILDING_MERCURIAN_GATE'):
			if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_HYBOREM_OR_BASIUM):
				return True
			if pPlayer.getStateReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL'):
				return True
			if pCity.isCapital():
				return True
			if pPlayer.isHuman() == False:
				if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
					return True

Additional code under the last line (more or less like this)
Code:
				for iTeam in range(gc.getMAX_TEAMS()):
					eTeam = gc.getTeam(iTeam)
					if eTeam.isHasTech(gc.getInfoTypeForString('TECH_INFERNAL_PACT')):
						iCount = iCount + 1
					if iCount > 0:
						return True
 
to be honest i would not even go that route and make civ specific techs, for one it clutters the screen for all civilizations and the ai might get problems with it.
if you want to reassign the availability for your troops i would just give them different tech prerequisites. i don't know where your problems are, but adding new techs can be easily done although i don't know if the techtree xml works modular. i once added new techs in a prototype modmodmod and it worked fine by editing the original techtree xml.

Yeah, I'm gonna throw it out and just block weapon tiers.
 
Well, I don't know how to restrict Basium until Hyborem comes, but I think you could make that Mercurian's Gate can be built only after Hyborem comes. IIRC, old versions of FfH used this kind of rule. But Kael changed it because it placed player's choice into AI.

The code is in CvGameUtils.py, def cannotConstruct(self,argsList):

Original code
Code:
		if eBuilding == gc.getInfoTypeForString('BUILDING_MERCURIAN_GATE'):
			if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_HYBOREM_OR_BASIUM):
				return True
			if pPlayer.getStateReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL'):
				return True
			if pCity.isCapital():
				return True
			if pPlayer.isHuman() == False:
				if pPlayer.getAlignment() == gc.getInfoTypeForString('ALIGNMENT_EVIL'):
					return True

Additional code under the last line (more or less like this)
Code:
				for iTeam in range(gc.getMAX_TEAMS()):
					eTeam = gc.getTeam(iTeam)
					if eTeam.isHasTech(gc.getInfoTypeForString('TECH_INFERNAL_PACT')):
						iCount = iCount + 1
					if iCount > 0:
						return True


Thank you for the code!

But where exactly do I put it under? I tried multiple areas and none worked well.

Hmm.. oh well, if nothing works so be it.
 
Hey guys, got a couple more questions.

I'm trying to kill the unit switch between courts to open up more names as options for more UUs, but can't seem to make the old unit names available to both courts. I found the python section for the killswitch, but I can't seem to find anything about what units are available to be built.

And why doesn't this code work? I'd love to be able to reactivate this if possible.

Spoiler :

if pPlayer.getNumCities() > 0:
for pyCity in PyPlayer(iPlayer).getCityList():
pCity = pyCity.GetCy()
if pCity.getNumRealBuilding(gc.getInfoTypeForString('BUILDING_FORCE_CHAMBER')) > 0:
iForceChamberClass = gc.getInfoTypeForString('BUILDINGCLASS_FORGE')
if (pCity.getPopulation() >= 2 and pCity.getPopulation() <= 5):
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,2)
if (pCity.getPopulation() >= 6 and pCity.getPopulation() <= 9):
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,3)
if (pCity.getPopulation() >= 10 and pCity.getPopulation() <= 13):
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,5)
if (pCity.getPopulation() >= 14 and pCity.getPopulation() <= 17):
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,8)
if (pCity.getPopulation() >= 18 and pCity.getPopulation() <= 21):
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,12)
if pCity.getPopulation() > 22:
pCity.setBuildingYieldChange(iForceChamberClass,YieldTypes.YIELD_PRODUCTION,15)

 
I wanted to reverse engineer the Pact of Nilhorn, because I want to create rituals to bring some named units into the game. I quickly located the CIV4ProjectInfo.xml, but in case you do not want the project to intercept any nukes etc., the effects I wanted are not defined there.
But were are the effects of rituals (world projects) defined? :confused:
 
I wanted to reverse engineer the Pact of Nilhorn, because I want to create rituals to bring some named units into the game. I quickly located the CIV4ProjectInfo.xml, but in case you do not want the project to intercept any nukes etc., the effects I wanted are not defined there.
But were are the effects of rituals (world projects) defined? :confused:

In regular FfH, they are in CvGameUtils.py, or possibly events.py (Its definitely a python file along these lines.). I'm not sure if Wildmana has changed this, though.
 
sorry for the necro
XML: Making a Module to add/change game Elements

Allmost all Game Information is stored in an XML database. How much movement a warrior has, what civilizations exist, the Name of a Leader, etc. The base Files are in the Assets\XML subfolders, however many files are updated by XML Modules in the Modules Folder.

In modmodding XML changes should always be done modular. The huge advantage is that modular changes persist even if the main mode is updated to a later patch. There are two elements however which cannot be made modular: Randomevents (eventinfos.xml and eventtriggerinfos.xml) and Rituals (projectinfos.xml) [Rituals can be done modular with Wildmana 9.0]
The ModularLoadingControls XML files that you see in a few folders aren't necessary. They can be used to force the game to load one folder before the other.
is the modules Folder specific to wildmana or is there one anywhere?
(Maybe I mean : can I create the same "modules Folder" at the same place as in WM in any modmod or did WM needed to add some python or modify the DLL in order to "teach" to go look into the molule folder ?
best regards
 
you can just create a new subfolder and put your new xml files in there.
 
Hi to everybody,
fisrt of all i'm not a programmer or a modder master :), you guys seem to me to have all great skill, more then mine.
I've a lot of question about modding, but one of the most important things is this:

-how i can create an object tha unit can pick up and drop down at any time, and qhen they are defeated in combat (like the equipment in MASTER OF MANA or FFH2, ei EQUIPMENT_ATHAME)?

sorry if i asked in the wrong section..
thank you all for your work!! you made a great game even greater !!
 
I would say that you have to inspire yourslef from the way it is done in FFH:
create a "equipment_unit" both in Civ4UnitInfos.xml and in CIVUnitClassInfos.xml: that would be your object:
(the graphic can be a chest if you want) (you manage that in CIV4ArtDefines_Unit)(tbc for the files for graphics)

then you create the promotion "Object" : it is "what does this object do when equiped" in CiIV4PromotionInfos.xml.
Be sure to have "1" in the "bEquipment" tage line. (From my understanding this tag is what enables the engine to manage the complex part of equipements : droppable on death / not copied by mirror/ not copied by mimic/ flesh golem).

then you create spells in CIV4SpellInfos.xml:
Drop_Object :
Spoiler :
<SpellInfo>
<Type>SPELL_DROP_ATHAME_ITEM</Type>
<Description>TXT_KEY_SPELL_DROP_ATHAME</Description>
<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
<Help>TXT_KEY_SPELL_DROP_EQUIPMENT_HELP</Help>
<PromotionPrereq1>PROMOTION_ATHAME</PromotionPrereq1>
<bAllowAI>0</bAllowAI>
<bDisplayWhenDisabled>1</bDisplayWhenDisabled>
<bHasCasted>1</bHasCasted>
<RemovePromotionType1>PROMOTION_ATHAME</RemovePromotionType1>
<bBuffCasterOnly>1</bBuffCasterOnly>
<CreateUnitType>EQUIPMENT_ATHAME</CreateUnitType>
<iCreateUnitNum>1</iCreateUnitNum>
<bPermanentUnitCreate>1</bPermanentUnitCreate>
<bAbility>1</bAbility>
<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
<PyRequirement>reqDropEquipmentPromotion(pCaster,'EQUIPMENT_ATHAME')</PyRequirement>
<Effect>EFFECT_SPELL1</Effect>
<Sound>AS3D_SPELL_TRAIN</Sound>
<bGraphicalOnly>1</bGraphicalOnly>
<Button>Art/Interface/Buttons/Equipment/Athame.dds</Button>
</SpellInfo>
here, you need the promotion "athame" to be allowed this spell.. and upon casting the spell, you create the unit (drop it)

the "take" spells : on for taking form a unit carrying it, the other for taking it on the ground:
Spoiler :
<SpellInfo>
<Type>SPELL_TAKE_ATHAME_PROMOTION</Type>
<Description>TXT_KEY_SPELL_TAKE_ATHAME</Description>
<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
<Help>TXT_KEY_SPELL_TAKE_EQUIPMENT_HELP</Help>
<PromotionInStackPrereq>PROMOTION_ATHAME</PromotionInStackPrereq>
<bAllowAI>1</bAllowAI>
<bHasCasted>1</bHasCasted>
<bAbility>1</bAbility>
<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
<PyResult>spellTakeEquipmentPromotion(pCaster,'EQUIPMENT_ATHAME')</PyResult>
<PyRequirement>reqTakeEquipmentPromotion(pCaster,'EQUIPMENT_ATHAME')</PyRequirement>

<Effect>EFFECT_SPELL1</Effect>
<Sound>AS3D_SPELL_TRAIN</Sound>
<bGraphicalOnly>1</bGraphicalOnly>
<Button>Art/Interface/Buttons/Equipment/Athame.dds</Button>
</SpellInfo>


<SpellInfo>
<Type>SPELL_TAKE_ATHAME_UNIT</Type>
<Description>TXT_KEY_SPELL_TAKE_ATHAME</Description>
<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
<Help>TXT_KEY_SPELL_TAKE_EQUIPMENT_HELP</Help>
<UnitInStackPrereq>EQUIPMENT_ATHAME</UnitInStackPrereq>
<bAllowAI>1</bAllowAI>
<iAIWeight>500</iAIWeight>
<bHasCasted>1</bHasCasted>
<AddPromotionType1>PROMOTION_ATHAME</AddPromotionType1>
<bBuffCasterOnly>1</bBuffCasterOnly>
<bAbility>1</bAbility>
<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
<PyResult>spellTakeEquipmentUnit(pCaster,'EQUIPMENT_ATHAME')</PyResult>
<PyRequirement>reqTakeEquipmentUnit(pCaster,'EQUIPMENT_ATHAME')</PyRequirement>

<Effect>EFFECT_SPELL1</Effect>
<Sound>AS3D_SPELL_TRAIN</Sound>
<bGraphicalOnly>1</bGraphicalOnly>
<Button>Art/Interface/Buttons/Equipment/Athame.dds</Button>
</SpellInfo>

you can see that you need either the promotion "Athame" on another unit, or, on the second spell, you need the ATHAME unit in the stack.

replace all "Athame" by your object name.

and all that should do it (hopefully)

please note that I'm pretty sure to miss an important part in the Python but the CvSpellINterface.py doesn't mention anything in particular about this (and it seems to be simply related to the "<bEquipment>1</bEquipment>" tag in the "CIVPromotionInfos.xml, when you create your promotion.)

(but Honestly this will work in any FFH mod or modmod. I'm not sure other mods of Civ have the "bEquipment" tag)
 
I would say that you have to inspire yourslef from the way it is done in FFH:

thank you Calavente for your quick and competent reply.
You know a lot of thing on modding, unfortunaly for what i understand of modding, FFH2 is far too big and complex for me to start with :(
My idea is to simply realize an item and add it in vanilla or in other mod.
I have to find another way..
 
thank you Calavente for your quick and competent reply.
You know a lot of thing on modding, unfortunaly for what i understand of modding, FFH2 is far too big and complex for me to start with :(
My idea is to simply realize an item and add it in vanilla or in other mod.
I have to find another way..
there are only 2 issues for exporting to other mods:
without <bEquiment> you won't be able to drop the object upon death of the unit (so it's important to open CiIV4UnitSchema.xml in your specific mod, and see if there is the bequipement tag.)
(please note that it is fairly possible that this tag exists for BTS. It should have been implemented to allow the Fall from Heaven scenario...)

the second point is that I don't know if Vanilla, or other mods have the equivalent of the CIV4SpellInfos.xml.
I've never looked into it. (but I'm pretty convinced that there should be such file).
If that file exists, it should be fairly easy (1-2h for your first time) to create the droppable-exchangeable object you want. (but without the "drops on death" ... which would be sad)
 
Top Bottom