Could someone point me to a how-to/tutorial on how to use CSV files in ORK? I remember reading either a tutorial or forum post that explained it (I'm pretty sure it was GiL explaining it), sometime ago, but I can't find it now. The post explained how to set up a CSV file and access the values in ORK or Makinom. I've never used a CSV before.

On a related note, any advice for searching the forum or documentation for things? It seems the more specific my search is on the forum, the more stuff comes up, usually unrelated to the search term. And on the documentation site, almost all my search terms return no result, or just a general broad category. I know most of my questions/issues have answers already but I struggle to find them in the various places (forum, tutorials, documentation, etc). I hate to waste peoples' time by asking these things on the forum when I'm sure an answer is already out there. Any search tips?
  • @type4101 For your second question, the best way I've found to search the forum is through Google and then adding "site:forum.orkframework.com" at the end of your query. The forum search itself seems to be pretty liberal in its interpretation of keywords, but Google will also include unrelated stuff (consistently a thread on PixelCrushers asking about ORK integration no matter what lol) so restricting it to the forum site has helped me a lot.
  • @Acissathar That was a helpful tip. I did find more info on CSV files using that search method, but still couldn't find the how-to I was looking for. It may not exist anymore, since the CSV stuff in ORK has changed a few times since then. Much of the info on CSVs I found was in the BETA release section. The concept of using CSVs doesn't seem too hard, I just need someone to walk me through the actual process.

    So I am officially requesting a crash-course in using CSV files with ORK Framework (from GiL or any other helpful soul who sees this post and understands CSVs).

    For example, lets say I wanted to spawn a combatant and assign stats or equipment to that character taken from a CSV file. And lets say I open up notebook and make a text file called myCSV that looks like this:

    row number, character name, max HP, weapon, faction
    1,Amy,100, Sword, Enemy
    2,Bob,75,Axe,Ally
    3,Chen,90,Sword,Ally
    4,Donna,50,Fist,Neutral

    Assuming I know nothing about CSVs, if I wanted to spawn a combatant and use the info in row #2, for example, how might I do that? All of these values are considered strings, right? Do I do some sort of conversion for the integers? How might I assign an ORK faction based of the string in the 5th column (e.g. Ally, Enemy)? And what is this talk of "loading" and "unloading" a CSV....can I only have one CSV file in use at a time? These CSV files seem useful, if I can figure them out.

    Thanks for anyone who can shed some light.
  • Some things to keep in mind when working with CSV:
    - row and column start with index 0, e.g. 'row number' value in your example is row 0 and colum 0
    - make sure to use the correct separator in ORK that matches your CSV file's separator (e.g. ORK defaults to ';')

    It's probably easiest to work with the CSV Row Index Column Index value types, as they directly define the row and column index to use. The other variants use variables to define one or both of them and make it a bit more comlex to deal with :)

    Now, stuff like 'Amy' or 'Sword' are string values, so you can only get them as strings. '100' on the other hand can be used as string or int/float value.

    For your example, making row 2 into a combatant, you'll do a lot of storing those values into variables and processing that information by checking the variable, e.g.:
    - store row 0 column 1 (i.e. character name) into a string variable
    - check the variable (e.g. using a Variable Fork node) for the different names and create the correct combatant (e.g. adding it to the player group) based on that

    It works the same for weapon and faction - getting the value, checking it and doing stuff based on that.

    For the max HP, you can use that directly, e.g. in a Change Status Value node either using Set operator or the Initialize option. The value can directly get the value from the CSV file to set the max HP (row 2 column 2).
    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!
Sign In or Register to comment.