Starfinder Playlist
  1. #1
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384

    is it possible to merge module databases?

    Before updating Unicore ruleset to FGII v2.8 compatible I created lots of modules that didn't show up as individual entries in library windowlist. Instead there was one master module (say regular rulebook) that had normal library bookentry and all other modules were submodules/addendums for it. For example one submodule could add more skills which were displayed in master module's bookentry. This worked out with examples modules displayed below, without any coding. But now after FG v2.8 compatible update, it doesn't work anymore. I quess FGII v2.2 compatibility might have something to do with this.

    So my question is, can I merge module databasenodes to enable similar effect that worked before? So far I haven't been able to succeed in it and started to wonder if it would be impossible.

    I have tried to use DB.copyNode function and created my own recursive node copier but no luck. I did even try both out with modules where I removed the static="true" declaration. Now I started to thought if module databasenodes are static by default and instead of removing the attribute, I should set in to "false"?

    Master module content

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.8">
    	<library>
    		<Sample static="true">
    			<name type="string">Sample1</name>
    			<categoryname type="string">Category</categoryname>
    			<entries>
    				<test>
    					<librarylink type="windowreference">
    						<class>referenceindex</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Numbers</name>
    					<index>
    						<one>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.one@Sample1</recordname>
    							</listlink>
    							<name type="string">One</name>
    						</one>
    						<three>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.three@Sample1</recordname>
    							</listlink>
    							<name type="string">Three</name>
    						</three>
    					</index>
    				</test>
    			</entries>
    		</Sample>
    	</library>
    	<reference>
    		<test>
    			<one>
    				<name type="string">One</name>
    				<description type="formattedtext">
    					<p>Number one</p>
    				</description>
    			</one>
    			<three>
    				<name type="string">Three</name>
    				<description type="formattedtext">
    					<p>Number three</p>
    				</description>
    			</three>
    		</test>
    	</reference>
    </root>
    Additional submodule content

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.8">
    	<library>
    		<Sample static="true">
    			<name type="string"></name>
    			<categoryname type="string">Category</categoryname>
    			<entries>
    				<test>
    					<index>
    						<two>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.two@Sample2</recordname>
    							</listlink>
    							<name type="string">Two</name>
    						</two>
    						<four>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.four@Sample2</recordname>
    							</listlink>
    							<name type="string">Four</name>
    						</four>
    					</index>
    				</test>
    			</entries>
    		</Sample>
    	</library>
    	<reference>
    		<test>
    			<two>
    				<name type="string">Two</name>
    				<description type="formattedtext">
    					<p>Number two</p>
    				</description>
    			</two>
    			<four>
    				<name type="string">Four</name>
    				<description type="formattedtext">
    					<p>Number four</p>
    				</description>
    			</four>
    		</test>
    	</reference>
    </root>
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

  2. #2
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384
    The end result of pre FGII v2.8 merged module databasenode looked like this

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.8">
    	<library>
    		<Sample static="true">
    			<name type="string">Sample1</name>
    			<categoryname type="string">Category</categoryname>
    			<entries>
    				<test>
    					<librarylink type="windowreference">
    						<class>referenceindex</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Numbers</name>
    					<index>
    						<one>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.one@Sample1</recordname>
    							</listlink>
    							<name type="string">One</name>
    						</one>
    						<two>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.two@Sample2</recordname>
    							</listlink>
    							<name type="string">Two</name>
    						</two>
    						<three>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.three@Sample1</recordname>
    							</listlink>
    							<name type="string">Three</name>
    						</three>
    						<four>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.four@Sample2</recordname>
    							</listlink>
    							<name type="string">Four</name>
    						</four>
    					</index>
    				</test>
    			</entries>
    		</Sample>
    	</library>
    	<reference>
    		<test>
    			<one>
    				<name type="string">One</name>
    				<description type="formattedtext">
    					<p>Number one</p>
    				</description>
    			</one>
    			<two>
    				<name type="string">Two</name>
    				<description type="formattedtext">
    					<p>Number two</p>
    				</description>
    			</two>
    			<three>
    				<name type="string">Three</name>
    				<description type="formattedtext">
    					<p>Number three</p>
    				</description>
    			</three>
    			<four>
    				<name type="string">Four</name>
    				<description type="formattedtext">
    					<p>Number four</p>
    				</description>
    			</four>
    		</test>
    	</reference>
    </root>
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

  3. #3
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    I think if you use a common moduleid or mergeid for the modules then the contents of the modules should become merged under a common entry.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  4. #4
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384
    Thanks for reply, however I was once again unclear of what I wanted. I can merge new page-entries in one bookentry by using several modules, which would result following structure. However this is not what want. I want to merge all entries child nodes of "library.Sample.entries.test.index" (see the db structure from 2nd post). It should result one extended list.

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.8">
    	<library>
    		<Sample static="true">
    			<name type="string">Sample1</name>
    			<categoryname type="string">Category</categoryname>
    			<entries>
    				<test>
    					<librarylink type="windowreference">
    						<class>referenceindex</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Numbers</name>
    					<index>
    						<one>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.one@Sample1</recordname>
    							</listlink>
    							<name type="string">One</name>
    						</one>
    						<two>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.two@Sample2</recordname>
    							</listlink>
    							<name type="string">Two</name>
    						</two>
    						<three>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.three@Sample1</recordname>
    							</listlink>
    							<name type="string">Three</name>
    						</three>
    						<four>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.four@Sample2</recordname>
    							</listlink>
    							<name type="string">Four</name>
    						</four>
    					</index>
    				</test>
    
    <test>
    					<librarylink type="windowreference">
    						<class>referenceindex</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Numbers</name>
    					<index>
    						<two>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.two@Sample2</recordname>
    							</listlink>
    							<name type="string">Two</name>
    						</two>
    						<four>
    							<listlink type="windowreference">
    								<class>referencegeneral</class>
    								<recordname>reference.test.four@Sample2</recordname>
    							</listlink>
    							<name type="string">Four</name>
    						</four>
    					</index>
    				</test>
    			</entries>
    		</Sample>
    	</library>
    	<reference>
    		<test>
    			<one>
    				<name type="string">One</name>
    				<description type="formattedtext">
    					<p>Number one</p>
    				</description>
    			</one>
    			<two>
    				<name type="string">Two</name>
    				<description type="formattedtext">
    					<p>Number two</p>
    				</description>
    			</two>
    			<three>
    				<name type="string">Three</name>
    				<description type="formattedtext">
    					<p>Number three</p>
    				</description>
    			</three>
    			<four>
    				<name type="string">Four</name>
    				<description type="formattedtext">
    					<p>Number four</p>
    				</description>
    			</four>
    		</test>
    	</reference>
    </root>
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in