playMaker

Author Topic: DataMaker xml and NGUI [Solved]  (Read 3805 times)

Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
DataMaker xml and NGUI [Solved]
« on: March 27, 2014, 09:23:11 AM »
Hello all,

I am working on a system that takes step by step procedures and places the step Number, Title, and the Text of the procedure into labels on panels in NGUI. I have this done where each label is created and populated with the appropriate info and using the NGUI add on to PlayMaker (Paid Version) and using PlayMaker I enable/disable the labels as needed. Obviously this is a bit old school and clunky and I would like to use XML to populate the labels as needed.

I have gone through the examples and understand creating a GameObject and adding the "Data Maker Xml Proxy" script to add the XML file and then another object with a Playmaker FSM and "Xml Select Nodes" added to a state. This adds inputs to the Controls section of the FSM in the inspector to Query the Xml with.

The issue I am having is figuring out how to query the XML file getting each step and it's info and then sending the string(?) to populate the labels. There are also steps that may have additional info such as cautions that bring up a pop up modal.

Here is an Xml sample.
Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1"?>

<procedure>

<proc category="Disassembly">
<Title>Component Disassembly></Title>
  <step>
  <number>01</number>
  <txt>Remove Power from XYZ component.</txt>
  <caution>Use appropriate Saftey Precautions</caution>
  </step>
  <step>
  <number>02</number>
  <txt>Remove electrical connections from the XYZ component.</txt>
  </step>
  <step>
  <number>03</number>
  <txt>Remove mounting bolts (x4).</txt>
                <note>Place "Bolts" in bag and label.</note>
  </step>
</proc>

</procedure>

Just looking for clues on where to start. Kind of new to PlayMaker and loving it thus far. Any assistance would be most appreciated.

Vern
« Last Edit: April 19, 2014, 07:09:39 PM by Vern_S »

Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
Re: DataMaker xml and NGUI
« Reply #1 on: March 27, 2014, 06:47:06 PM »
Slowly but surely I am getting it figured out. I will post here what I am doing for others to comment or to garner info from.

Made changes to the xml file and now have it parsing and saving data to string variables.

Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1"?>

<procedure>
<title>Component Disassembly</title>
<proc step="DA00">
  <number>0</number>
  <txt>To begin this disassembly procedure press "Next".</txt>
</proc>
<proc step="DA01">
  <number>1</number>
  <txt>Remove Power from XYZ component.</txt>
  <caution>Use appropriate Saftey Precautions</caution>
</proc>
<proc step="DA02">
  <number>2</number>
  <txt>Remove electrical connections from the XYZ component.</txt>
  </proc>
  <proc step="DA03">
  <number>3</number>
  <txt>Remove mounting bolts (x4).</txt>
  <note>Place bolts (x4) in a ziplock bag and label.</note>
  </proc>

</procedure>

Using the Search Book by Category set up. Now adding NGUI elements to switch to different steps and populate panel labels.

Comments welcome.
:)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: DataMaker xml and NGUI
« Reply #2 on: March 31, 2014, 09:07:03 AM »
Hi,

 Good, I am glad you are not waiting for me. Sorry trying to catch up with everything :)

Do you have more refined questions on xpath or else?

 Also, pm me, I have a an advanced XML package that I am developing for a project where you can write and edit XML, so if you need this ability let me know. I will eventually push this on the wiki anyway.

bye,


 Jean


Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
Re: DataMaker xml and NGUI
« Reply #3 on: April 19, 2014, 07:02:35 PM »
Hi Jean,

So far So good. I am moving along with the XML. I am now controlling "step by step" operation and maintenance procedures and option selections for product using your XML package and various frameworks I have created in playMaker. Really cool stuff.

I spent a number of years creating Interactive Electronic Technical Manuals (IETMs) in a system called IADS , https://iads.redstone.army.mil/ , which uses SGML at it's core. I am basically doing the same thing, drastically simplified, in playMaker and your XML package. Having more advanced capabilities would be awesome.

 8)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: DataMaker xml and NGUI [Solved]
« Reply #4 on: April 22, 2014, 07:57:01 AM »
Hi,

 ok, please find attached a "beta" package with xml write abilities.

WARNING. make backups before using this and test on a fresh clean project to get acquainted with it.

 If you have questions, let me know.


 Bye,

 Jean

Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
Re: DataMaker xml and NGUI [Solved]
« Reply #5 on: April 22, 2014, 01:19:43 PM »
Thank you. Look forward to diving into this shortly.

~V~

joshuabogart

  • Playmaker Newbie
  • *
  • Posts: 7
Re: DataMaker xml and NGUI [Solved]
« Reply #6 on: July 10, 2014, 01:07:54 PM »
Hey guys, I'm looking to do the same type of thing. It would be nice to push out "On Screen Text" to an NGUI label based on an xml document. I don't suppose you would be willing to share a package or create some sort of video tutorial would you? Also, are you able to format the text (bold, italic, etc)? I'm kind of a newb at this myself at the moment. Any help would be a gold mine.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: DataMaker xml and NGUI [Solved]
« Reply #7 on: July 16, 2014, 07:10:06 AM »
Hi,

 you'll need to cut down the feature ( I have too much to catch up currently to do a dedicated sample right now, but please bump me every two weeks or so :) )

-- Can you deal with xmlMaker ok?
-- Do you master ngui and how it works with PlayMaker?

first don't use xml and simply see how to create a label using a fsm string variable. The ngui formating goes inside the string itself, so you'll simply need to embed the formating in there.


 Bye,

 Jean