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)
-   -   Importing custom xml for tags (http://forums.wolflair.com/showthread.php?t=62994)

manchuwook August 4th, 2019 04:52 PM

Importing custom xml for tags
 
I figure I'm trying to do something pretty straightforward:

Code:

<?xml version="1.0" encoding="utf-8"?>
<export xmlns="urn:lonewolfdevel.com:realm-works-export" format_version="3" is_structure_only="true" game_system_id="2">
        <definition>
                <details name="Ackerman Puglisi Traits" abbrev="apTraits" import_tag_id="Tag_1"/>
                <content_summary max_domain_count="1" max_category_count="1" />
        </definition>
        <structure>
                <domain name="Positive Traits" abbrev="appostrait">
                        <tag_global name="adaptable" />
...
                        <tag_global name="over-sensitive" />
                </domain>
        </structure>
</export>

Except I'm getting either a 'Divide by 0' error message or an 'Object reference not set to an instance of an object.' Can someone tell me what the mandatory elements and attributes for an import need to be? I'm told that UUIDs should be excluded, but do I need to have tag_ids or anything else?

kbs666 August 4th, 2019 08:35 PM

Are you basing this on a structure only export of new tags? I only did a structure only export once but that one exported the entire structure.

Farling August 4th, 2019 11:18 PM

This comes from a facebook post, he is trying to import a load of new tags.

Farling August 4th, 2019 11:38 PM

It looks like this isn't a viable route to take unfortunately.

All domain and tag elements need an original_uuid attribute, and these can only be allocated by Realm Works.

Realm Works uses it's own pattern for the UUIDs rather than following the standard UUID pattern (which would have allowed import tools to specify their own UUID for each element) so only an export from Realm Works will generate valid UUIDs.

Other than that...

tag_global elements should appear inside domain_global elements. The children of a domain element should be a tag element. Both tag and tag_global require a tag_id attribute, which must be unique in the file but otherwise can be of the form "Tag_x" where x is a number.

domain tags require a "domain_id" attribute, typicall of the format "Domain_x" where x is a number (the number can change from one import to another, since it is only used while loading the XML file).

manchuwook August 5th, 2019 04:48 AM

I'm almost there:

Code:

<?xml version="1.0" encoding="utf-8"?>
<export xmlns="urn:lonewolfdevel.com:realm-works-export"
        format_version="3"
        is_structure_only="true"
        game_system_id="2"
        source_scope_uuid="1306257B-91C6-5D3A-00D0-6A93B70F6BA9"
        owner_uuid="CED32A7B-91C6-5D3A-00D0-6A935C3C6BA9">
        <definition>
                <details name="Ackerman Puglisi Trait"
                        abbrev="aptraits"
                        import_tag_id="Tag_1"
                        import_tag_uuid="DF829BB6-7BBF-82B8-A9A1-6893B70F6BA9"
                        original_uuid="E0829BB6-7BBF-82B8-A9A1-6893B70F6BA9"/>
                <content_summary max_domain_count="1"
                                max_category_count="1" />
        </definition>
        <structure>
                <domain_global domain_id="Domain_1"
                              name="Ackerman Puglisi Trait"
                              global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9">
                        <tag_global tag_id="Tag_2"
                                    name="adaptable"
                                    global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9" />
...
                        <tag_global tag_id="Tag_637" name="over-sensitive" global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9" />
                </domain_global>
        </structure>
</export>

I'm getting a "Wrapper object not found within list" error. original_uuid was giving an error about the attribute not declared.

Farling August 5th, 2019 12:53 PM

Quote:

Originally Posted by manchuwook (Post 280903)
I'm almost there:

Code:

<?xml version="1.0" encoding="utf-8"?>
<export xmlns="urn:lonewolfdevel.com:realm-works-export"
        format_version="3"
        is_structure_only="true"
        game_system_id="2"
        source_scope_uuid="1306257B-91C6-5D3A-00D0-6A93B70F6BA9"
        owner_uuid="CED32A7B-91C6-5D3A-00D0-6A935C3C6BA9">
        <definition>
                <details name="Ackerman Puglisi Trait"
                        abbrev="aptraits"
                        import_tag_id="Tag_1"
                        import_tag_uuid="DF829BB6-7BBF-82B8-A9A1-6893B70F6BA9"
                        original_uuid="E0829BB6-7BBF-82B8-A9A1-6893B70F6BA9"/>
                <content_summary max_domain_count="1"
                                max_category_count="1" />
        </definition>
        <structure>
                <domain_global domain_id="Domain_1"
                              name="Ackerman Puglisi Trait"
                              global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9">
                        <tag_global tag_id="Tag_2"
                                    name="adaptable"
                                    global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9" />
...
                        <tag_global tag_id="Tag_637" name="over-sensitive" global_uuid="741E2A7B-91C6-5D3A-00D0-6A935D3C6BA9" />
                </domain_global>
        </structure>
</export>

I'm getting a "Wrapper object not found within list" error. original_uuid was giving an error about the attribute not declared.

All the UUID attributes are unique values which need to be allocated by Realm Works. There's no easy way to generate them from outside RW.

manchuwook August 5th, 2019 05:48 PM

Quote:

Originally Posted by Farling (Post 280930)
All the UUID attributes are unique values which need to be allocated by Realm Works. There's no easy way to generate them from outside RW.

re
Well, I exported the UUIDs from other rwstructure files into a table and did a join on them to get a list, after checking to make sure the UUIDs were unique (remove duplicates in Excel). I imagine the different realms didn't share IDs, otherwise, there'd be a tonne of collisions. I'm still getting the wrapper error, though. :<

EDIT: Though now that I think about it, I might need to check to see if the UUID for the Realm I am importing it into doesn't have the same UUID.

EDIT 2: Poop. They are the same. I guess I gotta wait for them to get back from GenCon.

kbs666 August 5th, 2019 07:34 PM

How many tags are you trying to import? The amount of time you've spent why not just use the built in UI?

EightBitz August 5th, 2019 08:16 PM

Quote:

Originally Posted by manchuwook (Post 280942)
re
Well, I exported the UUIDs from other rwstructure files into a table and did a join on them to get a list, after checking to make sure the UUIDs were unique (remove duplicates in Excel). I imagine the different realms didn't share IDs, otherwise, there'd be a tonne of collisions. I'm still getting the wrapper error, though. :<

EDIT: Though now that I think about it, I might need to check to see if the UUID for the Realm I am importing it into doesn't have the same UUID.

EDIT 2: Poop. They are the same. I guess I gotta wait for them to get back from GenCon.

I will almost guarantee you that they're going to tell you not to do anything clever with UUIDs, because you will risk corrupting your database.

Farling August 5th, 2019 11:37 PM

Quote:

Originally Posted by EightBitz (Post 280945)
I will almost guarantee you that they're going to tell you not to do anything clever with UUIDs, because you will risk corrupting your database.

It's a shame that they don't support the standard semantics of UUIDs, because then they can be created as guaranteed unique since each UUID would included an encoded date/time when it was created.


All times are GMT -8. The time now is 09:19 AM.

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