Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Realm Works Discussion (http://forums.wolflair.com/forumdisplay.php?f=67)
-   -   import/export and topic_id (http://forums.wolflair.com/showthread.php?t=57813)

EightBitz February 24th, 2017 08:23 PM

import/export and topic_id
 
If I programmatically add content to an export file, I have to give each topic a topic_id. I'd like to know if I'm properly understanding how this works.

What I've seen so far is:
Within a given export file, each topic_id should have a value of "Topic_<nn>" for example:
topic_id="Topic_1"
topic_id="Topic_2"
topic_id="Topic_3"
(etc ...)

As a test, I created 3 new Pathfinder realms, and populated each with one spell.
Let's call them Realm1, Realm2, and Realm3.

After adding one spell to each, I did a full export of Realm1 and a full export of Realm2. Then I opened the XML for each file to check the topic_id of the spell I added to each. Each spell in each realm had the same topic_id value: topic_id="Topic_2"

I then imported Realm1 and Realm2 into Realm3, and did an export of Realm3. The result was that I had Realm3 with 3 spells, and the export showed three different topic_id values.
topic_id="Topic_2"
topic_id="Topic_3"
topic_id="Topic_4"

All this tells me that while the topic_id value should be unique within any given export file, it does NOT have to be unique relative to existing topics in the Realm you're importing into. That, apparently, will sort itself out during the import process.

So, if I create three export files, and each one has two to three thousand topics, I don't have to make sure that the topic_id values are unique across all files, just unique within each file.

Is this an accurate assessment?

Zaphod Beebledoc February 25th, 2017 04:58 PM

From what I've seen from looking at my test exports, that seems to be the case.

davidp February 26th, 2017 08:30 AM

Quote:

Originally Posted by EightBitz (Post 245188)
So, if I create three export files, and each one has two to three thousand topics, I don't have to make sure that the topic_id values are unique across all files, just unique within each file.

Is this an accurate assessment?

ID's (topic, plot, any of them) must be unique within the export file. They are not globally unique. They are used strictly for cross-reference within the single export file. The original_uuid is what is used to indicate content is the same thing across multiple export files. As mentioned in other threads, we don't have a solution yet for users to uniquely identify things in their generated export files to indicate things are the same between export files. The original_uuid should be treated as reserved for Realm Works use and NOT used to generate anything for personal use.

EightBitz February 26th, 2017 09:19 AM

Quote:

Originally Posted by davidp (Post 245243)
ID's (topic, plot, any of them) must be unique within the export file. They are not globally unique. They are used strictly for cross-reference within the single export file. The original_uuid is what is used to indicate content is the same thing across multiple export files. As mentioned in other threads, we don't have a solution yet for users to uniquely identify things in their generated export files to indicate things are the same between export files. The original_uuid should be treated as reserved for Realm Works use and NOT used to generate anything for personal use.

Yep. I'm steering clear of doing anything with uuids. Thanks!


All times are GMT -8. The time now is 10:35 AM.

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