Scene files contain information about one or many scenes, and have a deep hierarchy. At the top level, a scene file has the following keys:

  • _myCurrentFilename: This key is used to internally track which file is loaded in the engine.
  • nameOfScene: All other top-level keys are the names of Scenes stored in this file.

Within each Scene key, there are the following keys:

  • Entries: The number of Moments in this scene
  • endAction: The name of the scene to continue on to after this one (unless redirected by choices)
  • “#”: One or more numbers corresponding to the Moments in a scene. These numbers are strings.

Each numbered Moment in a Scene key all of the major categories of information for the Engine are stored. These include:

  • sound: Sound to play during this moment.
  • background: A list of maps containing data on what to show as a background picture.
  • timer: Amount of time to display the moment before moving to the next moment.
  • textbox: The data for all textboxes in this specific moment.
  • characters: The ID numbers for which characters characters to show, and their moment-specific data.
  • choices: The data for all choices presenting in this specific moment.

General format:

{
	"_myCurrentFilename": "slidge.txt",
	"sceneName": {
		"Entries": "0",
		"endAction": "sceneName2",
		"0": {
			"sound": "",
			"background": [{
					"x": 0,
					"y": 0,
					"image": "spriteName",
					"alpha": 1,
			}],
			"skipChoice": "0",
			"timer": "-1",
			"textboxes": [{
					"typed": "1",
					"label": "[r:markedName]",
					"animate": 1.000000,
					"text": "Sample text 0",
					"avi": "",
					"x": "427",
					"style": "",
					"y": "678"
				}, {
					"typed": "1",
					"label": "[r:markedName]",
					"animate": 1.000000,
					"text": "Sample text 1",
					"avi": "",
					"x": "835",
					"style": "",
					"y": "455"
				}
			],
			"choices": [{
					"pin": 1.000000,
					"link": "",
					"ripple": "0",
					"normal": {
						"label": "",
						"avi": "",
						"style": "Default"
					},
					"command": "",
					"hover": {
						"label": "",
						"avi": "",
						"style": "Default"
					},
					"text": "Choice Text 0",
					"sprite": "",
					"x": "512",
					"condition": "",
					"y": "384"
				}, {
					"pin": 1.000000,
					"link": "",
					"ripple": "0",
					"normal": {
						"label": "",
						"avi": "",
						"style": "Default"
					},
					"command": "",
					"hover": {
						"label": "",
						"avi": "",
						"style": "Default"
					},
					"text": "Choice Text 1",
					"sprite": "",
					"x": "512",
					"condition": "",
					"y": "443.40"
				}
			],
			"characters": [{
					"moveSpd": "-1",
					"flipped": "0",
					"fadeSpd": "-1",
					"marked": "0",
					"scale": "1",
					"x": 256.000000,
					"rotSpd": "-1",
					"darkened": "0",
					"ID": "0",
					"y": 506.880000,
					"expression": ""
				}, {
					"moveSpd": "-1",
					"flipped": "1",
					"fadeSpd": "-1",
					"marked": "0",
					"scale": "0.35",
					"x": "830",
					"rotSpd": "-1",
					"darkened": "0",
					"ID": "1",
					"y": "529.88",
					"expression": "Default"
				}
			]
		}
	}
}
  • json/scenes.txt
  • Last modified: 2019/04/23 03:03
  • by journeyman