Hey guys!
Soooooo, here's what I've done so far.
1) Create new resource (building supplies). Check.
2) Add resource production to unit via ability (builder). Check.
3) Get said resource to accumulate globally, and show up next to the mana icon. Check.
4) Create new Build Arcane Monolith type spell that uses said resource instead of mana, with a range of 1. Check.
5) Test Build Arcane Monolith spell via Sov casting. Sov can create Arcane Monolith in adjacent square using building supplies instead of mana. Check.
6) Assign this spell to a (normal) unit... AAAAAARRRGH!
I've tried doing this a number of ways. I see that Air Elementals have a
<SelectedAbilityBonusOption>Spell_GustOfWind</SelectedAbilityBonusOption>
in their description. I tried changing spell name and manually inserting this into the unit code. Icon show up, no casting option (clicking just goes to the unit description window).
I've tried creating an ability that grants the spell to the unit with the ability. This just makes it available for the Sov, if I code it just right... but the unit isn't able to cast it (not listed as unit that has ability under spell casting).
BTW, I've tried a direct Build option for this. Unless it says UnlockAction/BuildImprovement/Monument I just get a greyed out box where build is supposed to be. Tried UnlockAction/BuildWildImprovement, and the Build box doesn't even show up.
I've tried creating an item (accessory) tied to the unit ability. No help.
What really annoys me is that UnlockAction/BuildRoad doesn't consume the unit, but as far as I can tell the code for this operation is out of our reach. Otherwise, I'd code an .xml action based on the roadbuilding routine and all would be right in the world!
I SUPPOSE I could make this a Champion ability, but my goal here is to round out my builder type unit, by having them move to the build location and construct a monument (and perhaps perform upgrades later via similar spells). Everything else is in place EXCEPT the ability of the unit to cast the necessary 'spell'.
Thinking waaaaay outside the box, I could have the unit summon another unit who's sole purpose is to convert itself into a monument... but that's just silly! Might as well just have the city build an outpost settler at that point, which converts itself into an outpost, which is what I'm trying to NOT do.
Anyone have any suggestions on how to get a unit to show/own/cast a strategic spell?