Map Mod JSON Format: Difference between revisions

From SkyCorp Global
Jump to navigation Jump to search
(Created page with "Map JSON supports a variety of parameters to create custom areas. == Fixed fields == A "type" of "MAP" should be used when creating a map mod. A "mapID" parameter should a...")
 
No edit summary
Line 18: Line 18:
|bool
|bool
|'''respawn'''
|'''respawn'''
If set, this will be called to respawn the player after they are defeated.  Custom logic would allow you to respawn the player  
If set, this will be called to respawn the player after they are defeated.  Custom logic would allow you to respawn the player in a specific location. 
 
Return false to indicate default respawn logic should apply.  Alternatively, respawn the player yourself and return true.
|}
|}

Revision as of 22:42, 5 March 2018

Map JSON supports a variety of parameters to create custom areas.

Fixed fields

A "type" of "MAP" should be used when creating a map mod.

A "mapID" parameter should also be used to refer to this map. Be careful not to use the same id as another mod -- if you use the same mod name as your mod wiki page, you can be assured of no conflicts.

A "startingRoomID" number can be optionally provided. If provided, a teleporter object will be created when the map is loaded, allowing the player to teleport to that map. If not provided, you will need to create your own teleporter object, or link the map from a different map (otherwise the player will never be able to enter your map).

A "map" parameter is the base64 representation of the trizbort map file.

Dynamic fields

JSON definitions can specify each as programmable (LUA) or literal values.

Return Type Parameter
bool respawn

If set, this will be called to respawn the player after they are defeated. Custom logic would allow you to respawn the player in a specific location.

Return false to indicate default respawn logic should apply. Alternatively, respawn the player yourself and return true.