Changing Spell Prerequisites

Hey guys,

 

Brand-new to FE/LH modding. I'm looking to change the prerequisite trait for a bunch of spells (like, say, Gift of Iron from Geomancy to Earth4, that kind of thing).

 

Can this be done, and if so, where do i need to look?

 

I saw this section in CoreSpells that i thought was it:

 

Code: xml
  1. <Prereq>
  2.     <Type>AbilityBonusOption</Type>
  3.     <Attribute>Geomancy</Attribute>
  4. </Prereq>

But changing it didn't have any affect. Perhaps i'm not setting up my mod file correctly? I made a test change to the position of the Geomancy trait on the Mage Path screen and THAT worked, so i know my mod files are being read, at least (files in the right spot, "Use Mod Files" is on, etc).

3,521 views 3 replies
Reply #1 Top

Changing SpellDef's is a bit painful.  Read this:

https://forums.elementalgame.com/434780/page/1/#3378469

 

You can do it... but to make it work from the mod folder you have to block the default spell, then create a new version (copy the existing one) and set it to have the prereq you want.  This is how I block Gift of Iron (which I believe works):

<SpellDef InternalName="GiftOfIron">
  <AutoUnlock>0</AutoUnlock>
  <CanStack>0</CanStack>
  <HideInHiergamenon>1</HideInHiergamenon>
  <Prereq>
    <Type>Allegiance</Type>
    <Attribute>Blocked</Attribute>
  </Prereq>
  <AIData AIPersonality="AI_General">
  <AIPriority>0</AIPriority>
  </AIData>
</SpellDef>

 

Add that into a file in your mod folder. 

Then create a new copy of the default Gift Of Iron.  Just give it a slightly different InternalName, and change it's prereq.

 

Reply #2 Top

Thanks a lot, abob101. That's exactly what i needed.

 

Reading that thread, it seems there's a bit of a morass for modders to have to navigate. I've bookmarked it so i can refer to that list again in the future. :)

Reply #3 Top

Yeah, sometimes the workarounds are a bit messy, but still, there's a lot of fun things you can do with this modding system, and the modders have worked out a lot over the years (since WoM) through a bit of trial and error. ;-) =)