Best Answer Jokuc, 28 May 2017 - 07:25 PM
I tried it on an other map (One of yours actually, Chetwood Hills, very nice!)
Oh god no, not one of those 8 year old maps with cringeworthy grammatically flawed descriptions... Wait, people are actually playing it? I'm amazed! Gotta make some improvements to that one for the map pack I'm working on...
Anyway, I fixed your problem. Wanted to try it out for myself and see if it was just a mistake on your end, but I ended up spending hours trying to figure out why it was not working. If you answered (or maybe you didn't understand it?) my question about the bonus effect draw I probably would've been able to figure out a solution faster
"Also, you say you see the effect, do you see the effect of the special power only or does the power successfully trigger the bonus effect draw in elvenmallorntree.ini (the constant glow around the building)?"
If you had the constant glow, that would mean that the AttributeModifier was applied correctly, since the draw module is triggered by the modifier. Since you said you saw the fx, I thought the issue had something to do with the building's resource system. When I tried your code however, the power indeed showed the 3 second animation with the glow, but the glow which should stay around the building for a couple of minutes did not appear.. Meaning that the modifier didn't get applied, even though your code was correct. It's a bug in map.ini that probably occurs because certain filters are hardcoded, but there's some ways around it.
Replace the DwarvenRiches module in your ElvenSpellbook_Override object with this:
AddModule Behavior = SpecialPowerModule ModuleTag_DwarvenRiches SpecialPowerTemplate = SpellBookDwarvenRiches AttributeModifier = SpellBookDwarvenRiches AttributeModifierRange = DWARVENRICHES_EFFECT_RADIUS AttributeModifierAffects = INDUSTRY_TYPE_SPELL_OBJECT_FILTER +AIRCRAFT TriggerFX = FX_DwarvenRiches UpdateModuleStartsAttack = No AvailableAtStart = No RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC End End
Then add this to the bottom:
Object ElvenMallornTree KindOf = +AIRCRAFT End
You'll have to add KindOf = +AIRCRAFT to all the farms if you want it to work on other buildings than just the Mallorn Tree.
Don't forget to mark the thread as answered if you're happy with the solution
Go to the full post