Hey all,

Could anyone please give an example usage of the following function:
ORKDataFile ORKFramework.DataObject.GetDataFile (string name, bool encrypt)

Here's the description from DoxyGen:
-------------------------------------------------------------
Returns the ORKFramework.DataObject data in a XML formatted string.

Parameters
name The name of the XML root node.
encrypt The XML data will be encrypted.

Returns
An ORKFramework.ORKDataFile that represents the current data of the ORKFramework.DataObject.
-------------------------------------------------------------

Thanks

  • It doesn't matter which DataObject is used in the example.
    I mostly just need to know what the parameters are asking for.
  • I think I've got it working by passing ("Root", false)
  • It's actually pretty simple - as the description says:
    - name is just the name the whole XML structure will be enclosed with, it doesn't really matter what name you use here
    - encrypt will, well, encrypt the XML text if this parameter is true :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks for responding.
    But how do I read data from the deeper nodes?
    I can get values from the root-level nodes but not any further than that.

    So for example this works and returns True:
    weaponDataObject = ORK.Weapons.data[0].GetData();
    verificationBool = weaponDataObject.Contains("sympathyChange");
    But if I try to access something like hitBonus or counterBonus, it comes up False.
  • Deeper nodes are their own DataObject stored within their parent data object. Turning a data object into XML will contain all data of all sub data objects as well, so at that stage you just need to read the XML in whatever way you want.

    Anyway, what do you want to achieve with this?
    Using ORK's data objects or XML just to access certain information is very complex and actually unneeded, as this is already available in the loaded ORK data instances (e.g. a weapon), where you can just check the fields directly.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.