-
February 10th, 2024, 17:09 #1
Question about the copy= attribute on <windowclass>
I see that CoreRPG is using this syntax in a lot of places:
Code:<windowclass name="ability" copy="record_window_text">
I can't find any references to copy= in the developer wiki, might be useful to add it here https://fantasygroundsunity.atlassia...44/windowclass or here https://fantasygroundsunity.atlassia...set+-+Layering
Thanks.
-
February 10th, 2024, 18:48 #2
- Join Date
- Apr 2020
- Posts
- 188
Marge is used to modify the window class and everywhere it is used. Copy is used to make a copy that you can then make changes to without modifying the original.
-
February 10th, 2024, 20:46 #3
the "copy" flag is like using another windowclass like a template. The ability windowclass will be it's own, but be built using record_window_text as a base. There is no documentation as it's still fairly new and still being checked over. Remember that the copied windowclass needs to be declared prior to it being copied.
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
-
February 11th, 2024, 00:14 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,008
The copy="" attribute will copy the specified windowclass at that point in the load process; and then apply any further definitions as modifications to that copy. As @superteddy57 mentions, it is a newer capability that we are just now using in full force in the CoreRPG layer, and more in the next update.
Regards,
JPG
-
February 11th, 2024, 01:12 #5
-
April 19th, 2024, 11:50 #6
- Join Date
- Mar 2009
- Location
- Lidingö, Sweden, Europe
- Posts
- 405
I noted that this feature is also used in the Basic Roleplaying ruleset. For example in ct/ct_host_entry_section.xml the windowclass npc_hitlocations is copied to ct_hilocations. But, this is done after the windowclass is used. Does this means that the windowclass doesn't need to be declared prior to being copied anymore?
Also, for clarification, any functions in the script element are added to the windowclass, or overloaded if the name is the same?
-
April 19th, 2024, 16:44 #7
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,008
It does need to be defined before being copied. If an attempt to copy is done before being defined, an error will be thrown during ruleset load.
If you look in base.xml for BRP, record_npc.xml is being included before ct_host_entry_section.xml.
Regards,
JPG
-
April 21st, 2024, 14:55 #8
- Join Date
- Mar 2009
- Location
- Lidingö, Sweden, Europe
- Posts
- 405
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks