Based on a map shared by Elprede about using items and the Engineer Upgrade to add skills to a hero, I made a simple system where you are allowed to choose between two skills for each skill slot.
What the system looks like:
The hero has four disabled channel skill that serve as placeholder and four spellbooks, each containing two dummy skills that can have the description and icon of the real skill. Clicking one gives the skill to the hero, making him learn it if he has enough skill points. If not, it gets to the unlearned skills where it functions as a regular skill that can be learned. Picking a skill removes the particular spellbook.
The system also includes the use of the Tome of Retraining which resets the skills and gives back the spellbooks with the choices.
The system is fairly simple, it requires no variable to work and minimal triggering skills. Most of the job is adding the objects as each spells require a version of engineer upgrade that adds the skill and another one that resets it. It is important not to have spellbooks and choice skills share base order ID, otherwise it breaks the system.
Made with 1.26 patch but it seems to work with the latest ones too.
Version 1.1 Changelog
- I combined the triggers containing skills into a single, larger one. Now the system only uses 3 triggers: initialization, abilities and retraining. The smaller triggers are still there for inspection in a disabled form.
- I changed the hero reference to "triggering unit" for more flexibility.
- I added a few extra things to the map to test out the spells. I also added more tomes of retraining to the hero.