json

  1. N

    GMS 2.3+ Trouble with saving ds_lists and arrays to a struct based (json) saving system

    So I have done a video explaining things but the most important things are in the post itself. In the video I show the content of the json file though Hi, I have multiple problems using a save and loading system using json. My Saving code looks like this function SaveTest(){ if...
  2. giraffeman210

    GMS 2.3+ saving with a parent object

    I followed a tutorial to save objects and it said that if I gave each object the same parent object it would still load the individual objects correctly. However when I save and load, it loads every object as the parent object. Is there something I did wrong? Here is the save code and the load...
  3. S

    GMS 2.3+ Getting Vars From and To The Proper Instance

    So I have been trying to work on a "save" system based off of structs and have reviewed many tutorials and the GM manual regarding these related topics. I can get the data I need to save into my structs "technically" but I am having issues when I try to get the data from a specific instance. I...
  4. S

    GMS 2.3+ Trying to get a struct to a variable from a .txt or .json file

    Hey all, I want to use a txt or json file containing a struct with all the dialogue for the game (so I could swap in translations etc) but with all my attempts at searching how to do this correctly I still haven't managed to. If I have a .txt or .json file containing: { "teststring": "this is a...
  5. A

    Data import: csv or json?

    Hi all, for the purpose of importing data into gml, is there any specific reason to prefer csv over json format? I do not have an actual case or application at hand, it's more of a general question. But as a vanilla example, let's say something like data describing a number of monsters or NPCs...
  6. O

    SOLVED Saving / loading maps using JSON; getting the error "Data structure with index does not exist"

    Hey all, I'm experiencing some difficulties creating a save game system, specifically with saving / loading maps that store lists inside them. I have a map oData.map_oIntObj_indexes which stores lists with data about certain objects. In my save script I have tried both this (where _map is the...
  7. Ekit

    GMS 2.3+ Trouble with saving with JSON

    Hi all, I'm currently getting back into GameMaker Studio after a year long hiatus. I wanted to implement a saving system into my game and found this tutorial on Youtube: GameMaker Studio 2 - Best Saving and Loading Tutorial (2.3.1+) - YouTube I followed it and it seems to work perfectly...
  8. gnysek

    GMS 2.3+ Saving and loading structs with constructor to/from string?

    With 2.3+, there's easy option to save/load struct, using json_stringify() and json_parse(). That however saves only normal struct, not those created using new keyword from constructor functions (they will be converted to normal struct too), so I can't later use instanceof on them. I was...
  9. Aaron Craig

    GMS 2.3+ Using json parse returns the values in different orders from time to time

    I'm working on a card game and have created a json file to import all the card details. The problem is the parsed json changes the order it comes in, seemingly at random. It seems like if I add any extra code into my project, anywhere, it may change it. It only seems to alternate between two...
  10. R

    Legacy GM [QUESTION] Dynamic Objects via JSON

    Hey all! I'm making a survival/crafting game, and I want to be able to define objects/items (as well as crafting recipes) and their parameters via json files rather than tediously creating one after the other, adding a create event, and setting the variables directly in GameMaker. Of course...
  11. samspade

    GMS 2.3+ JSON with Structs in 2.3.1

    Now that we can load json data as structs and arrays, I have a question. I can take the following data and load it in: { "Some Data" : "Hello World", "Some More Data" : "Goodbye" } And that will give me a struct with two variables containing the strings hello world and goodbye...
  12. T

    SOLVED Saving system (JSON)

    Hello! I need some help with saving system. Now I am using JSON-system, it saves everithing in files. But saving in files is not good for saving when player, for example, change the room. I think the game can use some temporary memory during playing, and use file-saving only if player push...
  13. T

    Error: Unexpected token reading a json Object at line...

    I recovered my game file after like 10 months, and when I try to run the game, this compile error pops up cant I cant run my game
  14. FrostyCat

    Asset - Scripts JSON Struct: Use structs and arrays to work with JSON

    JSON Struct Bringing out the true potential of JSON parsing in GMS 2.3+ Overview This library allows encoding and decoding JSON as structs, arrays and other first-order data types as of GMS 2.3. In addition to standard encoding and decoding functions, it also contains utilities for encryption...
  15. Gigicom

    GMS 2 Use code in json file

    Hey, I‘m trying to figure out how to use pre-defined json files for some item data in my game. Before, I simply assigned all values to variables and assigned those to a ds_map like this: constantData = item.apple; name = „Apple“; graphic = spr_ItemApple; list = ds_list_create(); listVal =...
  16. samspade

    GMS 2.3+ JSON and GameMaker Studio 2

    GM Version: 2.3.1 Target Platform: All Download: Github Repo Links: YouTube Playlist Summary: A GML tutorial series on what JSON is, how to import, and export JSON files, and building a very simple Choose Your Own Adventure style game for practice. While done entirely in 2.3, and updated for...
  17. flyinian

    What are your ways to organize data for saving?

    I am looking for ways to organize data to save. I have a save/load system using JSON files and it appears to work nicely. Now, I am looking for ideas to organize data. I have several "controller" objects that controls parts of my game and done this way for organizational means. Could I place...
  18. flyinian

    SOLVED JSON save/load system questions

    Questions before I create a JSON saving and Loading system. I plan on following Shaun Spalding JSON save/Load system with that, 1. What would I have to do to save/load ds_grids? What about global variables? 2. Would it be easier/better if I were to change my global variables into a ds_grid...
  19. If Programable_Matter

    Loading JSON info Error

    I keep getting this Error even though the program successfuly uploaded the JSON key :values Apparently the code works and the values show up in my program but like 2 seconds later I get this error. I'm pretty sure I'm missing some code Create Event http_get("http://webpage.json")...
  20. Adry

    SOLVED Really no way to add to JSON save file??

    Hello! I'm just starting out with saving, and decided to go with the JSON method as the title indicates. I have successfully saved menu items like "username" and some other menu preferences. I just began my exploration of saving room and character position.. However, when I did so I was also...
Top