One of my personal disappointments with FE/LH is that a priest like normal unit never made it into the game. There is, to my knowledge, no way for a regular unit to gain the ability to heal another unit. There are spells that confer that ability onto a champion, but not a regular unit.
I am not a modder.
Before I start learning how to do this, I wanted to know if such a thing was even theoretically possible, or if there were tags that prevented a regular unit from ever having a spell cast upon them that confers a spell (the heal one in particular).
You can create an ability or trait that you can attach to a trained unit and give them ability to heal another unit. This is already in the game in theory with the henchmen of altar. They have a life henchman that can cast heal on the units. But it is perfectly reasonable to attach this to a regular unit.
There are some summoner units in one of the mods I use that can summon elementals, so it is definitely possible for regular non-henchman units to cast spells, even ones that cost mana (like the elemental summoners).
Hmmm... I think I know that summoner mod
I hear the guy who did that knows his stuff...
BIG SELF-PLUG ALERT!!!
Oops, maybe I should clarify... the guy who did the summoner units mod mentioned here:
https://forums.elementalgame.com/444851/page/7/#3403768
knows what he's doing.
The guy responsible for this though:
https://forums.elementalgame.com/446891/page/3/#3392066
...is a clown. Don't listen to a word he says.
Alright. <grin> Nice mods though (by both of you ).
N/A
i believe if you make it a tactical SKILL you'll have no problems. I doubt normal units can cast SPELLS, tactical or strategical. Add <IsSpecialAbility>1</IsSpecialAbility> to a spelldef to turn a SPELL into a SKILL.
So, what tag on champions makes them able to have the spell that grants healing cast upon them, but disallows that spell to be cast on, say, a group of archers?
<SpellTargetType>Self</SpellTargetType>
<SpellTargetType>FriendlyChampion</SpellTargetType>
<SpellTargetType>FriendlyChampionOrSov</SpellTargetType>
So, in theory, you could make a new spell def as this:
-<SpellDef InternalName="BlessingOfRestoration">
<DisplayName>Blessing of Restoration</DisplayName>
<Description>Allows the targeted Champion to be able to cast Heal.</Description>
<Image>S_BlessingOfRestoration_Painting.png</Image>
<IconFG>S_BlessingOfRestoration_Icon.png</IconFG>
<SpellBookSortCategory>Unit</SpellBookSortCategory>
<SpellBookSortSubCategory>UnitEnchantment</SpellBookSortSubCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Defensive</SpellClass>
<SpellSubClass>Buff</SpellSubClass>
<SpellTargetType>FriendlyUnit</SpellTargetType>
<CasterMustBeSov>1</CasterMustBeSov>
<UniqueSpellUnlock>Heal</UniqueSpellUnlock>
-<Prereq>
<Type>Allegiance</Type>
<Attribute>Kingdom</Attribute>
</Prereq>
-<SpellResourceCost>
<Resource>Mana</Resource>
<Amount>50</Amount>
</SpellResourceCost>
<PerTurn>1</PerTurn>
<Amount>1</Amount>
-<GameModifier>
<ModType>Unit</ModType>
<Attribute>UnlockSpell</Attribute>
<StrVal>Heal</StrVal>
<Duration>-1</Duration>
</GameModifier>
-<AIData AIPersonality="AI_General">
<AIPriority>30</AIPriority>
</AIData>
<HitSoundFX>Spell_MantleOfFire_01</HitSoundFX>
-<SpellDefEffect>
<EffectName>S_MantleofFire_Particle</EffectName>
<LocalPosition>0,0,0</LocalPosition>
<EffectScale>1</EffectScale>
<EffectDelay>0</EffectDelay>
<SnapToTerrain>1</SnapToTerrain>
</SpellDefEffect>
</SpellDef>
And this would allow me to have units that cast heal. I could further pull a unit count and have the mana cost be tied to the number of units in the stack, and to have <Prereq> requirements of no armor or weapons. Correct?
Also, could someone point me to the posting that explains how to cut and paste XML into this forum so that I don't have to insert my own CRs?
Thanks!
Yes and no.
See what Heavenfall said... a normal unit can't cast a spell, so if you do it just like you have there it won't quite work.
If you want it to work on normal units, you've have to create a new SpellDef that is a Skill, rather than a Spell... so make a copy of the Heal spell but add the tag that Heavenfall said <IsSpecialAbility>1</IsSpecialAbility>.
Look in your CoreSpell.xml, and see how there is a spell called "Fireball" and a copy called "Fireball_Ability". The one with _ability is activated via the Skill button in tactical rather than the Spell button.
I think you can still have a mana cost for a skill ability but you'll need to test it to be sure.
BTW do yo particularly want it to be granted to the unit by casting a spell on the unit ala Blessing of Restoration? Because you can always make it a Unit Design ability if that's what you're after.
Thanks for helping, all. Yes, from a gameplay standpoint, hit points on units are a precious consumable commodity. They regenerate slowly over time, much like coin or mana, but they get consumed during battles. Being able to convert one resource to another (in this case, mana to hit points) is a strategic decision. One of the design flaws, IMO, with the skills system is that the opportunity cost you pay for a resource is paid up front, once, in the building of a skill into a unit, and then no further opportunity cost is generated (except maybe a small coin cost; I'm not sure if skills increase the maintenance cost of a unit). But the benefit, from a game design perspective, of having it be a spell with a maintenance cost per turn is that you're turning a consumable mana into a consumable hit point cost every turn, so the balance of resource allocation is better. But, if the engine doesn't support it, the engine doesn't support it.
How do you give a skill to a unit, other than assigning it a special ability tag? What do you need to do to the unit definition to assign that skill? Do these come as trait medallion in design?
Can you clarify the objective? i.e what exactly are you after? Because i'm building priest like units right now for my mod, and i'm 90% sure that what you are after is definitely possible... i'm just quite sure I get what you want to do.
For example, this is possible....
A new Unit Design ability called "Healer Priest", that you can give to a unit via the Unit Design screen (just like the other Unit Design abilities).
The Healer Priest ability can unlock a skill called "Healing", that grants a tactical healing spell that can be used to heal a friendly unit. You can make the Healing ability cost mana to use. Or gold, or whatever other resource you want.
If you want, you could also make the Healer Priest ability cost 1 mana to maintain, i.e. the ability will reduce your mana pool by 1 each turn.
You can create some default units called "Priest" that have this ability.
Following is xml for a spell that, when cast, grants all friendly undead units a spell/ability. You could, of course, change the targeting scope or the spell/ability granted to whatever you like.
Spell:
Ability granted to units:
Thanks for the replies.
Sounds like you're very close to what I want to do, abob. The only thing two things I'd change it that the Unit Design ability costs 1 mana per unit, so a squad would cost 4, and a company 6, mana per turn. Encourages smaller, weaker healers. I'd also have a block that says you can't have armor or cutting weapons on the unit (ie, clubs only).
Dhuran, could you explain how you're posting xml in window? I can't figure that out. Thanks!
Chris
code="xml"
Code here.
/code
With the two tags enclosed in square brackets. Or the insert code button just to the left of the smiley icon adds the tags automatically.
Possible. See A_LHLIB_CanCast
_________________________
LH Mods by Primal
XtraDeconstruct
XtraDeconstruct Canons
Did you check the date on this post?
EDIT: Heh, Ok. Seems you missed the fact that one is activated through Spells and the other through Skills. For those interested in TrainedUnits Spells, use link in post #19 [Link removed]. Keywords: CanCastSpells, Strategic, Tactical, Spells, Not Skills.
I sure did!
It's just in case someone finds this thread through Google and then believes it's not possible...
If they read the second post they would see it's possible Have fun bringing threads from the dead...
There are many great features available to you once you register, including:
Sign in or Create Account