As the title says is it possible to take data from a google sheets or Excel document and have a schematic pull that data into specific object variables?
Portfolio - My Website
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop
  • You can read a whole text file into a string variable via the Read Text File node and line by line into a string list variable via the Read Text File Line node.

    However, there's currently no way to e.g. read a spreadsheet and convert it into key/value pairs for variables or something like that.
    For this you'd have to write a custom node.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • So could I have a custom node find my spreadsheet file and set variables based on a specified cell locations.

    For example cell B2 contains a string called itemName and C2 contains a numberValue. So the custom node I’d like to set up would get mySpreadsheet. Then locate cell B2 and store that cell value into a variableKey item_1_Name as a string and another to locate cell C2 and store that cells value into an float or float as int variableKey item_1_Power.

    If this is something possible could I commission you for help on this?

    Let me know it’ll be greatly appreciated!
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • Hi @relenting_1
    Sounds like a great node request and major time saver for data entry. See your inbox for a DM/PM from me.
    God bless,
    RF
  • edited August 2021
    Also, a storeCellDataNode to find and store cell data into a variableKey would be fantastic on its own but also a checkCellDataNode that can check a specified cell for specified data would be cool too!

    Looking at this info for ideas system.string.substring and how-to-convert-a-string-to-a-number .

    And also this video https://youtube.com/watch?v=mAeTRCT0qZg explaining how to separate the CSV file into sections for specific data.

    And this video https://youtube.com/watch?v=1EdLTF43d70 to make ScriptableObjects from a CSV file.

    With the scriptableObjects is there a node to change variables based on the ScriptableObjects fields or is this possible with the StoreField node? Because if thats the case I can just create ScriptableObjects from a CSV file and pull the data from the ScriptableObject assets.

    Let me know, any help is greatly appreciated! =]
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • edited August 2021
    I figured out a way to generate my spreadsheet data into ScriptableObjects is there a way to access ScriptableObjects in a custom node to transfer into lets say an object variable in the scene?
    I tried making the ScriptableObject public in a custom Node script but it doesn’t work because it derives from a MonoBehaviour.

    Edit*** found out that if the ScriptableObject script is in the Editor folder it couldn’t find it. Placed it in my normal scripts folder and I can now drag the ScriptableObjects to a field in my custom node. Now trying to pull data from the ScriptableObject using a string called Data. When I Debug.Log(ScriptableObject.Data); it gives an error message that Data is not defined.
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • Things in Editor folders are not available during play and not put into a built project.

    Generally, you should be able to use custom assets in ORK - just define it in your custom node's code like you would any other asset (e.g. audio clip, etc.) and ORK should store the reference to it.

    As for the error, I'd need to know more about your custom asset's code to be of help there.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited August 2021
    I found a way to get a ScriptableObject variable to print to the console from my custom node by defining what variable I want in a variableKey. However the code seems pretty janky at this point just to do that.

    Essentially I’d like to add the option to pick a custom asset in the Variable Origin list. This way the option to get and set variables is available in any current existing nodes that asked for a Variable Origin.

    I will send you a direct message with a link to my current code once I get back to my office.
    *Edit* Sent you a email with my code and files.

    The error happens if I leave the Debug.Log(Weapons.Data);
    in the execute part of the custom ScriptableObjectDataNode script.

    I commented out that line before sending you it in the email and it should work getting the data in the console now. I’m just wondering if it’s correct how I did it or if there is an easier way setting the ScriptableObject as a Variable Origin and using get Data and Set data just like the change Variables Node.

    Let me know,

    Cheers! =]
    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • I'll check it out, but probably not before next week :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Awesome! Much appreciated! =]
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • Tested out the new CSV value fields in ORK3 and it is working wonders!!!! I have a spreadsheet that will list all my combatants and all the stats for each and all I have to do to transfer that data over is to declare my Row Key as my Combatant and the Column Key as the Stat Value!!!

    Stats for your weapons/armor, spreadsheet database!
    Quest chains, spreadsheet database!
    Items, spreadsheet database!
    Shop prices, spreadsheet database!

    The uses for this is endless if you are developing your game on the go and want to work out of google sheets or excel from your phone, iPad, whatever all that data can be brought in!!!

    It's amazing to have a game database on the go!

    Again, Nice work GIL!!!

    Side note for anyone that needs to change the separator in their CSV or if you work in google sheets and can only save with commas to separate the values. You can open up the saved CSV in the text editor and use the Edit>Find>Find and Replace... tool to replace commas for whatever separator you want to use.

    Cheers! =]
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
Sign In or Register to comment.