MyGivinOpinion
March 12th, 2019, 20:40
I'm trying to access the information stored within the XML files of PC "XYZ". The particular area of interest is the weaponlist. The id-XXXXX and the properties. Below is an example of the section of XML i'm trying to query for information.
<weaponlist>
<id-00001>
<attackstat type="string">dexterity</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d4</dice>
<stat type="string">dexterity</stat>
<statmult type="number">1</statmult>
<type type="string">piercing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Dagger</name>
<prof type="number">1</prof>
<properties type="string">Finesse, light, thrown (range 20/60)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00021</recordname>
</shortcut>
<type type="number">0</type>
</id-00001>
<id-00002>
<attackstat type="string">dexterity</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d4</dice>
<stat type="string">dexterity</stat>
<type type="string">piercing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Dagger</name>
<prof type="number">1</prof>
<properties type="string">Finesse, light, thrown (range 20/60)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00021</recordname>
</shortcut>
<type type="number">2</type>
</id-00002>
<id-00003>
<attackstat type="string">charisma</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d8</dice>
<stat type="string">charisma</stat>
<statmult type="number">1</statmult>
<type type="string">slashing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Longsword</name>
<prof type="number">1</prof>
<properties type="string">Versatile (1d10)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00022</recordname>
</shortcut>
<type type="number">0</type>
</id-00003>
</weaponlist>
There is more that comes after this but for now I have a successful trigger I can't figure out how to access this information. As for which weapons would be targeted, that also needs to be determined by the attackframe connection to the actions tab of the character sheet. The one that determines if you hit or miss. My plan is to use the attack frame as a trigger to scan the properties of the weapon whose attack is being dragged for particular phrases.
I'm not very good at explaining stuff. I am more of a visual person so if you need clarification about anything please do not hesitate to ask, and I will do my best to elaborate in a more understandable way..
<weaponlist>
<id-00001>
<attackstat type="string">dexterity</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d4</dice>
<stat type="string">dexterity</stat>
<statmult type="number">1</statmult>
<type type="string">piercing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Dagger</name>
<prof type="number">1</prof>
<properties type="string">Finesse, light, thrown (range 20/60)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00021</recordname>
</shortcut>
<type type="number">0</type>
</id-00001>
<id-00002>
<attackstat type="string">dexterity</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d4</dice>
<stat type="string">dexterity</stat>
<type type="string">piercing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Dagger</name>
<prof type="number">1</prof>
<properties type="string">Finesse, light, thrown (range 20/60)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00021</recordname>
</shortcut>
<type type="number">2</type>
</id-00002>
<id-00003>
<attackstat type="string">charisma</attackstat>
<carried type="number">1</carried>
<damagelist>
<id-00001>
<dice type="dice">d8</dice>
<stat type="string">charisma</stat>
<statmult type="number">1</statmult>
<type type="string">slashing</type>
</id-00001>
</damagelist>
<isidentified type="number">1</isidentified>
<maxammo type="number">0</maxammo>
<name type="string">Longsword</name>
<prof type="number">1</prof>
<properties type="string">Versatile (1d10)</properties>
<shortcut type="windowreference">
<class>item</class>
<recordname>....inventorylist.id-00022</recordname>
</shortcut>
<type type="number">0</type>
</id-00003>
</weaponlist>
There is more that comes after this but for now I have a successful trigger I can't figure out how to access this information. As for which weapons would be targeted, that also needs to be determined by the attackframe connection to the actions tab of the character sheet. The one that determines if you hit or miss. My plan is to use the attack frame as a trigger to scan the properties of the weapon whose attack is being dragged for particular phrases.
I'm not very good at explaining stuff. I am more of a visual person so if you need clarification about anything please do not hesitate to ask, and I will do my best to elaborate in a more understandable way..