ModModding Guide to Wildmana

i run into some problems maybe you guys can help me out on this?

http://forums.civfanatics.com/showthread.php?t=362622



Edit:
@sephi
following this tutorial http://forums.civfanatics.com/showpost.php?p=8921884&postcount=22
i finally got to make button art

however this creates a *.dds file and you switched to some atlas files. are there any problems with creating button art like in the thread above? if there are problems can you please point me to a tutorial (or write one yourself) where it is illustrated how to create button art with the atlas files?
 
I finished some changes to how the AI deals with capitualtion and tribute deals:

- It will now always capitulate if you overpower it by a ratio of 8:1. This gets rid of the annoying problem of AIs refusing to give up when they are dead in the water.

- As a vassal, it will never refuse tribute demands unless its power, combined with that of your enemies with whom the AI could arrange a peace deal, exceeds your own. So during peacetime you can take whatever you want from your vassals, but if you go up against a powerful enemy, you might have a revolt on your hands.

All the changes have been made to the dll, so i'm not sure how to release this. Maybe you could merge it into the main mod, if you like the changes, sephi (I think my code is based on the 8.0x dll).
 
I finished some changes to how the AI deals with capitualtion and tribute deals:

- It will now always capitulate if you overpower it by a ratio of 8:1. This gets rid of the annoying problem of AIs refusing to give up when they are dead in the water.

- As a vassal, it will never refuse tribute demands unless its power, combined with that of your enemies with whom the AI could arrange a peace deal, exceeds your own. So during peacetime you can take whatever you want from your vassals, but if you go up against a powerful enemy, you might have a revolt on your hands.

All the changes have been made to the dll, so i'm not sure how to release this. Maybe you could merge it into the main mod, if you like the changes, sephi (I think my code is based on the 8.0x dll).

Till,

Great Work.... thats a very common complaint.

I would say compress and upload the files here, I am sure Sephi will be happy to merge them into the code.

:goodjob:
 
I haven't had time to test it extensively, but didn't run into any problems thus far. Computer players only surrender when they are supposed to, and only to paties with whom they are at war.

All the edited files are attached, I hope. Changes have been marked with CAPITULATION_EDIT and VASSAL_ADJUSTMENT_MOD.

(Plug: Using git as source control system would simplify these kind of things considerably, as new features could be implemented in branches and merged back into the mod automatically ;))
 

Attachments

thanks Till. merged it and did a few changes to the Vassal Adjustment. New logic is only triggered for Vassals who capitulated and Vassals with Attitude friendly will not try to backstab their master by refusing a tribute.
 
Sorry if this is the wrong section, However I Have a question. Is only possible to override promotions modular and not spells? For example say I wanted to modify the destroyer promotion so disciple units can take it.
Spoiler :
Code:
<PromotionInfo>
            <Type>PROMOTION_DESTROYER</Type>
            <Description>TXT_KEY_PROMOTION_DESTROYER</Description>
            <Sound>AS2D_IF_LEVELUP</Sound>
            <PromotionPrereq>PROMOTION_MASTER_OF_THE_ELEMENTS</PromotionPrereq>
			<iMovesChange>1</iMovesChange>
			<UnitCombats>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_ADEPT</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
				<UnitCombat>
                    <UnitCombatType>UNITCOMBAT_DISCIPLE</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
            </UnitCombats>
            <Button>Art/Interface/Buttons/Promotions/Destroyer.dds</Button>
			<bImmortal>1</bImmortal>
			<iAIWeight>600</iAIWeight>
			<iExtraCombatStr>2</iExtraCombatStr>
			<iExtraCombatDefense>2</iExtraCombatDefense>
			<iMinLevel>9</iMinLevel>
            <PromotionPrereqAnd>PROMOTION_MASTER_OF_NECROMANCY</PromotionPrereqAnd>
            <PromotionNextLevel>PROMOTION_OMNIPOTENCE</PromotionNextLevel>
        </PromotionInfo>


It works as far as I have tested. Good for me right, however if say I wanted to modify the add to flesh golem spell to allow dead units like so:
Spoiler :

Code:
<SpellInfo>
            <Type>SPELL_ADD_TO_FLESH_GOLEM</Type>
            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            <bCasterMustBeAlive>0</bCasterMustBeAlive>
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>
This does not work at least in my mod. Of course when I go to that actual spell and mod caster must be alive it of course works.
Thus can you not mod spells? Or if so how do you do it.
 
you can mod spells, but with this particular spell it might be possible that the python requirement is giving you problems. try to delete this line and test if it works. there might be certain problems arising from that however.
 
I was using the flesh golem as an example. Notice when I modify that line in the original (main?) spell it works, its just when its my mod it does not.
Another example perhaps?
Spoiler :
Code:
<SpellInfo>
            <Type>SPELL_READ_THE_ALTERATION_SPELLBOOK</Type>
            <PromotionPrereq1>PROMOTION_SPELLBOOK_ALTERATION</PromotionPrereq1>
            <PyRequirement>__import__('testing').reqReadNewSpellbook(pCaster)</PyRequirement>		
        </SpellInfo>

I have this code in my mod.
Along with the python.

Spoiler :
Code:
def reqReadNewSpellbook(pCaster):
	if pCaster.getUnitCombatType()==gc.getInfoTypeForString('UNITCOMBAT_ADEPT') or pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_CHANNELING3')):
		if not pCaster.isBarbarian():
			return True
	return False

This should allow anyone who is an adept or has channeling3 to take the spellbook right? The code works if I add to spellinfo in the wildmana mod. So I am pretty sure its not my python have if I add it to my mod, it does not work. Thus my confusion.
:goodjob: Oh and thank you for looking at my code, since I am sure you have your own projects to work on.
 
@chessmartin you could make a copy of the spell: add to flesh golem rename it internally for example:
Spoiler :
Code:
<SpellInfo>
            <Type>[B]SPELL_ADD_TO_FLESH_GOLEM[U]2[/U][/B]</Type>
            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            [B]<bCasterMustBeAlive>[U]0[/U]</bCasterMustBeAlive>[/B]
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>

and add the line promotionprereq undead so only undead units can use this spell and it will look exactly like the original. this way you don't have to alter the original spells.
 
@chessmartin you could make a copy of the spell: add to flesh golem rename it internally for example:
Spoiler :
Code:
<SpellInfo>
            <Type>[B]SPELL_ADD_TO_FLESH_GOLEM[U]2[/U][/B]</Type>
            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            [B]<bCasterMustBeAlive>[U]0[/U]</bCasterMustBeAlive>[/B]
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>

and add the line promotionprereq undead so only undead units can use this spell and it will look exactly like the original. this way you don't have to alter the original spells.

Amusing (or not so amusing) I did that very thing with that spell among others as well. Anyway thank you for your help. Now I am just wondering if there is a less messy way to fix my spells in question. For example using the spell posted in question shows add to flesh golem to appear twice in the civopedia. Anyway thanks again.
 
if you don't want it to appear in the pedia add the tag graphicalonly and set it to 1 (you should check the spelling of the tag i post this out of my head)
 
Sorry if this is the wrong section, However I Have a question. Is only possible to override promotions modular and not spells? For example say I wanted to modify the destroyer promotion so disciple units can take it.
Spoiler :
Code:
<PromotionInfo>
            <Type>PROMOTION_DESTROYER</Type>
            <Description>TXT_KEY_PROMOTION_DESTROYER</Description>
            <Sound>AS2D_IF_LEVELUP</Sound>
            <PromotionPrereq>PROMOTION_MASTER_OF_THE_ELEMENTS</PromotionPrereq>
			<iMovesChange>1</iMovesChange>
			<UnitCombats>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_ADEPT</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
				<UnitCombat>
                    <UnitCombatType>UNITCOMBAT_DISCIPLE</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
            </UnitCombats>
            <Button>Art/Interface/Buttons/Promotions/Destroyer.dds</Button>
			<bImmortal>1</bImmortal>
			<iAIWeight>600</iAIWeight>
			<iExtraCombatStr>2</iExtraCombatStr>
			<iExtraCombatDefense>2</iExtraCombatDefense>
			<iMinLevel>9</iMinLevel>
            <PromotionPrereqAnd>PROMOTION_MASTER_OF_NECROMANCY</PromotionPrereqAnd>
            <PromotionNextLevel>PROMOTION_OMNIPOTENCE</PromotionNextLevel>
        </PromotionInfo>


It works as far as I have tested. Good for me right, however if say I wanted to modify the add to flesh golem spell to allow dead units like so:
Spoiler :

Code:
<SpellInfo>
            <Type>SPELL_ADD_TO_FLESH_GOLEM</Type>
            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            <bCasterMustBeAlive>0</bCasterMustBeAlive>
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>
This does not work at least in my mod. Of course when I go to that actual spell and mod caster must be alive it of course works.
Thus can you not mod spells? Or if so how do you do it.

whenever you set an XML tag to the default value in a module, in this case bCasterMustBeAlive to 0, you need to include bForceOverwrite in the XML. One example is in FFHPLUS\Civics where I added bForceOverwrite to agrariasnism civic so that I could set the +1 food from farms to the default value (+0).

In your case this should work
Code:
<SpellInfo>
            <Type>SPELL_ADD_TO_FLESH_GOLEM</Type>
            <bForceOverwrite>1</bForceOverwrite>

            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>
 
whenever you set an XML tag to the default value in a module, in this case bCasterMustBeAlive to 0, you need to include bForceOverwrite in the XML. One example is in FFHPLUS\Civics where I added bForceOverwrite to agrariasnism civic so that I could set the +1 food from farms to the default value (+0).

In your case this should work
Code:
<SpellInfo>
            <Type>SPELL_ADD_TO_FLESH_GOLEM</Type>
            <bForceOverwrite>1</bForceOverwrite>

            <Description>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_ADD_TO_FLESH_GOLEM_HELP</Help>
            <UnitInStackPrereq>UNIT_FLESH_GOLEM</UnitInStackPrereq>
            <bCasterNoDuration>1</bCasterNoDuration>
            <bHasCasted>1</bHasCasted>            
            <bIgnoreHasCasted>1</bIgnoreHasCasted>
			<bAbility>1</bAbility>			
            <bSacrificeCaster>1</bSacrificeCaster>
			<bNoInterruptUnitCycling>1</bNoInterruptUnitCycling>
            <PyResult>spellAddToFleshGolem(pCaster)</PyResult>
            <PyRequirement>reqAddToFleshGolem(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_GRAFT_FLESH</Sound>
            <Button>, ,Art/Interface/Buttons/Spells/Spells_Atlas1.dds,3,5</Button>
        </SpellInfo>

@tesb thanks for the tag graphicalonly that will be useful for some other ideas I have.

@ Sephi:goodjob:Thank you it worked, just what I was looking for. Just curious is there a way to find all the tags such as bForceOverwrite and see what they do. If I had been aware of said tag before hand, I could have saved time and aggravation.

@everyone who reads this.
I posted my little modmod(mod?). To this post. All it does is allow disciples to get the various spell books and mastery spells. Not sure if anyone wants it or anyone cares or even if I should put it here. Put the folder in the mods section, put the python with the rest. It also allows non-living units to fuse with the flesh golem.

Thank you again everyone.
 
Extremely basic question: is there an easy way to deactivate civilizations so they aren't selectable/won't be chosen by random computer players? I know how to deactivate certain leaders; but not completely remove the civilization entirely, without going through and deleting each reference to it in all of the various files. Please let me know. Thanks!
 
Extremely basic question: is there an easy way to deactivate civilizations so they aren't selectable/won't be chosen by random computer players? I know how to deactivate certain leaders; but not completely remove the civilization entirely, without going through and deleting each reference to it in all of the various files. Please let me know. Thanks!
Sephi has already done this with a few of them here: http://forums.civfanatics.com/showthread.php?t=362009
 
Extremely basic question: is there an easy way to deactivate civilizations so they aren't selectable/won't be chosen by random computer players?

In CIV4CivilizationInfos.xml there's a "bAIPlayable" tag set to 1. Set it to 0 for a civ you don't want the computer to use. There's also a "bPlayable" tag that can be zeroed for human play.

Many civs share a file in Assets/XML/Civilizations. But you'll also need to look at Modules/NormalModules/FFHPLUS/Civs. Not only for the new civs. The Calabim, for example, have a CivilizationInfos file there.
 
Something I don't understand in the module unit art def file.

I was trying to fix some of the city-screen button art for Scion units. The "generic" buttons are being displayed rather than the Scion-specific art.

The trouble is that changes to SCIONS_CIV4ArtDefines_Unit.xml don't seem to do anything for my test unit, the Adept. I tried pointing <Button> to both the individual file and the button in Units_Atlas1.dds. But I got bupkis.

Any ideas?
 
the atlas system is one giant texture (*.dds) with all the buttons in it, you must be sure to target the right one. unfortunately i can't tell you how the coordinate system works within the atlas texture. Also make sure that you have no double entries. There are a lot of art files in the Wildmana80.FPK and when you make a new *.dds they should not have the same name or coordinates like one in the fpk.
 
Back
Top Bottom