Thread: New Tab on Character sheets
-
December 21st, 2021, 12:17 #1
- Join Date
- Mar 2021
- Posts
- 2
New Tab on Character sheets
Hey everyone
I've been trying to teach myself how to work with fantasy grounds and Lua and XML in general by making a little extension I'd like for a new campaign I'm gonna be running soon. The thing I need it to do is add a new tab to the character sheet but after I get the tab defined and all that it places it overlapping the Main tab on the character sheet. I've tried to make sense of the Buttongroup_tabs lua but I'm lost. If anyone can help out it'd be a great help! I just need to know if I'm doing my XML wrong or if I need to really pick apart the Lua and make script. Any advice or anything will be very helpful!
-
December 21st, 2021, 13:40 #2
Here is a breakdown of how I added tabs to the party sheet. the process will be very similar, you just need to adjust the templates used from the party sheet versions to the char sheet versions. I've tried to document the various pieces
Code:<windowclass name="partysheet_host" merge="join"> ------This is the windowclass we are adding the tab to, and merging these changes into whats already there. <sheetdata> <sub_ps name="weather"> -------------This is where we define the new window that the tab will switch to. the charsheet template is sub_charsheet, the class is the windowclass of the new window. <class>ps_weather</class> </sub_ps> <tabs_partysheet name="tabs"> ------------Here we are modifying the tabs section. on the char sheet it would be <tabs_charsheet name="tabs"> the only purpose of this is to run the script below. <script> function onInit() super.onInit() addTab("weather", "tab_weather") ------------------This addTab() is already defined in the templates we are using, so you dont need to define it yourself. The arguments are addTab("name of the window, in this case weather defined above", "the icon used for the new tab") end </script> </tabs_partysheet> </sheetdata> </windowclass>
Last edited by mattekure; December 21st, 2021 at 14:28.
For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e
-
December 21st, 2021, 15:25 #3
Moderator - moved to the Workshop forum, this is the best place to ask about coding in FG.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
December 21st, 2021, 16:06 #4
There are a couple of threads on this that I believe show how to do this. I haven't followed the actual search results, but if this doesnt get you your answers let me know (I did this myself some time ago when playing around, but don't have a working extension to share now).
EDIT: huh, that didnt work. Here are the likely results;
https://www.fantasygrounds.com/forum...haracter-sheet
https://www.fantasygrounds.com/forum...haracter-sheet
https://fantasygrounds.com/forums/sh...-sheet-(PFRPG)
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks