User talk:Bryan Derksen

From Dragon Age Toolset Wiki
Jump to: navigation, search

Question about spell chains in the UI

Hi Bryan,

I have a UI question that hopefully you might still be able to relay...

Normally in the skills/spells/talents page, you can use this script fragment to help enumerate through the available spell chains.

var cid:Number = Number(ExternalCommands.GetValue('GUI.SelectedChar.ID'));
 
ExternalCommands.SendMessageArgs('GameModeController.FindAbilityChains', cid , 2 /* =SPELLS */, SharedLibrary.Ability.DISPLAYMODE_SPELLBOOK);
 
ExternalCommands.GetNumMembers('GUI.SelectedChar.Stats.SpellChains');

However, this doesn't seem to be properly initialized for other UI elements until the abilities menu has been opened at least once. E.g., if I want this information from the quickbar UI then I need to open and close the abilities page at least once. As far as I can tell, it's probably something the engine is doing behind the scenes... at least the above fragment works in the abilities menu at basically the same entry point that it fails in another UI.

I can work with that, but I'm just asking if my assumption is correct or if there's some other way to get the spell chains outside the abilities page without having first opened and closed it.