-
January 8th, 2022, 10:33 #1
Adding modifier button to an existing category
Hi
I have a problem adding new modifier buttons to an already existing category. 3.5E/PF1 has a damage category for modifiers in the modifier window (crit and half buttons). I tried using ModifierManager.addModWindowPresets, but I do not know how to add to an existing category (creating a new category is no problem). If I simply add the category damage to my preset, then I get the button but it will have an additional category with the label damage rather than having an additional button at the already existing category
Is my idea even possible without overwriting existing code?
Thanks
Best wishes
KelrugemMy extensions for 3.5e and Pathfinder
Bug reports please here
-
January 8th, 2022, 15:35 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
There's not a clean way right now. In the next ruleset release, I'll add this function:
ModifierManager.addModWindowPresetButton(sCategory , sButtonID, [nPosition])
where nPosition is optional and sCategory is created if it doesn't exist already.
You'll still need to register the string resources either way.
Regards,
JPG
-
January 8th, 2022, 16:45 #3My extensions for 3.5e and Pathfinder
Bug reports please here
-
January 9th, 2022, 05:37 #4
I did something like that in the Nat20 extension, but it doesn't add it to the existing Damage category. It works though:
This went in the XML:
Code:<!-- MODIFIERS --> <string name="modifier_category_custom">Special Critical Damage</string> <string name="modifier_label_DMG_NAT20">Nat20</string>
Code:_specialDamageModifierWindow = { { sCategory = "custom", tPresets = { "DMG_NAT20", } }, } ModifierManager.addModWindowPresets(_specialDamageModifierWindow)
You could do that for now.
Sorry, after all that, I saw that you were already doing this...doh!
-
January 9th, 2022, 09:33 #5My extensions for 3.5e and Pathfinder
Bug reports please here
-
January 13th, 2022, 12:56 #6
To report back: The new API works very well I really like it Immediately added more buttons
My extensions for 3.5e and Pathfinder
Bug reports please here
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks