PS: Too bad that there are so many limitations to calculate values and use variables! Stardock should enable calculations in many places if they really want to encourage impressing mods!
Yeah it's a real bummer, you spend half your time stuffing around trying to figure out ways to workaround things. It's one of those things where the basic stuff is real easy to do with the xml, which is great... but once you want to do something a little bit beyond the framework it gets difficult and in some cases impossible. Oh well.
Anyways back on track... your suggestion is brilliant! I'm biased because that's how i'm already doing it for other stuff
I've actually got heaps of copies of the same summons spell... and they are blocked/unblocked by abilities. For example one of the things I have done is set all the tactical summons to have a default range of 3. Then there is an ability to change them all to unlimited range. You get the appropriate spell based by just restricting/requiring the ability as appropriate. This works *great* in tactical... because you only every see the version of the spell relevant to the caster, because you have to click on the caster first... then then you see the list of spells they can cast.
The problem with this technique in strategic mode... is that you get 2 of every spell showing in the spellbook (if you have more than 1 summoner champion).... because the strategic spellbook lists all spells that anyone can cast. So it gets real ugly. I'm avoiding it for the casting mana cost, by using a GameModifer that refunds the mana at the completion of the spell... not ideal but it means I can have several levels of mana discount with the same SpellDef. Abilities give you points in Unitstat_Summon_Mana_Discount (or whatever I called it), then this is used in an expression to give some mana back. Works great as a one off when cast cost but as mentioned doens't seem to work for ongoing maintenance :-/
So your suggestion will work... and possibly I will end up going that way. But i'm trying to avoid the duplicate spell listing thing if possible. Actually something I did try.... was to add different tabs to the spellbook. Those bookmarks on the left, where it says "Enchantments", "Summon", "City" or whatever they are. I tried to create 3 different Summon tabs, "Summon", "Expert Summons" and "Master Summons".... the plan was to have 3 different mana maintenance versions of the spells, one of each for each level and unlocked in a similar way to your suggestion. I figured that would have been neat, because they would not have all been listed together, they'd have all been neatly organised in the spellbook. It kinda worked.... you can create new Spellbook Categories for spells... the spells show up on a new tab, but it is has no icon and tehe tooltip says "string not found". I tried to get it working but gave up on that, seems to be hardcoded to only expect to disaply the default ones.
Oh actually, back to your suggestion.... to avoid having the spell listed twice in the spellbook, the other idea I had was to make it so that once a champion picks the "cheaper summon maintenance" ability... make it is a global effect that applies to all summoner champions. So the description would be like "All your factions summons have a a reduced mana maintenance". That would actually be fine and I tried to get it working using exactly the technique you described. I wanted 3 levels of mana maintenance reduction abiltiies. So I basically tried this....
I had 3 UnitStats, something like:
- unitstat_summonmaintenancediscount1 (default 1)
- unitstat_summonmaintenancediscount2 (default 0)
- unitstat_summonmaintenancediscount3 (default 0)
Then 3 copies of each summon spell. The idea was to have:
- Summon Shrill copy 1 (1 mana maintenance) requires unitstat_summonmaintenancediscount1 value 1
- Summon Shrill copy 2 (0.75 mana maintenance) requires unitstat_summonmaintenancediscount2 value 1
- Summon Shrill copy 3 (0.5 mana maintenance) requires unitstat_summonmaintenancediscount3 value 1
Then what I tried to do was create abilities to effect the Unitstats.... but the key thing is... I want it to effect ALL champions. So I wanted an ability to do this:
1) Expert Summons (All your factions summons now cost 0.75 mana per turn). This should somehow set all champions to have
- unitstat_summonmaintenancediscount1 = 0
- unitstat_summonmaintenancediscount2 = 1
- unitstat_summonmaintenancediscount3 = 0
2) Master Summons (All your factions summons now cost 0.5 mana per turn). This should somehow set all champions to have
- unitstat_summonmaintenancediscount1 = 0
- unitstat_summonmaintenancediscount2 = 0
- unitstat_summonmaintenancediscount3 = 1
This last bit, I couldn't get working. I couldn't figure out a way to have a unit ability, that sets some unitstats for all champions in your faction....
If anyone knows how to do that i'm all ears!
(wow, long post.... hope there is some sense in amongst that).
@OliverFA_306 - thanks for the suggestions by the way.