TheIronGolem
Well-known member
I write this for the sake of the future reader who needs a way to solve this problem. That reader will quite often be the future version of myself who has forgotten it.
So you've got a weapon power that needs to use an activated ability for some reason. In this specific instance, it's the Guided property from the Geomancer's Handbook (subs WIS for STR in attack/damage, prevents damage bonus from being changed by offhanding/twohanding, user can opt to use STR as a normal weapon but takes a -2 to attack if so). The weapon power needs a checkbox to denote when to alter the power's behavior (in this case, when the weapon is being used with STR and accepting the -2).
If you came to this thread looking for a solution, you've probably already noticed that checking "Show in Activated Abilities list" doesn't get a checkbox on your In-Play tab. Here's what you need to do instead:
So, for example, this enables you to have scripts that go:
	
	
	
		
I haven't tried this on armor powers, but I would expect it to work the same.
There you go, Future Self. Now stop playing 4X games and get back to work.
				
			So you've got a weapon power that needs to use an activated ability for some reason. In this specific instance, it's the Guided property from the Geomancer's Handbook (subs WIS for STR in attack/damage, prevents damage bonus from being changed by offhanding/twohanding, user can opt to use STR as a normal weapon but takes a -2 to attack if so). The weapon power needs a checkbox to denote when to alter the power's behavior (in this case, when the weapon is being used with STR and accepting the -2).
If you came to this thread looking for a solution, you've probably already noticed that checking "Show in Activated Abilities list" doesn't get a checkbox on your In-Play tab. Here's what you need to do instead:
- Create a generic Ability, presumably named after the weapon power.
- Check "Show in Activated Abilities list" on that Ability.
- Give the Ability this script at Render/999999999999999999999:
	
	
This is optional but nice to have, because it means the ability appears with the weapon's actual name instead of "Custom/magic weapon"Code:field[livename].text = field[thingname].text & " (" & parent.field[livename].text & ")"
- Bootstrap the Ability from the weapon power.
- In any scripts for the weapon power that need to know whether the checkbox is checked, you can now use:
	
	
...where "XXX" is the id of the Ability you created.Code:parent.tagis[Activated.XXX]
So, for example, this enables you to have scripts that go:
		Code:
	
	      if (parent.tagis[Activated.XXX] = 1) then
        ~ do something
      else
        ~ do something else
      endifI haven't tried this on armor powers, but I would expect it to work the same.
There you go, Future Self. Now stop playing 4X games and get back to work.
 
	