Thread: Better Menus (CoreRPG, 5E/etc)
-
February 16th, 2026, 15:13 #341
Hi - I had a request to make one of my extensions compatible with Better Menus. I added the addMenuItem call like this:
It works, but it ends up adding two menu entries. Did I do something wrong?Code:function onTabletopInit() if Session.IsHost then local tButton = { sIcon = "FF_Icon", tooltipres = "FF_title", class = "fishing_tournament_window", path = DB_ROOT }; DesktopManager.registerSidebarToolButton(tButton, 8); if MenuManager then MenuManager.addMenuItem("fishing_tournament_window", DB_ROOT, "Open the Fishing Fun UI", "Fishing Fun"); end end end
menus-issue.png
Not sure if it matters, but this is for 5E.DISCORD / EXTENSIONS:
Combat: Crit Dmg Options, Effect FX, Enlarge/Reduce, Flavorful Names, Hidden Death Saves, Lingering Injuries (PL), Major Injuries (DK), Special Dmg FX, Spell FX, Summoner, Weapon Dmg Props
Skills: Crits & Fumbles, Fail Forward, Toolkit Actions
DM Tools: DB Search, Dynamic Pricing, Party Info, Redacted Table Fields
For Fun: Achievement Tracker, Boar Riding, Dragon Cards, Drink & Sink, Fishing Fun, Seven Seas, Tarot, Turtle Race
Puzzles: Cryptex, Volvelle, Word Key
-
February 19th, 2026, 19:06 #342---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset FGU Reference Module, or Web.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 19th, 2026, 20:27 #343
If I don't call it, I get no menus. If I call it, I get both. When selected, both open my window.
DISCORD / EXTENSIONS:
Combat: Crit Dmg Options, Effect FX, Enlarge/Reduce, Flavorful Names, Hidden Death Saves, Lingering Injuries (PL), Major Injuries (DK), Special Dmg FX, Spell FX, Summoner, Weapon Dmg Props
Skills: Crits & Fumbles, Fail Forward, Toolkit Actions
DM Tools: DB Search, Dynamic Pricing, Party Info, Redacted Table Fields
For Fun: Achievement Tracker, Boar Riding, Dragon Cards, Drink & Sink, Fishing Fun, Seven Seas, Tarot, Turtle Race
Puzzles: Cryptex, Volvelle, Word Key
-
February 20th, 2026, 02:05 #344
Even if the code is just...
DesktopManager.registerSidebarToolButton internally adds the button record to Desktop.aCoreDesktopDockV4["live"]. BetterMenus' createMenuSelections() automatically iterates that exact list to populate the dropdown.Code:function onTabletopInit() if Session.IsHost then local tButton = { sIcon = "FF_Icon", tooltipres = "FF_title", class = "fishing_tournament_window", path = DB_ROOT }; DesktopManager.registerSidebarToolButton(tButton, 8); end end
I expect if you use one or the other it'll be there just once.Last edited by celestian; February 20th, 2026 at 02:18.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset FGU Reference Module, or Web.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 20th, 2026, 02:36 #345
If I just use registerSidebarToolButton, then I don't see it in the menu. All I did was comment-out the addMenuItem call.
if I have both, I see the 2 menu items.
Anything else I could try?DISCORD / EXTENSIONS:
Combat: Crit Dmg Options, Effect FX, Enlarge/Reduce, Flavorful Names, Hidden Death Saves, Lingering Injuries (PL), Major Injuries (DK), Special Dmg FX, Spell FX, Summoner, Weapon Dmg Props
Skills: Crits & Fumbles, Fail Forward, Toolkit Actions
DM Tools: DB Search, Dynamic Pricing, Party Info, Redacted Table Fields
For Fun: Achievement Tracker, Boar Riding, Dragon Cards, Drink & Sink, Fishing Fun, Seven Seas, Tarot, Turtle Race
Puzzles: Cryptex, Volvelle, Word Key
-
February 20th, 2026, 04:40 #346
Sorry, nothing comes to mind immediately and im not home to dig deeper into the code for a week. I was certain it would be the discovery bit.
The other option is try...
Code:function onTabletopInit() if Session.IsHost then if MenuManager then MenuManager.addMenuItem("fishing_tournament_window", DB_ROOT, "Open the Fishing Fun UI", "Fishing Fun"); end end end---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset FGU Reference Module, or Web.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 20th, 2026, 15:09 #347
Thanks for the responses. That works fine as long as I have Better Menus. But if not, then of course it doesn't show up in the sidebar. That's not really an option.
I can use if/else; it does what I want as long as Better Menus loads first. Do you specify a load order? I typically don't for mine (which I think means it defaults to 50).
Code:function onTabletopInit() if MenuManager then MenuManager.addMenuItem(EXT_UI, DB_ROOT, "Open the Boar Riding (festival event) UI", "Boar Riding"); else local tButton = { sIcon = "BR_Icon", tooltipres = "BR_title", class = EXT_UI, path = DB_ROOT }; DesktopManager.registerSidebarToolButton(tButton, 8); end endDISCORD / EXTENSIONS:
Combat: Crit Dmg Options, Effect FX, Enlarge/Reduce, Flavorful Names, Hidden Death Saves, Lingering Injuries (PL), Major Injuries (DK), Special Dmg FX, Spell FX, Summoner, Weapon Dmg Props
Skills: Crits & Fumbles, Fail Forward, Toolkit Actions
DM Tools: DB Search, Dynamic Pricing, Party Info, Redacted Table Fields
For Fun: Achievement Tracker, Boar Riding, Dragon Cards, Drink & Sink, Fishing Fun, Seven Seas, Tarot, Turtle Race
Puzzles: Cryptex, Volvelle, Word Key
-
February 20th, 2026, 23:28 #348
It loads last, 999 I believe.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset FGU Reference Module, or Web.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 21st, 2026, 00:44 #349
I think it might work as long as I do it in onTabletopInit, not onInit.
DISCORD / EXTENSIONS:
Combat: Crit Dmg Options, Effect FX, Enlarge/Reduce, Flavorful Names, Hidden Death Saves, Lingering Injuries (PL), Major Injuries (DK), Special Dmg FX, Spell FX, Summoner, Weapon Dmg Props
Skills: Crits & Fumbles, Fail Forward, Toolkit Actions
DM Tools: DB Search, Dynamic Pricing, Party Info, Redacted Table Fields
For Fun: Achievement Tracker, Boar Riding, Dragon Cards, Drink & Sink, Fishing Fun, Seven Seas, Tarot, Turtle Race
Puzzles: Cryptex, Volvelle, Word Key
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)

Reply With Quote


Bookmarks