-
May 9th, 2021, 06:41 #1
How would have an EXPERIENCED xml guy done this change to a MoreCore window
Hey there, I was trying to change a couple fields in MoreCore's record_spells.xml (campaign) in my extension.
So I added the file, removed the unchanging stuff and tried to merge some changes. No matter what I did, I could not get them to go in right place (replacing existing Spell Level / Spell Cost elements.
(one thing, the first divider is not given a name so I cannot remove it or reference it so it was "extra" no matter what.)
Eventually I gave up and did the "test" update to the roller part and did a delete after delete merge rule to "clear" everything then readded my updated fields. No linking original since it is there for anyone with MoreCore (1.62):
Code:... <windowclass name="spells_stats" merge="join"> <script> function onInit() update(); end function update() local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode()); description.setReadOnly(bReadOnly); end </script> <sheetdata> <!-- <anchor_column name="columnanchor" /> <label_column> <static textres="ref_label_command" /> </label_column> --> <string_column name="clichatcommand" merge="join"> <script> function onLoseFocus( ) local nameWindowDBNode = window.getDatabaseNode() local nodeWin = nameWindowDBNode local sName = nodeWin.getChild("name").getValue() local sCommand = nodeWin.getChild("clichatcommand").getValue() local sRollstype = nodeWin.getChild("rollstype").getValue(); local nStart,nEnd,sCommand,sParams = string.find(sCommand, '^/([^%s]+)%s*(.*)'); --[[ Will add my own icon overrides here calling "base" if not handled --]] if sCommand == "TEST" then nodeWin.getChild("rollstype").setValue("heal") else super.onLoseFocus() end end </script> </string_column> <label_column name="new_spells_lvl" merge="delete"/> <number_column name="new_spells_level" merge="delete"/> <label_column_right name="new_spells_cst" merge="delete"/> <number_column_right name="new_spells_cost" merge="delete"/> <line_column name="divider" merge="delete"/> <ft_columnh name="description" merge="delete"/> <label_column name="label_new_spells_class"> <static textres="new_spells_class" /> </label_column> <string_column name="new_spells_class"/> <label_column name="new_spells_lvl"> <static textres="new_spells_level" /> </label_column> <number_column name="new_spells_level"> <default>1</default> </number_column> <line_column name="divider" /> <ft_columnh name="description"> <separator>line_desc</separator> </ft_columnh> </sheetdata> </windowclass>
-
May 9th, 2021, 07:07 #2
With all those deletes and merges, might be best to just clone the windowclass and make your own
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
May 9th, 2021, 07:14 #3
I dig that, basically all I wanted is to be able to access the base windowclass’ onLoseFocus() for cases where I am not overriding and to allowed chance for Damned updates (hmmm lol) to be used automatically when morecore was updated to a newer version.
I probably should have pointed this out and asked the better question:
Assuming I wanted to call super for just that one method - what’s the best way to go?
(I tried NOT deleting all those but I couldn’t get the elements I wanted to appear in place where old ones were)
-
May 9th, 2021, 07:42 #4
Its a catch 22 Varsuuk
The "delete" method is correct but some of these pages are quite complex and not friendly for that process.
That is actually why moredata exists - these were all flip frame on the more window originally...
-
May 9th, 2021, 16:38 #5
Gotcha.
The window I am speaking about has:
Code:Diceroll: Separator Level: Cost: Separator Description:
Mine was just minor change except it changes the template on the Dara from number to string too:
Code:Diceroll: Separator Class: Level: Separator Description:
I’m talking the SPELLS sidebar dialog not the More or MoreData sheet.
-
May 10th, 2021, 00:33 #6
Spells.... I thought Spells were deprecated in MoreCore... Generally use Rolls for everything...
-
May 10th, 2021, 07:28 #7
Well, I do use Rolls for "everything" but thought the record_spells you left in MoreCore (oops?) was a nice was to include a "dice roll" AND be able to add more fields to it if I so desired. Then when you looked at it, it was nice and clean (the clisomething has tons of fields) where you just see description, my fields and of course, the diceroll. Then I edited some of the listboxes to have "accepts from" to include Spells. I can drag from rolls or spells to it.
Then plan on adding GM/Player buttons to spells so you can click "Cleric" or "Magic-user" to see only them and "view by class/level" etc. In my "Rolls" sidebar, I just have "categories" - adding "Cleric" "Magic-user" buttons there seemed too specialized and if I did that for several things it would be crowded.
But, if I am wrong due to things I don't know yet - would gladly make the changes, I am only up to letter "D" in spells thus far.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks