Jump to content
Sign in to follow this  
ztz2019

Now I'm trying Wrathed and had problem yet.

Recommended Posts

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

There is no template store anymore, each is their own asset.

Share this post


Link to post

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 by ztz2019

Share this post


Link to post

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 by Ravendark

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×