Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old February 19th, 2017, 03:37 PM
With the Pathefinder system, in the structure section, with categories, sections and facets, everything as an ID and a name. I've noticed that with user-added elements in play, the IDs can change. It's not safe to assume that the category_id for the "Spell" category will always be the same for everyone.

With the script I'm working on to import data, the first thing I do is poll all the categories.

Code:
$CategoryList = $structure.GetElementsByTagName("*") | Where-Object {$_.category_id}
That gets me a list of everything in the structure that has a category_id value, whether it's a global category or a user category.

If I want to create a spell topic, I'll search that list for an element with the name of "Spell", and assign the associated category_id to the new topic.

Then for each topic, I grab a list of all the sections in a similar fashion, and just create a loop to create a section for each partition_id it finds for that topic.

Then within the section, I poll for facet_id, and create a snippet for each facet_id.

Then I reference each facet ID by name and process it accordingly.

Up to this point, it all seems like common sense stuff, but from here, things can vary. So my question is, what official standard should I adhere to?

With spells, for example, I'm inclined to assume that:
There will always be an "Overview" section, but it won't necessarily be the first one.
The "Overview" section will always contain the school, subschool, descriptor(s) (etc) snippets.
These snippets for spells will always be present, and always by these names.
There will always be a "Description" section, and it will always have at least one text snippet for the general description of the spell.
There will always be a Mythic section, and it will always have at least one text snippet for a description.

In other words, the basic elements and structure that I see in a default Pathfinder structure, the standard would be to assume that those elements will always be there, by their existing names, and in their existing sections.

There may be MORE snippets and sections, but I don't have to worry about those.

And users may have moved things around and renamed things, but if they have, then it's on their heads, not mine. ;-)

Is that a good general assessment? Or am I making bad assumptions or overlooking anything?
EightBitz is offline   #1 Reply With Quote
Farling
Senior Member
 
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,369

Old February 19th, 2017, 03:51 PM
Since you provide the structure in your import XML file, then you define the layout within those structures.

IF you use the standard game-system structure as the basis for your own XML import file then you can't go far wrong, and RW should map the standard game-system topics/snippets to match any changes that it knows about in the realm into which it's being imported.

The game system structure isn't going to change that often, so it isn't really worth reloading it each time you want to export it.
Farling is offline   #2 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old February 19th, 2017, 04:08 PM
Quote:
Originally Posted by Farling View Post
Since you provide the structure in your import XML file, then you define the layout within those structures.

IF you use the standard game-system structure as the basis for your own XML import file then you can't go far wrong, and RW should map the standard game-system topics/snippets to match any changes that it knows about in the realm into which it's being imported.

The game system structure isn't going to change that often, so it isn't really worth reloading it each time you want to export it.
Ah, you're right of course. I guess I have it so ingrained in me not to hard-code things that I overlooked the obvious.

It's still worthwhile to practice good habits, though. :-)
EightBitz is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:17 AM.


Powered by vBulletin® - Copyright ©2000 - 2020, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.