Search Unity

Game Data Editor: The Visual Data Editor [Released]

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

  1. LittleRockGames

    LittleRockGames

    Joined:
    Jan 7, 2015
    Posts:
    16
    Hi,

    I have a quick question on GDE syntax. I want to access and change the data on an item, but all I know is its name, not its schema/class. The reason for this is that I have several different kinds of items which all can be activated/deactivated (via a bool called isAvailable). I've got a script which sends the name of the item to be activated, but doesn't know what kind it is. I can write a parser myself which will check the item type based on the name (I've got all my item names prefixed with a version of their schema names). Before I did that, though, I thought I'd check and see if there's a simple way to access and modify the item's data if I don't have the schema/class instantiated. Let me know what you think. Thanks!
     
  2. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hmm, you can call the Get/Set methods directly provided you knew the name of the item, the field name, and the field type. Take a look at your generated data class and you can see what methods to call. They look like:

    Code (csharp):
    1. // Get methods are like this
    2. GDEDataManager.GetBool(key, field);
    3. GDEDataManager.GetBoolList(key, field);
    4. GDEDataManager.GetBoolTwoDList(key, field);
    5.  
    6. // or if you want to default to a particular value
    7. GDEDataManager.GetBool(key, field, defaultValue);
    8. GDEDataManager.GetBoolList(key, field, defaultValueList);
    9. GDEDataManager.GetBoolTwoDList(key, field, defaultValue2dList);
    10.  
    11. // Set methods are like this
    12. GDEDataManager.SetBool(key, field, value);
    13. GDEDataManager.SetBoolList(key, field, valueList);
    14. GDEDataManager.SetBoolTwoDList(key, field, value2dlist);
    15.  
    16. // etc for all the types
     
  3. Lion-Jin

    Lion-Jin

    Joined:
    Jul 7, 2009
    Posts:
    32
    Hi, I bought this asset just a moment, is it possible to use multiple data file, so not only gde_data.txt?
     
  4. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes. Open the Unity Preferences and go to Game Data Editor. You can change the name of the data file there.
     
  5. Lion-Jin

    Lion-Jin

    Joined:
    Jul 7, 2009
    Posts:
    32
    Got it, thanks!
     
  6. Lion-Jin

    Lion-Jin

    Joined:
    Jul 7, 2009
    Posts:
    32
    Just work with GDE a little time, its a great tool, I already setup a lot of data using it, a few feature suggestions:

    1. Create a button in the editor to execute Excel.
    2. Create a toggle button in the editor, used to show/hide load, save, search area, that will save nearly half screen to edit the real data.
    3. Currently, Seems I must close Excel when importing data from Excel, otherwise I will get a "System.IO.IOException: Sharing violation on path" error, is it possible to edit data in Excel and import to Unity at the same time? (I used to read Excel using python when the Excel file is using without problem), Exporting to Excel has the same problem, but I can understand we could not write the file we are using.
    4. is it possible to support enum type?

    A question, except JSON data file like gde_data.txt, is there any other data file we are using? I just want to make sure I do not miss it.
     
    Last edited: Feb 20, 2016
  7. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    1. Create a button in the editor to execute Excel.
    Do you mean to import from Excel? There are buttons to import and export in the GDE Item Editor.

    2. Yes, this is an exception I've seen using older versions of Excel on Windows. I haven't seen this happen on OSX and it doesn't seem to happen using the newest version of Excel. I've researched the sharing violation before but didn't find anything definitive.

    3. GDE does not support enums at this time.
     
  8. Lion-Jin

    Lion-Jin

    Joined:
    Jul 7, 2009
    Posts:
    32
    Thanks!

    For 1. I mean a button open Excel quickly.

    Another suggestion is that, Create a toggle button in the editor, used to show/hide load, save, search area, that will save nearly half screen to edit the real data. My screen size is 1920 X 1080, but still feel half screen is occupied by those load, save, search UI, so I have only half screen to edit data.
     
  9. LittleRockGames

    LittleRockGames

    Joined:
    Jan 7, 2015
    Posts:
    16
    Perfect! This is just what I needed. Thank you.

    Is there API documentation somewhere online that I missed? I looked through all the documentation on the GDE website and could only find examples where the generated data classes are used (e.g. GDEArmorData).

    EDIT: Just tried this and GDEDataManager.SetBool only allows two arguments, a key and value. I'm using version 2.5 of GDE. Is this something that got updated in 2.6?

    EDIT #2: I read some more of your code, and it looks like I needed to put together the item name and field name into a single string separated by an underscore (e.g. "BldgPoliceStation_isAvailable"). This allows the SetBool method to process it. I tried that and it worked.
     
    Last edited: Feb 20, 2016
  10. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes, the methods I referenced are v2.6. If you can update to v2.6, I'd recommend it. Those methods aren't documented, as they weren't intended to be used directly, but they certainly can be used.
     
  11. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yup, someone else mentioned a toggle to collapse the top part of the GDE editors. I'll get that out in a small patch when I can.
     
  12. playa1337

    playa1337

    Joined:
    Jan 19, 2014
    Posts:
    13
    I'm on GDE v2.1 (March-May 2015 time-frame). I stopped working on my project for a few months and have recently built a new computer. I still have both machines.

    My project uses Unity 4.6.4 and GDE 2.1 and works as intended on my old computer. However, When I installed ,on my new computer, unity 4.6.4 and tried to run my project (zipped project files and unzipped on the new machine) I am getting the following error :

    System.Collections.Generic.List`1[GameDataEditor.GDEoppCurrentTeamData].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    EnemyEUG.populateEnemyAttacks () (at Assets/Scripts/EnemyEUG.cs:1212)

    Also, Is there a file I can backup from my old machine (eg. from registery or some hidden folder outside of my project files) where I can simply 'copy' over to achieve the same results? I just noticed I might have some manual commands to 'pre-load' data, but I don't remember my sequence - so my problem is most definitely isolated and probably not common. (once my program is running again, I can make the proper edits, but I a bit loss at the moment)

    (I am hoping you can assist me to get through this first hump and hopefully, it will make my upgrading process easier.)
     
    Last edited: Feb 21, 2016
  13. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    It looks like you are reading from an empty list. Make sure you are loading the data file correctly in the new project. Perhaps that file didn't get copied over?
     
    playa1337 likes this.
  14. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @GadgetGirls @Lion.Jin And anyone else that has v2.6, here's a patch that allows you to collapse the top section of the GDE Editors. Please let me know if you have any issues with it.
     
    Tinjaw likes this.
  15. WickedRabbitGames

    WickedRabbitGames

    Joined:
    Oct 11, 2015
    Posts:
    79
    Will it work within Unity 5?
     
  16. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes.
     
  17. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hi @Celestipoo

    I have a google spreadsheet that is constantly being updated by my client. Now, I want them to be able to see the changes reflected in my game at runtime without rebuilding anything. How do I do this?

    From the docs:

    Code (csharp):
    1. IEnumeratorInitGDE()
    2. {
    3. WWW payload =new WWW("http://example.com/gde_data.txt");
    4. yieldreturn payload;
    5.  
    6. if(!GDEDataManager.InitFromText(payload.text))
    7. {
    8. Debug.LogError("Error initializing!");
    9. }
    10. }
    Does this means that I need to regenerate the gde_data.txt manually every time from the editor if there's a change?
     
  18. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yes, you need to regenerate the data file and upload it to your server.
     
  19. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Aww shucks, I get the impression from the description that I can fetch from online spreadsheets at runtime.
    Is there's anyway that the data file can be generated from a spreadsheet at runtime? If there's none, I'm afraid I might have to request a refund. :(
     
  20. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Email me your invoice # if that's what you want to do.
     
  21. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    I've emailed you. Thanks.
     
  22. zeman97

    zeman97

    Joined:
    Sep 22, 2012
    Posts:
    53
    Just got it today and taking a look at it, there's more than I thought. Honestly am enjoying the visual way to edit data types in editor quite a bit, the spreadsheets are just extra goodness. I do have one question, is there currently a feature for creating a new Excel document from within the editor? From what I can tell you must create the spreadsheet separately, then have GDE export to that spreadsheet.
     
  23. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Awesome! That's always good to hear :)

    You don't need an existing spreadsheet. If you want to export local, enter or browse to a path. If that file doesn't exist, it will be created. If you want to export to Google, select Upload New Google Sheet. Take a look at the docs here: http://gamedataeditor.com/en/docs/exporting-spreadsheets.html

    Also, rating and review is always appreciated. Thanks!
     
  24. zeman97

    zeman97

    Joined:
    Sep 22, 2012
    Posts:
    53
    Just got it today and taking a look at it, there's more than I thought. Honestly am enjoying the visual way to edit data types in editor quite a bit, the spreadsheets are just extra goodness. I do have one question, is there currently a feature for creating a new Excel document from within the editor? From what I can tell you must create the spreadsheet separately, then have GDE export to that spreadsheet.

    Awesome, thanks!
     
  25. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    @jjwill06 And anyone else that had a question about GDE Data API, I created a new docs page outlining the underlying GDE data access methods. These are public methods that can be used independent of the GDE Data Classes or Playmaker actions. GDE Data API v2.6
     
  26. TrashBag

    TrashBag

    Joined:
    May 7, 2014
    Posts:
    5
    Hi, I use GDE since 2014 and I think it is one of the best tools we chose to use in our project, congrats, really. Recently, I upgraded to v2.6, to check the changes out and also loved that. But I'm running into a little problem and that's probably (for sure) because I did not understand the new way to save data in the Editor, so here's my doubt:

    I got this class GDEGameDataData, that contains global data about my character, like exp, checkpoint scene, checkpoint spot etc. I use a singleton class to get a reference to an instance of that class and make all my changes there, in the initialization I call:

    Code (CSharp):
    1. GDEDataManager.Init("gde_data");
    2.  
    3.         if (data == null) {
    4.             if(!GDEDataManager.DataDictionary.TryGetCustom(GDEItemKeys.GameData_Data, out _sharedInstance.data)){
    5.                 Debug.LogError("Failed to retrieve initial data");
    6.             }
    7.         }
    This data property is inside a _sharedInstance of a DataSingleton class. Every time my character gains experience I do something like:

    Code (CSharp):
    1. data.experience += moreExperience;
    2.  
    3. GDEDataManager.UpdateItem(data);
    4. GDEDataManager.SaveToDisk();
    I verified the content of the UpdateItem method and certified that the item passed was my updated character data, with a different experience quantity. The problem is that the data is not being updated, I aways get zero experience in the next run. Those two methods weren't necessary before, I just added it to the end of every method that makes a change in the data property.

    Am I doing something wrong? Is there something that I can investigate further to know what I'm missing?

    In the previous version, where UpdateItem and SaveToDisk weren't necessary, it worked perfectly.

    Cheers!
     
  27. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Can you put that first part in a review? Wow, so nice to hear! :)

    A couple things you can do to update your code to v2.6, regenerate your data classes if you haven't already.

    Also, replace all TryGetCustom calls with this to load items: (I'll use your GDEGameDataData item from above)
    Code (csharp):
    1. GDEGameDataData _sharedInstance = new GDEGameDataData(GDEItemKeys.GameData_Data);
    Now the confusing part of v2.6: UpdateItem and SaveToDisk are editor only methods for saving data *back to your data file*. Say you had some editor scripts that procedually generated GDE items. You can now use the GDE data classes to define new items, and use those methods for saving the generated data to your data file. However, those methods are for development only, they have no effect in a production build. So, to save data during *runtime*, use GDEDataManager.Save();

    You don't need to call Save every time you change a variable, save when it is convenient. This method will write out any runtime changes to persistent storage. GDE no longer uses playerprefs, so changes now require a manual Save() to persist.
     
  28. TrashBag

    TrashBag

    Joined:
    May 7, 2014
    Posts:
    5
    Hi, that worked, I had to override all my saved data in the editor, but finally I got it working and I'm very satisfied with the new way to call objects from GDEManager.

    Today I built my first android binary and found myself shocked when I realized that this time my editor saved data was compiled too. How can I get a build that does not override the previous saves with random data from debugging? Will GDE v2.6 work with people that had a binary running the older version?
     
  29. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    You had to override all your saved data in the editor? I'm not sure what you mean by that.

    To avoid confusion: GDE has two sets of data. The default data set, which is what is in your data file, and *saved* data (sometimes called runtime data). Your default data set is what you start with when you start a new game. Saved data (or runtime data) are any modifications your game makes to the original data set. Saved data used to be stored in Unity's PlayerPrefs, but is now serialized to an external file on the device. The file that contains the saved data is independent of the original default data set file. The original data set file will never be changed and will remain intact as part of your game's resources. That means you can reset the game at any point back to the original values.

    So, when you say you overrode your saved data in the editor, it sounds like you modified your original data to reflect the saved data you wanted. That would explain why you are seeing the modified values in your new android build, instead of your original default data set. If you can show me some snippets of how you are loading and saving data in your game, maybe I can see what the issue is.
     
  30. TrashBag

    TrashBag

    Joined:
    May 7, 2014
    Posts:
    5
    This is how I load my data from the disk:

    Code (CSharp):
    1.         GDEDataManager.Init("gde_data");
    2.  
    3.         if (lilian == null) {
    4.             lilian = new GDEGameDataData(GDEItemKeys.GameData_Lilian);
    5.         }
    And this is how I modify and save it back:

    Code (CSharp):
    1.         switch(slot){
    2.         case 0:
    3.             lilian.magicOne = name;
    4.             break;
    5.         case 1:
    6.             lilian.magicTwo = name;
    7.             break;
    8.         case 2:
    9.             lilian.magicThree = name;
    10.             break;
    11.         default:
    12.             break;
    13.         }
    14.         UpdateElementsValue();
    15.         GDEDataManager.UpdateItem(lilian);
    16.         GDEDataManager.SaveToDisk();
    There's no big deal with it I think, the logic used is exactly the same as I had in the previous version of GDE.

    What I noticed is that my "Item Editor" menu shows the runtime values, always. If I "Import SpreadSheet" it overrides all data values to its defaults. But it is building with the data I saved when testing my game.

    What I'm afraid of is whether the players that have a saved state of the game in the previous version, once they upgrade, if they will reset the data to a clear state.

    PS: When I said that I overrode all saved data, I meant that I erased my previous gde_data.txt, maybe I did other modifications too, and one of them got my gde working.
     
  31. TrashBag

    TrashBag

    Joined:
    May 7, 2014
    Posts:
    5
    Oh, I just realized, my android build is not saving the data =[ same project that in the editor is writing over the Item Editor menu (event if not running)
     
  32. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ok, so these methods:
    Code (csharp):
    1. GDEDataManager.UpdateItem(lilian);
    2. GDEDataManager.SaveToDisk();
    Are for updating your data file while in play mode. It's for people that want to update the original data set during game play. The way I've seen it most used is when data is generated with a test scene. It gives the dev the ability to script data generation, and save it to their data file easily. Previously, any data generation needed to be done by generating the json. Now, you can generate data without needing to know the internal json structure. This feature is a prebuild step. Any calls to UpdateItem() or SaveToDisk() in a build will result in a no op. These methods only function while in play mode in Unity.

    What you want to do is this:

    Code (csharp):
    1. switch(slot)
    2. {
    3.      case 0:
    4.           lilian.magicOne = name;
    5.          break;
    6.      case 1:
    7.           lilian.magicTwo = name;
    8.          break;
    9.      case 2:
    10.           lilian.magicThree = name;
    11.          break;
    12.      default:
    13.          break;
    14. }
    15.  
    16. UpdateElementsValue();
    17. GDEDataManager.Save();
    GDEDataManager.Save() is the only method you need for saving runtime data.
     
    hopeful likes this.
  33. jjsonick

    jjsonick

    Joined:
    Sep 11, 2013
    Posts:
    18
    Is there a way to have multiple external saved data files with GDEDataManager.Save()? Ie some way to name the saved file so different saves can be tracked individually? Bascially I need to make a Save/Load system that can have various save states. Or do I have to do that manually (ie performing a "Load Game" by writing all the current GDE variables/lists one-by-one to a particular text file or such, and peforming a "Load Game" by reading them all back in from a particular file after GDE's initialized)?
     
  34. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    At the moment there is only a single save file, however, you could structure your data in such a way that you could have multiple saves. For example, say you had a master schema that contained all your data called GameState. This GameState schema will have all child schemas linked in whatever way makes sense for your game. Then when you want to create a new save, you can create a new clone from the original GameState item like this:

    Code (csharp):
    1. GDEGameStateData newGame = new GDEGameStateData(GDEItemKeys.GameState_Default).DeepClone();
    2.  
    3. // At some point later you call Save()
    4. GDEDataManager.Save();
    Another schema could track save meta data. It can contain a human readable name, creation date, last save time, etc. Each save would have its own save meta data item. Tracking your saves would go something like this:
    Code (csharp):
    1. GDESaveMetaData metaSave = new GDESaveMetaData(<some guid>);
    2. metaSave.name = "Save #1";
    3. // This will be your GameState key of the clone that was made earlier
    4. metaSave.save_key = newGame.Key;
    5. metaSave.createDate = DateTime.Now;
    6.  
    7. // Update this every time the save is updated, so you can sort all saves by last played date
    8. // Or not, if you don't need that
    9. metaSave.lastSaveDate = DateTime.Now;
    The advantage to separating the save meta data from the main save item is you can sort, display, and manage saves using the smaller meta data items instead of loading a list of all your saves. For example, to get a list of all meta save items, do this:
    Code (csharp):
    1. List<GDESaveMetaData> allSaves = GDEDataManager.GetAllItems<GDESaveMetaData>();
    When you want to load a save, you grab the key from the meta save item.
    Code (csharp):
    1. GDEGameStateData currentGameState = new GDEGameStateData(metaSave.save_key);
    Would something like this work for you?
     
  35. jjsonick

    jjsonick

    Joined:
    Sep 11, 2013
    Posts:
    18
    Ok, I think I get it.

    So I'd have:

    GameState_Default schema - contains everything in its initial state. I *never* read or alter any of its fields during runtime.

    GameState_Running schema - this is a DeepClone I make of GameState_Default whenever a new game / the app is started up. I am always reading and altering its fields during runtime.

    Whenever the user manually saves the game for the first time into a gameslot, I DeepClone GameState_Running into a new SaveGame schema named after the appropriate saveslot, tracked by the metadata, and make sure I call GDEDataManager.Save so this snapshot schema is saved.

    For saving again to the same "slot" would it be another DeepClone or just an assignment (since that particular SaveGame schema now exists)?

    And finally for loading, I assign the appropriate cloned GameState to GameState_Running? From what you had, just altering it to:

    Code (CSharp):
    1. GDEGameStateData GameState_Running = new GDEGameStateData(metaSave.save_key);
    ?

    Do I have that right?
     
  36. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yup, mostly right :)

    GameState_Default would contain the initial state of the game. Don't ever modify it. If you do, you can always call ResetAll() on it before deep cloning. But, I think the simpler route is to use it as a read only starting point for a new game.

    For saving to the same slot, you would load that particular game state, make more changes to it, then call Save(). Deep clone only when you want to save to a new slot. So say you have game state A and B. You load up B, play a little, and decide you want to save to a new slot, C. Deep clone the current state of B, and that now becomes game state C. You can then load up A, play a little, deep clone that and save to slot D, etc.
     
  37. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    FYI, GDE/LE Bundle upgrade is on Sale! It's a great time to upgrade and get Localization Editor. LE v1.2 development has started and will include a new streamlined UI, and support for localizing GameObjects, Sprites/Textures, and AudioClips.

    Upgrade here
     
  38. jjsonick

    jjsonick

    Joined:
    Sep 11, 2013
    Posts:
    18
    Ok, I think can make that work. Thanks! :)
     
    Celestipoo likes this.
  39. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    Hi,

    is there a way to customize:
    1) code generation destination folder
    2) code generation destination namespace
    3) pre/post fixes for class names

    say I would like to have all my data classes in GameName\Data folder in GameNameData namespace without "GDE" prefix on them. Pre/postfix paert is least important but folder/namespace option would be really nice to have
     
  40. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    We are moving from Datablocks and after few minutes of use we have some questions:

    1) since GDE does not support Sprite data type, we must resort to Texture2D (and recreated Sprite in code), problem is that when we set a texture in Item Editor it gets reset (to null) as soon as Play button is pressed. What are we doing wrong?

    2) Is there no support for enums?

    3) Is there a way to quicky switch to specific custom data type from the type that uses it. Say a Wizard has a list of Spells and we want to quicly jump to one of spells selected in that list.

    A suggestion: please please consider using proper editor list implementation like this one from: https://bitbucket.org/rotorz/reorderable-list-editor-field-for-unity
     
  41. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    If you generate the files the files and move them, any time you regenerate them, they will update the classes where they are in your project. Or you can change the default path at the top of this file: GameDataEditor/Editor/CodeGen/GDECodeGenConstants.cs

    You can also change the namespace and default pre/post fixes for class names, however, some of the internal runtime code expects the GameDataEditor namespace and pre/post fix format. You can experiment. You might not be using the features that require that and it will work fine for you. If, during runtime, some items aren't loading correctly, it could be due to you changing the namespace and data class name format, or it could be something else. Ah, fun with development ;)
     
    Last edited: Mar 30, 2016
  42. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Any prefabs or Texture2D's, etc, linked in GDE must be in a Resources directory or subdirectory.

    No support for enums right now.

    I'm not sure what you mean in #3. Are you using the GDE Item Editor? No, there's no way to click and jump. That would be cool though. I'll write that down.

    Hey that looks promising. I'll look into it.
     
  43. stevebu56

    stevebu56

    Joined:
    Apr 16, 2014
    Posts:
    26
    We have opened up GDEOnline for users to evaluate it for 14 days. You can login with an invitation code. Send us your GDE invoice number and we will give you an invite code. The code is good for 14 days to evaluate the system and after that it's $10/month. Nothing will automatically be charged, the backend service will just shut off after the 14 days.

    Some high points of the service.
    • Quick & easy backup of your GDE datasets.
    • Serve up your datasets to your game clients 24/7 365 from the cloud.
    • Modify your data during runtime & save it to the cloud.
    Link to the Quickstart for the service.

    If your project has high throughput needs or special considerations need to be made we can discuss options. Contact us via email.

    steve@stayathomedevs.com
     
    Celestipoo likes this.
  44. MitchelQ

    MitchelQ

    Joined:
    Nov 18, 2013
    Posts:
    18
    Hi,

    Is it possible to create a new Item instead of adjusting one during runtime with playmaker?

    Best regards,
     
  45. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Yeah, when you are using the playmaker actions, just use a new unique key when you want to create a new item. Make sure you use the Save action, at some point in your game, to save any new items and modified data.
     
  46. MitchelQ

    MitchelQ

    Joined:
    Nov 18, 2013
    Posts:
    18
    Hmmm.. I can't seem to get it to work.. I'm doing this:

    Action: GDE Set String
    String Value = Test
    Item Name = New Item <-- this item does not exist yet
    Field name = TestString <-- this field does exist in my Schema which is call "Items"

    After running my New Item does not show up in the GDE Item Editor Item List when show runtime values is checked.

    If I do the same as above with Item Name = Old Item (which does already exist) it does change the field "TestString" so there should be no problem in my FSM I guess.

    What am I doing wrong?
     
    Last edited: Apr 1, 2016
  47. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Hmm, can you load the item that you created again? I'll investigate and make sure it's not a bug with my playmaker actions or the runtime values window.
     
  48. MitchelQ

    MitchelQ

    Joined:
    Nov 18, 2013
    Posts:
    18
    Ah yes, it does create the new Item (able to load the values), just doesn't show it in the item editor item list. It does update existing items just not show new ones.

    Thanks!
     
  49. Celestipoo

    Celestipoo

    Joined:
    Jul 1, 2013
    Posts:
    379
    Ah, ok. Yup, I already know what the bug is in my mind. I'll work on a patch and send it to you.
     
  50. MitchelQ

    MitchelQ

    Joined:
    Nov 18, 2013
    Posts:
    18
    Thanks! No need to rush though, I can use it without, but would be really nice to have for debugging