About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Need FileXml to XmlData advice
Author Message
SamNainocard Offline
Member

Post: #1
Need FileXml to XmlData advice
This is my test xml file used with FileXml for tool tips for Gui and dynamic information like items.

Code:
Note: <GetRandomInt> will be replace with Random(0, 100) (or specified if have parameters) in game.

<entity name="Option_Exit">
    <header text="Exit">
        Exit options.
        <sub level="1">
            Level1.
        </sub>
        <sub level="2">
            Level2. <GetRandomInt par="1"><GetRandomInt par_1="254" par_2="255"> <GetRandomInt> ASDA
        </sub>
    </header>
</entity>

<entity name=Option_Tabs>
    <sub level="1">
        <header text="Gameplay Option">
            Gameplay
        </header>
    </sub>
    <sub level="2">
        <header text="Video Option">
            Video
        </header>
    </sub>
    <sub level="3">
        <header text="Sound Option">
            Sound <br> <GetRandomInt>
        </header>
    </sub>
    <sub level="3">
        <header text="Override Sub Level 3">
            Appending Sound <GetRandomInt>
        </header>
    </sub>
    <sub level="4">
        <header text="???">
            ???
        </header>
    </sub>
    <sub level="5">
        <header text="Control Option">
            Level1.
        </header>
    </sub>
</entity>

<entity name="Cam_Offset">
    <header text="Camera Offset">
        yadayada
    </header>
</entity>

Due to removal of FileXml, and limited XmlData tutorial, I can't seem to find the way to use XmlData to load multiple entity name (XmlData.nodes.elms() return 1) and Option_Exit seems to not have <GetRandomInt par_1="254" par_2="255"> <GetRandomInt> ASDA.

Changing <entity name="Cam_Offset"> to <Cam_Offset> still return 1 for top most as well.

Unless using XmlData is too complicated (XmlData.nodes[0].nodes[0].nodes[1].nodes[0].name (first GetRandomIn) is confusing sometimes). Perhaps I'll have to use custom FileText or something instead.
01-30-2013 12:59 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Need FileXml to XmlData advice
Your xml file is invalid:
<entity name=Option_Tabs>
should be
<entity name="Option_Tabs">
and any node should have closing tag
<GetRandomInt>
should be
<GetRandomInt/>
or
<GetRandomInt></GetRandomInt>
01-30-2013 01:14 PM
Find all posts by this user Quote this message in a reply
SamNainocard Offline
Member

Post: #3
RE: Need FileXml to XmlData advice
Guess I should have read about xml syntax first.

Thank you, Esenthel.
01-30-2013 02:26 PM
Find all posts by this user Quote this message in a reply
Post Reply