ztz2019 1 Posted May 28, 2016 Still about the unitabilitybutton's option. How to let the new abilitybutton affect in the UI? I tried to copy my tw mod code, and change the buttontemplatestore's name, but it doesn't work in KW. The unit's UI still no show of the button image. Share this post Link to post
Lauren 77 Posted May 28, 2016 There is no template store anymore, each is their own asset. Share this post Link to post
ztz2019 1 Posted May 28, 2016 (edited) There is no template store anymore, each is their own asset. So what should I do if I want to add new ability button? I search the code by Wrathed big viewer, it seems just the commandbutton but no others. Edited May 28, 2016 by ztz2019 Share this post Link to post
Ravendark 43 Posted May 29, 2016 (edited) You use this to set up the button and image <ButtonSingleStateData id="ButtonStateAbilityReturnToRefinery"> <State Image="Button_AbilityReturnToBase" Title="NAME:AbilityReturnToRefinery" Description="DESC:AbilityReturnToRefinery" /> </ButtonSingleStateData> and this for the actual unitabilitybutton <UnitAbilityButtonTemplate id="ButtonReturnToRefinery" LogicCommand="Command_HarvesterReturnToRefinery"> <Data> <SpecialPower StateData="ButtonStateAbilityReturnToRefinery" /> </Data> </UnitAbilityButtonTemplate> I do have issues getting the playerpowerbuttons to work tho, specially the none targeted ones....which could be user error on my end. But ages ago on the official forums i had a short back-and-forth about playerpowerbuttons with lauren and iirc there were some errors in the schematics regarding missing pieces and other parts having attribute=true where they shouldn't have...but again capital IF I REMEMBER CORRECTLY...because this was a long time ago on the old forums, might have been a different topic about the attribute=true thing. For example what i don't get: this is the playerpowerbutton for the vibration scan: <PlayerPowerButtonTemplate id="ButtonTiberiumVibrationScan" SpecialPower="SpecialPower_TiberiumVibrationScan"> <Data /> </PlayerPowerButtonTemplate> and the button state for it: <ButtonSingleStateData id="ButtonStatePlayerPowerTiberiumVibrationScan"> <State Image="Button_PlayerPowerTiberiumVibrationScan" Title="NAME:PlayerPowerTiberiumVibrationScan" Description="DESC:PlayerPowerTiberiumVibrationScan" TypeDescription="TYPE:PlayerPowerTiberiumVibrationScan" /> </ButtonSingleStateData> if you compare it to the unitability one you can see how the button state gets referenced in the abilitybutton, but for the vibration power the buttonstate doesn't get referenced...so i don't understand how those 2 ty together....i would say error in translation but this can still be me being a idot and missing something? The targeted ones have the <data><targeted/></data> setup and the button state is referenced in the <targeted/> Edited May 29, 2016 by Ravendark Share this post Link to post
ztz2019 1 Posted May 31, 2016 You use this to set up the button and image <ButtonSingleStateData id="ButtonStateAbilityReturnToRefinery"> <State Image="Button_AbilityReturnToBase" Title="NAME:AbilityReturnToRefinery" Description="DESC:AbilityReturnToRefinery" /> </ButtonSingleStateData> and this for the actual unitabilitybutton <UnitAbilityButtonTemplate id="ButtonReturnToRefinery" LogicCommand="Command_HarvesterReturnToRefinery"> <Data> <SpecialPower StateData="ButtonStateAbilityReturnToRefinery" /> </Data> </UnitAbilityButtonTemplate> I do have issues getting the playerpowerbuttons to work tho, specially the none targeted ones....which could be user error on my end. But ages ago on the official forums i had a short back-and-forth about playerpowerbuttons with lauren and iirc there were some errors in the schematics regarding missing pieces and other parts having attribute=true where they shouldn't have...but again capital IF I REMEMBER CORRECTLY...because this was a long time ago on the old forums, might have been a different topic about the attribute=true thingif you compare it to the unitability one you can see how the button state gets referenced in the abilitybutton, but for the vibration power the buttonstate doesn't get referenced...so i don't understand how those 2 ty together....i would say error in translation but this can still be me being a idot and missing something? The targeted ones have the <data><targeted/></data> setup and the button state is referenced in the <targeted/> Thanx, I've finished it after asking. I don' t understand the vibration either. Is it possible the bigviewer can't figure the hash out so the data is null. Share this post Link to post