Figured we needed a thread for questions that didn't need to take up valuable room from talented mod'rs.
Trying to figure out some basic modding. Can someone post the code to make this work.
Goal: Improve Haste spell to be based on the casters level *2, rather than +3. Also up the mana cost to *2 the caster's level.
Not sure what you mean by up the mana cost to *2, I'm assuming you want it to be 10 mana vs. 5 mana The following change will do that
<SpellResourceCost> <Resource>Mana</Resource> <Amount>10</Amount> </SpellResourceCost>
As to the other thing you want the following is what you want to do <GameModifier> <ModType>Unit</ModType> <Attribute>AdjustUnitStat</Attribute> <StrVal>UnitStat_CombatSpeed</StrVal> <IsForFormattedDescription>1</IsForFormattedDescription> <DisplayName>Hasted</DisplayName> <Duration>-1</Duration> <Effect>E_Celerity_Particle</Effect> <Calculate InternalName="Calc" ValueOwner="CastingUnit"> <Expression><![CDATA[[Unit_GetLevel] * 2]></Expression> </Calculate> <Calculate InternalName="Calc2" ValueOwner="CastingUnit"> <Expression><![CDATA[[Calc] + [UnitOwner_GetNumAirShards]]></Expression> </Calculate> <Calculate InternalName="Value"> <Expression><![CDATA[[Calc2]]></Expression> </Calculate> <Calculate InternalName="ValueForFormattedDescription"> <Expression><![CDATA[[Calc2]]]></Expression> </Calculate> </GameModifier>
These were both copied from the current haste spell. Put this in an xml file along with the other haste stuff, change the internal name and adjust the display name and you should get an improved haste.
Thanks for the help.
Actually I was looking to inflate the mana cost based on the casters level to offset the big gain in level bonus
<Amount>10</Amount>
That is possible, although this could lead to negative mana... There is no dynamic spell casting cost at the current moment, so you will have to deal with negative mana costs in the end.
You would have to do an adjust resource similar to that of the alchemy spell. Use the apply to caster tag and use similar calculations that I used above to remove the correct amount of mana.
Stab in the dark...like this?
<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>0</Amount>
</SpellResourceCost>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>CurMana</Attribute>
<ApplyToCaster>1</ApplyToCaster>
<Value>-[Unit_GetLevel]</Value>
</GameModifier>
Also how do you paste in code? I've tried everything, well almost.
I literally meant copy the gamemodifier from the Alchemy spell and change Gold to Mana like this, then you would need to do a calculate environment for the rest
<GameModifier> <ModType>Resource</ModType> <Attribute>Mana</Attribute> <ApplyToCaster>1</ApplyToCaster> <Calculate InternalName="Calc" ValueOwner="CastingUnit"> <Expression><![CDATA[[Unit_GetLevel] * 2]]</Expression> </Calculate> <Calculate InternalName="Value"> <Expression><![CDATA[[Calc] * -1]]</Expression> </Calculate> </GameModifier>
Then you can drop the spell resource cost altogether.
(I use shift+enter to make the spacing closer together)
Is there a way to mod the number of perk points champions get when leveling up?
If you mean number of traits a champion selects on the level up screen I don't think this is possible.
Playing with traits tree of the Defender. Trying to create a Taunt Spell, Is there a way to increase the likelihood that the ai will attack someone? Even a workaround clunky way?
Second question- What file contains the yellow ring around selected skills? I'd like to change the color to something that stands out a bit more.
I have a question too, in LH 1.0 I could copy the elementaldef.xml to the mods folder and alter it to my liking. In 1.1 this will result in strange behaviour (unable to select a production pace when starting a new game and growth is allways zero in all cities). Is there a solution other than editing the file directly in the install folder?
Edit: Ignore this, I have used a wrong elementaldefs (from FE) for the moded file. It still works the old way...
I'd like to mod some magic items using existing artwork, and just change the color to distinguish it from other items. (e.g. change the color of a swords hilt).
How do I do that? What program would I need?
GIMP
http://www.gimp.org/
Also might need to be able to read .dds files as well
Current help needed on these topics.
1)Added a Trait that adds 50% to Health, however only his detail screen shows the updated stats. Any idea how to get this to also show on his card?
2)Playing with traits tree of the Defender. Trying to create a Taunt Spell, Is there a way to increase the likelihood that the ai will attack someone? Even a workaround clunky way?
3) What file contains the yellow ring around selected skills? I'd like to change the color to something that stands out a bit more.
Good point, forgot about that... get the DDS plugin also and you're good to go:
http://registry.gimp.org/node/70
Probably only thing to be aware of is that for some reason that I don't full understand a lot of times (such as with skins) in the XML a file will be referred to as "something.png" but the file it is using is actually "something.dds". So if you want to reskin weapon A and it uses skin called "weaponAskin.png"... the file it might actually be using could be called "weaponAskin.dds" and is actually a dds rather than a png. On most occassions you can save a skin as either a png or dds and both will work, but put png for the filename in the xml.
To what card do you refer? Is this a level up trait, a unit trait... it is rather difficult to discern what you would like to have happen without pictures
The only way I can think of is to create a shield spell that will transfer the damage to another person. But I'm unsure of exactly how to capture the amount of damage an enemy unit just did to transfer that amount to another unit.
You could instead do clumsy and have the unit attack any other unit at random (blind rage) type thing. (Probably easiest to implement)
Are you talking about the trait skills from the unit selection screens or the trait skills from the unit level up screen. In either of these cases I don't think we have access to the color highlight through any of the files, it is a hardcoded thing. Unless you search through all the files and find it, but my search has left me empty.
Hey Parrott. Thanks for your help.
1) The "card" I'm referring to is the one on the left hand side of the screen during tactical combat. The heart icon and number do not reflect the updated health total from a buff. The buff is however seen if you click the details button. I'd like to see the buff/change on the card if possible.
2)I think I have an idea that might work.'
3)I didn't see anything either.
Beware that you cannot modify unitstat_hitpoints actively during combat.
Hmm. That is exactly what I was going for. I was doing a 50% bonus to hps for 2 rounds. So the unit details screen updates with the hp bonus but the champion actually doesn't receive a bonus? There goes 3 hours and lots of hair pulling.
Can somebody kindly tell me the needed xml code for a unit to use a 'Dual Axe'? In the AutoCreateEquipment field. Can't figure it out for the life of me.
Or even better yet, is there a smarter way to find code needed for adding any other existing items and spells etc to units? I'm sure I'm overlooking something obvious here.
For your first question, a dual weapon is just one item with two models in the artdef.
I don't understand what you mean by your second question.
(really wish this forum allowed deleting your own posts)
I think he's looking for the xml defninitions that say when items a race has access to and what the techs unlock.
I'm trying to make a unit champion that starts the game equipped with a Dual Axe. But I'm looking for the definition needed for the item. The part that goes in: <AutoCreateEquipment>*here*</AutoCreateEquipment> And I tried putting in "Dual Axe" or "Dual_Axe"; this does not work, heh.
As for my second question (and I apologize for not wording it better), is there a glossary somewhere or an easy way to look up what the xml code would be if I want to (for example) make a soveriegn who starts the game with chainmail? I actually do know how to do that one, by using:
<AutoCreateEquipment>ChainBreastpiece</AutoCreateEquipment>
I knew the definition above was "ChainBreastpiece" because I've seen it used in other xml files I have from mods others have made. But how do I find out the xml names/definitions of other items on my own, without searching other mods and copying available code from them?
So, <AutoCreateEquipment> tag is equipment specifically for champions. Units do not use these tags, you need to use the other tag for units.
There are many great features available to you once you register, including:
Sign in or Create Account