-
October 12th, 2021, 22:22 #1
Simple question about XML processing in rulesets
Greetings,
I hope this is, indeed, a simple question to answer.
base.xml, for CoreRPG, looks like:
Code:<?xml version="1.0" encoding="iso-8859-1"?> <!-- Please see the license.html file included with this distribution for attribution and copyright information. --> <root version="3.0" release="4.1" logo="logo.png"> <announcement text="Core RPG ruleset (v2021-07-06) for Fantasy Grounds\rCopyright 2021 Smiteworks USA, LLC" font="emotefont" icon="rulesetlogo_CoreRPG" /> <!-- Attributes --> <description> <displayname>Core RPG</displayname> <author>SmiteWorks USA, LLC</author> <website>https://www.fantasygrounds.com</website> </description> <!-- Tabletop settings --> <includefile source="gameelements.xml" /> <!-- Graphics --> <includefile source="graphics/graphics_fonts.xml" /> <includefile source="graphics/graphics_frames.xml" /> <includefile source="graphics/graphics_icons.xml" /> <includefile source="graphics/graphics_portraits.xml" /> . .
How does that work?
Thanks!
- s.west
-
October 12th, 2021, 22:29 #2
I’m guessing here but the xml just defines things and the lua runs it. So that file is just defining the various things that the lua then uses to do whatever it needs to done. Thus it probably doesn’t matter what order stuff appears in the xml file.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
October 12th, 2021, 23:00 #3
As Zacchaeus says, <announcement> is just a definition of the announcement. It doesn't "run" the announcement at that line in base.xml - it defines it. Then, when FG fully loads and displays the chat window, the various <announcement> entries defined previously are executed.
https://fantasygroundsunity.atlassia...8/announcementPrivate 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!
-
October 12th, 2021, 23:01 #4
Or to put it another way, XML is not a procedural language i.e. it does not follow a set of steps in order. It is a declarative language i.e. it declares the ways things are with no implied ordering.
-
October 12th, 2021, 23:46 #5
Got it.
All three of your responses added something to my repertoire. Thanks!
- s.west
-
October 13th, 2021, 00:07 #6
Also, while I have your attention here, someone posted (Trenloe, or damned, or Moon Wizard, or?) an answer to the following ruleset development question (and I can't find it again):
Is it better to: 1) Start with a simple base.xml that contains <importruleset source="CoreRPG" /> and then gradually build on top of that?
Or is it better to 2) Copy and rename the CoreRPG ruleset, and gradually change it into what you're developing?
(I hope that question is clear.)
Thanks, gents!
-
October 13th, 2021, 01:16 #7
It is best to import the CoreRPG as you then start with all of it's resources. You can then declare xml templates and lua scripts that are located there. All of the commercial rulesets use this model and gain the biggest benefit of receiving new core features that are introduced into CoreRPG.
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
-
October 13th, 2021, 04:43 #8
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks