I am trying to create a Diablo II style skill tree. For the purpose of my initial prototype, what I want to do is have three icons organized on the left pane on the screen. On the right is an empty pane. This pane will be populated with data that is tied to the icon that is clicked on on the right pane. First off, let me explain what I do know. I've taken a look at the following tutorials:
scirra.com/tutorials/354/xml-parsing
This one taught me how to reference data in a pasted XML file.
scirra.com/tutorials/328/using-project-files-in-construct-2
This one taught me how to add a .xml file to a project.
Here's what I am trying to do:
-Load a .xml project file on start of layout.
-This .xml file looks something like this:
(EDIT: I've corrected the issues with the XML shown below based on feedback pointing out it was borked)
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row>
<PowerName>Heavy Slash</PowerName>
<Requirements>Long Sword</Requirements>
<Keywords>Sword, Long Sword, Technique, Focus Builder, Accurate, Mandatory</Keywords>
<Power>1(W),Special</Power>
<Type>Technique</Type>
<PlusResource>+1 Focus</PlusResource>
<MinusResource>N/A</MinusResource>
<Target>Single</Target>
<Range>1</Range>
<Splash>N/A</Splash>
<Resist>Physical</Resist>
<Duration>Instant</Duration>
<Cooldown>At Will</Cooldown>
<Description>Accurate: +5 Precision. Deals 1*Weapon Damage to target. Builds 1 Focus. If caster has no Focus at time of usage, damage is boosted to 1.5*Weapon Damage.</Description>
</row>
<row>
<PowerName>Runthrough</PowerName>
<Requirements>Long Sword</Requirements>
<Keywords>Sword, Long Sword, Technique, Focus Consumer, Accurate, Mandatory</Keywords>
<Power>1(W), +.5(W) per Focus</Power>
<Type>Technique</Type>
<PlusResource>N/A</PlusResource>
<MinusResource>-All Focus</MinusResource>
<Target>Single</Target>
<Range>1</Range>
<Splash>N/A</Splash>
<Resist>Physical</Resist>
<Duration>Instant</Duration>
<Cooldown>At Will</Cooldown>
<Description>Requires at least 1 Focus, consumes all Focus. Accurate: +5 Precision. Deals 1*Weapon Damage (plus .5 Weapon Damage per Focus consumed). Reduces the target's Toughness by 10 (plus 2 per Focus consumed) for 2 rounds. Actionless if user has 3 or more Focus.</Description>
</row>
<row>
<PowerName>Defensive Strike</PowerName>
<Requirements>Long Sword</Requirements>
<Keywords>Sword, Long Sword, Technique, Focus Builder, Accurate, Offhand, Actionless, Accurate</Keywords>
<Power>1(W)</Power>
<Type>Technique</Type>
<PlusResource>+2 Focus</PlusResource>
<MinusResource>N/A</MinusResource>
<Target>Single</Target>
<Range>1</Range>
<Splash>N/A</Splash>
<Resist>Physical</Resist>
<Duration>1 round</Duration>
<Cooldown>2 rounds</Cooldown>
<Description>Accurate: +5 Precision. Deals 1*Weapon Damage to target. Builds 2 Focus. Boosts Toughness by 10 (plus Sword Proficiency Level) until end of next round.</Description>
</row>
</rows>
-I would like some way for the action of clicking on a specific sprite, on the left pane, to tell text objects on the right pane to load specific data from one of the three power entries in the .xml file above.
What is the most efficient way to do this? I am struggling with reconciling what I've learned from the first and second tutorial I linked to above.
Thanks in advance,
Phil