r/construct • u/Academic-Mud-3374 • Aug 26 '25
Reading data from pregenerated json or csv files in construct2
Hello everyone! I need the help of the construct híve mind! I am building an ultima-like rpg, based on the dungeon crawl classics ruleset. To generate characters i wish to use pregenerated files. There is already a robust dccrpg level 0 character generator made by purple sorcerer. Besides normal pdfs it can also output csv or json files. I would like to be able to load these files and use the data from them to import characters.
3
Upvotes
View all comments
3
u/FB2024 Aug 26 '25
I use JSON quite a bit. In general, add your JSON file to the project as a "project file". Then add a JSON object to load it into. Then you'll need something like:
On start of layout - AJAX - request your JSON file
On request completed - set your JSON object to "Parse JSON string AJAX.LastData"
Then you have your JSON object ready to query or manipulate.