Search Unity

Game Data Editor: The Visual Data Editor [Released]

Discussion in 'Assets and Asset Store' started by Celestipoo, Jun 6, 2014.

  1. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    You could take your Weapon and modify its values when an upgrade happens. Would you then move that item to Weapon[WeaponType][weaponLevel + 1] ?

    GDE handles all the data management. Any game logic around that data (i.e leveling up) is up to you to implement however you like.
     
  2. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    done, left my review :)
    My only request, and it's something that would really come in handy would be encryption.
    Like I wrote in my review, being able to upload to a web server is really useful but might not fit everyone's needs (such as my case). Having this would make this package absolutely perfect for me and, I'm sure, plenty of other users.
    Still, great package :)
     
  3. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I agree, encryption would be a great feature to have! That will be in the next update. Thanks for the review :)
    And if you think of anything else you'd like to have while using it, be sure to send me a note.
     
  4. GamesByJerry

    GamesByJerry

    Joined:
    Oct 27, 2008
    Posts:
    71
    I've spent the last hour looking but can't seem to find how I can grab the list of all the items in a schema? Every example that I've seen is hard coded.

    Say I have an opponent schema with an unknown number of items Orc, Goblin, Rat... What do I call to build a dictionary <string,GDEopponent> ( so I end up with something like opponents["Orc"].health ) without hard coding each item using GDEItemKeys?
     
  5. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    There is an undocumented method called GetAllDataKeysBySchema that should do what you need. Here's a snippet to get you going:

    Code (csharp):
    1. List<string> opponentKeys = null;
    2. GDEDataManager.GetAllDataKeysBySchema("opponent", out opponentKeys);
    3.  
    4. Dictionary<string, GDEOpponentData> opponents = new Dictionary<string, GDEOpponentData>();
    5. foreach(string key in opponentKeys) {
    6.    GDEOpponentData data = null;
    7.    GDEDataManager.TryGetCustom(key, out data);
    8.    opponents.Add(key, data);
    9. }
    10.  
    You might have to change the schema names if I didn't get it right, but that's the gist.
     
  6. GamesByJerry

    GamesByJerry

    Joined:
    Oct 27, 2008
    Posts:
    71
    Brilliant, works a charm! Thank you very much.
     
    Celestipoo likes this.
  7. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    YAY for encryption ! :)
     
    Celestipoo likes this.
  8. Nixaan

    Nixaan

    Joined:
    May 30, 2013
    Posts:
    118
    My idea was exactly that - not everyone to be able to mess with the data at will.
     
  9. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    55
    Hi,

    For me GDE crashes when i try to import a local file. As soon as i select the file on the harddisk unity crashes hard. Im running 4.6.2f1 under OSX 10.10.2.

    Also some things are not obvious. If i'm not mistaken, it's impossible to use any google spreadsheet functionality (because it will not edit xlsx without converting it first, making it impossible to import from the web).

    Could you look into this crash and give me a hint for the spreadsheet problem?
     
  10. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah, sorry about that. Can you email the file you are attempting to import to celeste@stayathomedevs.com? Also, where is the local file located? Is it within your Unity project or somewhere else? Let me know and I will look into it.

    As for importing from google, the idea is you seed your GDE data with the spreadsheet. GDE will not modify your spreadsheet directly. Spreadsheet import is for users that would like to manage their data with a spreadsheet, rather than use GDE's visual data editor. Does that answer your question?
     
  11. der_r

    der_r

    Joined:
    Mar 30, 2014
    Posts:
    259
    I have a problem with Google Spreadsheets. None of my native Google Drive files show up. When I upload an Excel file that does show up but those are read-only unless I convert them to a Google file, which also doesn't show up.
     
  12. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    GDE does not modify google spreadsheets. It will only download, read the spreadsheet, and import the data into the GDE system. There isn't a need for GDE to have write access to your google spreadsheets. However, you should be able to see your native spreadsheets in the dropdown list and import them. I will take a look at it.
     
  13. der_r

    der_r

    Joined:
    Mar 30, 2014
    Posts:
    259
    I just created the spreadsheet without modifying any permissions. When I try to import it, the dropdown list is completely empty. I tried re-authenticating a few times as well.

    Maybe they changed something again on Google's side of things.
     
  14. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yeah, something has changed. The query I'm using is no longer returning native google spreadsheets. I'm on it.
     
  15. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @der_r I sent you a private message with a patch. Let me know if that works for you and I'll make sure to get that fix in the next update.
     
  16. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @ludos Another user mentioned that if you have Finder open and have your spreadsheet selected such that the Finder window is showing a preview of it while attempting to import, it will crash Unity. Could that be what was happening for you?
     
  17. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    86
    Hi,

    I have created a schema with some basic data and generated my GDE editor file with the "Generate Custom Extensions" function. But the generated my GDEItemKeys.cs file is an empty class as shown below. I have not been able to figure out how to load my data.

    namespace GameDataEditor
    {
    public class GDEItemKeys
    {
    }
    }
     

    Attached Files:

  18. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hi Mavina! Creating your data is a two step process. What you did, was create a schema and entered in some default values. The next thing you need to do is use that schema to create some items. Take a look at this: http://gamedataeditor.com/docs/entering-data.html

    Once you create some items with the Create Data window, regenerate your classes (and that will fill out the GDEItemKeys.cs class) then you will be be on your way.

    Here: http://gamedataeditor.com/docs/using-gde-data-classes.html is the documentation on how to read in your data.

    Let me know if you have any more questions.
     
  19. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    86
    That did it, thanks. I feel that I will probably be asking more questions but at least for now I know how to get the data. Next step is writing the data. Do you know if you will be adding encryption to GDE?
     
  20. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    No worries. Take a look at the GDE Quickstart Guide. That summarizes the GDE system. At the bottom there is a link to start the GDE walkthrough, which goes through all the GDE features in more depth.

    On encryption, it is on the list of future features. Not sure when it will be released exactly, but soon :)
     
  21. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    86
    Good to know. Thanks for the help!
     
    Celestipoo likes this.
  22. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    86
    Changing from one game level to another and back retains data fine. But when I quit a game and restart all data is reset to defaults.
     
  23. TBruce

    TBruce

    Joined:
    Jan 18, 2015
    Posts:
    86
    Nevermind, I found the problem.
     
    Celestipoo likes this.
  24. angel_cuban

    angel_cuban

    Joined:
    Mar 10, 2015
    Posts:
    4
    Hello, I just purchased this on the asset store and I am having a similar issue with it not recognizing my Google Spreadsheet. Is there anyway I can get access to this patch as well or will I have to wait for the update. Any help is appreciated. I love this package by the way!!
     
  25. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Sure thing, I will send you the link now. That patch was also submitted to the Asset Store for review. Hopefully it will be approved soon.
     
  26. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Awesome! A rate and review would be much appreciated, especially from someone that loves it :)
     
  27. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    This maybe related. I just downloaded, imported, and used GDE for the first time. I didn't change the default file location in the preference dialog. It is set to:

    /Volumes/Unity Projects/Testing One/Assets/GameDataEditor/Resources/gde_data.txt

    I opened the Define Data tab and it set the file to just "gde_data.txt", not "/Volumes/Unity Projects/Testing One/Assets/GameDataEditor/Resources/gde_data.txt".

    And when I searched for the file, I found it in the root of my project's folder.

    /Volumes/Unity Projects/Testing One/gde_data.txt

    So it looks like when it starts from scratch, it creates the data file in the wrong place.
     
  28. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    So the first thing you did after importing GDE was look at the preferences pane? I'll take a look again and see if I can find this bug. Thanks for the info.
     
    Last edited: Mar 19, 2015
  29. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @Tinjaw I found the issue and I'll get the fix in. Thanks for your help!
     
  30. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Submitted v2.0.3 to the Asset Store. It's got lots of good fixes in it. Hopefully it will be a quick approval. Here are the version notes:

    * Fixed native google spreadsheets not appearing when importing spreadsheets from google
    * Fixed Newtonsoft.Json.dll to not throw compile errors in Visual Studio
    * Fixed bug with data file path when importing for the first time
    * Fixed draw issue in GDE editors
    * Updated docs
     
  31. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Game Data Editor v2.0.3 is now live! Be sure to update, there's lots of good bug fixes in it.
     
  32. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    check attachment, for some reason it doesnt work and returns error.

    on starting state i do have gde_data in gde manager init... so yeh can you help? :)
     

    Attached Files:

    • gde.JPG
      gde.JPG
      File size:
      199.1 KB
      Views:
      885
  33. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Sorry about that! There was a bug in 2.0.2 that caused gde_data.txt file to get created in the wrong place. You should first update to v2.0.3. The do these steps:

    1) Move your gde_data.txt to GameDataEditor/Resources (or any Resources directory in your project)
    2) In your Unity project view, Right click the gde_data file and select "Game Data Editor/Load" in the right click menu.

    Try running your game again. It should load correctly.
     
  34. bizilux1

    bizilux1

    Joined:
    Jun 6, 2013
    Posts:
    151
    it works, thank you
     
    Celestipoo likes this.
  35. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Game Data Editor v2.1 was submitted to the asset store! Here are the release notes:

    * Encryption!
    * Added default header colors for Unity Pro Skin
    * Added ability to skip rows or columns when importing from a spreadsheet

    For those using spreadsheet import, the format will change a tiny bit. I will be posting the new format soon. With the change, you will be able to ignore any row or column. Useful if you like writing notes alongside your data inside your GDE data spreadsheets :)
     
    Mikeedee likes this.
  36. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    And still no the long awaited Spreadsheet export yet ;_;
     
  37. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah geez, don't start crying. That's my weak spot! ;)

    I haven't forgotten, it's on my ever growing feature list on my whiteboard. I haven't found an elegant solution yet. Would a CSV file be sufficient?
     
  38. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Hey @Celestipoo ,

    Do you plan to implement some feature of storing saved data so it can work for saving/loading game state? I mean the case where there is one source dataset for the new game, it can be modified in runtime and saved. Then it can be loaded from that state, but the initial dataset is not changed, so you can always start a new game with the initial dataset.

    Generally, new game always uses initial datased but any loaded game state uses appropriate and modified (saved in runtime before) version of GDE dataset.

    It would be awesome if possible. GDE would be able to work as a complete database solution, both for static data (like not dynamic weapon attributes) and dynamic data like inventories, containers etc. that need to be saved when player saves the game and loaded when player loads it but the process won't break initial database and every saved state is independent.

    Maybe saving and loading from string would work? What do you think?
     
  39. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Absolutely!, A CSV file is sufficiently brilliant!
    Though, I would prefer if GDE could load from the generated CSV too. :D
     
  40. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah, new features are such a slippery slope ;)
     
  41. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hmm, right now the initial data is not overridden. So you can always reset all your items and your data will be back to its original values. The only tricky part is having the saved state be independent. Some tweaks to the data saving would need to be made.

    So here are a list of changes I'm thinking to get this to work:
    1) Instead of saving to playerprefs, the values need to be saved to the DataDictionary. I'm thinking about the best way to implement this. Perhaps changing the Save methods in GDEDataManager.

    2 ) Then, each time a save is made (or when the game is closed), the DataDictionary should be saved to local storage. Not a difficult thing to implement. But will not work in Web builds so keep that in mind. You can save the current state as gdecurrent.txt and each snapshot as gde_datetaken.txt.

    3) Then, each time the game is run, use InitFromText and load the save file you'd like.
     
  42. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
  43. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    Awesome, thanks a lot for the update :)
     
    Celestipoo likes this.
  44. Lasse-Loepfe

    Lasse-Loepfe

    Joined:
    Mar 28, 2014
    Posts:
    29
    Hi,

    congratulations for a great product.
    Just a small suggestion: make the new spreadsheat import keywords (such as GDE_IGNORE) insensitive to an extra space character at the end. A friend of mine ;) had the idea to copy-paste them from the webpage and double click to select them and lost 30 minutes of his life.
     
  45. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    And probably case insensitive too. Very sorry about that! Will do.
     
  46. akhil96

    akhil96

    Joined:
    Oct 12, 2014
    Posts:
    32
    hi,
    expecting GDE supported with icode(visual scripting tool like playmaker)?
    and
    expecting more supported types like that of easy save 2.;)
     
  47. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    I will look into iCode support.
    What specific types do you need that aren't supported?
     
  48. akhil96

    akhil96

    Joined:
    Oct 12, 2014
    Posts:
    32
  49. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
  50. akhil96

    akhil96

    Joined:
    Oct 12, 2014
    Posts:
    32
    try to consider unity types(Texture 2d,material,audio clip,vector3) menctioned there and also the missing primitive types also.
    others are also welcome.
    with them this extension become highly useful.
    thanks.