PDA

View Full Version : Overwriting a Ruleset



Maspalio
December 25th, 2014, 19:00
Hey all,

In my tries to build a ruleset, i was considering calling for a CoreRPG Ruleset with the "importruleset" line of command.
Unfortunately, it seems the changes i wrote in my folder do not overwrite those of the CoreRPG folder. I mean .xml files.

Is there a way to do that ? The main idea is to twink the thing i need without copying the whole CoreRPG folder, and benefits from the further updates of the CoreRPG without copying all the folder each release.

Is it possible ?

Any help would be appreciataed. Noob inside...

Trenloe
December 25th, 2014, 19:13
You'll need to have the .xml files that you are overwriting in your new ruleset defined with an <includefile> tag - without this, your new ruleset will not load your .xml files and so won't overwrite the underlying CoreRPG files. For example, if you have a custom graphics\graphics_fonts.xml file you will need the following in your customer ruleset base.xml file: <includefile source="graphics/graphics_fonts.xml" />

Maspalio
December 25th, 2014, 20:10
thanks Trenloe.

Well, i thought it would work that way. I copied the gameelement.xml file in my ruleset folder and commented the dice i didn't need. I kept the D8 active. But in game, all the dice appears.
I then changed the name of my gameelement.xml file and <include> that name in my base.xml file folder. Then again, all dice still appears.

Maybe the dice can't be deleted form the CoreRPG ?

Trenloe
December 25th, 2014, 21:01
Ah, OK - you're removing definitions within an XML rather than overwriting those definitions. The problem here is that the <die> controls are defined in the base ruleset and because the code has been commented out in a layered ruleset that loads later than CoreRPG it doesn't overwrite the previous <die name="d4"> etc. definitions from the base CoreRPG ruleset layer. When you're completely removing XML definitions in a layered ruleset you need to use "delete" merge tags. See this post here: https://www.fantasygrounds.com/forums/showthread.php?20404-Possible-to-remove-dice-in-an-extension&p=167462&viewfull=1#post167462

Note - this is different for extensions, which do overwrite the base files; but layered rulesets don't - they build on the base ruleset files so you have to actually remove (use the merge "delete" tag if available) any previous definitions as commenting out code in later files has no effect as the definition has been loaded already. Hence why using, for example, <die name="d4" merge="delete" /> in a layered ruleset will actually delete a previously loaded "d4" die definition.

Maspalio
December 25th, 2014, 23:12
Thank you. I should have dig further in the forum :-D
Is there a thread or a sticky where all those tricks are saved ?