Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // REQUIRED
- "id": "HOME_TOWN_CUT_SCENE",
- // REQUIRED
- // The tiled data for this map.
- "mapFilename": "data/maps/tiled/CutSceneTown.tmx",
- // In special cases (like cut-scene's) you may not want the player sprite on the map at all.
- // If this is the case for this map configuration, then set this value to true.
- "hidePlayerSprite": true,
- // When a loading screen (non-combat) is requested, if you provide a list here, a background will be randomly chosen.
- // If you do not provide a custom list for this map, the adventure list will be used instead.
- "loadScreenBackgrounds": [
- "data/screens/gate.png"
- ],
- // REQUIRED
- // Provide the list of backgrounds to use in the combat screen.
- // If more than one is provided, then a random choice will be made.
- "combatBackgrounds": {
- // The small device screen background list.
- "small": [
- //"data/maps/tiled/MountainBattle_Small.tmx",
- "data/maps/tiled/BattlefieldSmall.tmx"
- ],
- // The medium/large device screen background list.
- "large": [
- //"data/maps/tiled/MountainBattle.tmx",
- "data/maps/tiled/Battlefield.tmx"
- ]
- },
- //
- // Internationalization and Localization
- //
- // We provide this through a specialty field called a "LocaleValue" within the configurations.
- //
- // A LocaleValue only loads the value below during GSON loading. Not all values are loaded.
- //
- // We do this here instead of using a GDX bundle because of the lazy loading.
- //
- // The bundles force you to load all the information in the bundle at once, while we're trying to avoid doing that
- // with having lazy loaded configuration data. So, we place our localization information within the configurations directly.
- //
- // It searches the locale in the following order and the first one to match is the one used. If none, it returns NULL.
- // The locale key used follows the exact same pattern as that of java.util.Locale.
- //
- // en_CA_VAR1
- // en_CA
- // en
- // default
- //
- // A typical JSON field using this would look like this:
- //
- // "name": {
- // // This value will be used when nothing else is available.
- // "default": "",
- // // The list of available locale's for this value.
- // "locales": {
- // "en": "",
- // "en_CA": ""
- // }
- // },
- //
- "name": {
- // This value will be used when nothing else is available.
- "default": "Home Town",
- // The list of available values defined by locale.
- // The locale key used follows the exact same pattern as that of java.util.Locale.
- "locales": {
- "xx": {
- "value": "Home Town (XX)"
- },
- "yy": {
- "value": "Home Town (YY)"
- },
- "en_CA2": {
- "value": "Home Town (EN_CA)"
- },
- "en2": {
- "value": "Home Town (EN)"
- },
- "zz": {
- "value": "Home Town (ZZ)"
- }
- }
- },
- // The map lighting allows us to create an ambient lighting over the map, then place light objects onto the map.
- "mapLighting": {
- // The shader's to use for the map lighting.
- "vertexShader": "data/maps/lighting/shaders/vertexShader.glsl",
- "lightingPixelShader": "data/maps/lighting/shaders/lightingPixelShader.glsl",
- // If providing lights, then you need to provide this shader.
- "defaultPixelShader": "data/maps/lighting/shaders/defaultPixelShader.glsl",
- // If you do not provide player or map lights, then the ambientOnly shader will is required to produce the ambient.
- "ambientPixelShader": "data/maps/lighting/shaders/ambientPixelShader.glsl",
- // What color should be used to create the ambient "fusion" with the map.
- // If not provided, the "night-time" color will be applied.
- "ambientColor": {
- "r": 0.3,
- "g": 0.3,
- "b": 0.7,
- "intensity": 0.8
- },
- // OPTIONAL
- // Place specific light points on the map using Tiled objects (like other map points)
- "lightPoints": [
- {
- "active": false,
- "mapPointId": "FIRE_PIT_LIGHT",
- "mapObjectId": "BILL_END_POINT",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": false,
- "mapPointId": "TREE_FIRE_LIGHT",
- "mapObjectId": "FIRE_MAP_POINT",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 5,
- "coverage": 30
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_1",
- "mapObjectId": "TORCH_1",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_2",
- "mapObjectId": "TORCH_2",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_3",
- "mapObjectId": "TORCH_3",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_4",
- "mapObjectId": "TORCH_4",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_5",
- "mapObjectId": "TORCH_5",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- },
- {
- "active": true,
- "mapPointId": "TORCH_6",
- "mapObjectId": "TORCH_6",
- // MapLight
- "mapLight": {
- "light": "circle_glow_light",
- "flicker": 15,
- "coverage": 10
- }
- }
- ]
- },
- // These are used to display effect animations on the screen at the provided point.
- "animationPoints": [
- {
- // ID of this animation point
- "mapPointId": "ANIMATION_POINT",
- // ID of the map object used to place this animation on the map.
- "mapObjectId": "FIRE_MAP_POINT"
- }
- ],
- //
- // List of path's used by the camera for scene movement.
- //
- // SETUP:
- // Use these objects on the tiled map to indicate their location then use the "Type" field for the mapObjectId.
- //
- // - Polyline can only be used for path referencing. The camera will stop on the last point of the polyline.
- // - Polygon can only be used for path referencing. The camera will path back to the first point of the polygon.
- // - Use these for the "followCameraPath" event action "coordinatePathId" references.
- //
- // You will need to use comments to indicate which one's are polygon's vs polyline's as to avoid using them incorrectly.
- //
- "cameraPaths": [
- // This is a polygon and should only be used for coordinate path references.
- // See "coordinatePathId" in "followCameraPath" event action configurations.
- {
- "mapPathId": "TOWN_NPC_COORD_PATH",
- "mapObjectId": "INTRO_CAMERA_PATH"
- }
- ],
- //
- // List of points used by character sprite's for location/movement.
- //
- // SETUP:
- // Use these objects on the tiled map to indicate their location then use the "Type" field for the mapObjectId.
- //
- // - Rectangle are used for single map points. (start/end/static)
- // - The sprite is then centered within the rectangle.
- // - Use these for the player/NPC "landingSquareId" references.
- //
- "spritePoints": [
- {
- "mapPointId": "NPC_SAM_START_POINT",
- "mapObjectId": "SAM_START_POINT"
- },
- {
- "mapPointId": "NPC_SAM_END_POINT",
- "mapObjectId": "SAM_END_POINT"
- },
- {
- "mapPointId": "NPC_BILL_START_POINT",
- "mapObjectId": "BILL_START_POINT"
- },
- {
- "mapPointId": "NPC_BILL_END_POINT",
- "mapObjectId": "BILL_END_POINT"
- },
- {
- "mapPointId": "NPC_SAM_FIRE_PIT_POINT",
- "mapObjectId": "SAM_FIRE_PIT_POINT"
- }
- ],
- // This is a list of all the NPC's available in the map. Each one can be configured to do multiple jobs if wanted.
- "mapNpcs": [
- {
- "id": "NPC_SAM",
- "displayName": {
- "default": "Sam"
- },
- // The atlas file to load for the sprite graphics.
- // NPC atlas files are different because they are not scaled for screen sizes and are constant.
- // Thus we do not provide a key for the sizes like we do for those and instead just load the one atlas for all sizes.
- "spriteAtlas": "spriter/npc/four_directional/directional.atlas",
- // The file path to the SCML data.
- "spriteScml": "spriter/npc/four_directional/directional.json",
- // The name of the entity to load from the SCML.
- "spriteEntityName": "Knight",
- // If you want to have certain character maps applied upon creation, assign them now.
- // Character map names used should be obtained from the animator character map types.
- // For example: com.netprogs.mobile.games.rpg.sprites.creatures.animators.NpcSpriteAnimator.CharacterMap
- "spriteCharacterMaps": [ "mage" ],
- // This is the sprite animator you wish to use to build the animations from the atlas above.
- // We leave these as a "loose" connection between core and the game itself because we want to allow us to be
- // able to create as many various animators we want without having to update the core code to do so.
- "spriteAnimator": "npc",
- // Overrides inherited if provided.
- // Atlas that contains all the require icons for this creature.
- "iconAtlas": "spriter/npc/four_directional/npc_wizard_icons.atlas",
- // Adds to the list of inherited if provided.
- // This is a "loose" connection between the atlas and the code allowing us to define icon textures within it.
- // Each unique key/value in the list is combined with the parent. If same keys are used, these override parent.
- "icons": {
- "general": {
- // 32x32
- "small": "general_small",
- // 64x64
- "large": "general_large"
- }
- },
- // [OPTIONAL] This is the list of available paths for the NPC to take.
- "paths": {
- "ENTER_TO_TREE": {
- "startPointId": "NPC_SAM_START_POINT",
- "endPointId": "NPC_SAM_END_POINT",
- "faceDirection": "left",
- "cameraCentered": true,
- "decisionWhenCompleted": false
- },
- "TREE_TO_EXIT": {
- "startPointId": "NPC_SAM_END_POINT",
- "endPointId": "NPC_SAM_START_POINT",
- "faceDirection": "right",
- "removeWhenCompleted": true,
- "cameraCentered": false,
- "forcePlayerWait": false
- },
- "STEP_TO_FIRE_PIT": {
- // We don't provide a start point because we want Sam to start where he left off.
- "endPointId": "NPC_SAM_FIRE_PIT_POINT",
- "faceDirection": "left",
- "removeWhenCompleted": false,
- "cameraCentered": false,
- "forcePlayerWait": false
- }
- },
- // The decision tree for the NPC.
- //
- // The decision tree here allows us to check character abilities (through combat), allies (through combat)
- // current conversation responses and events all in one place.
- //
- // You can use "import" or "tree" to provide the decision tree to use for this case.
- // "tree" is checked first, if not available, then "import" is used. If both are missing, nothing is used.
- //
- // The decision tree allows you to define the logic as to which script should be activated and when.
- "decisionTree": {
- // This is checked first, if not provided, the "usingTree" is checked.
- // Import a pre-configured tree here by ID.
- //"treeId": "TREE_ID",
- // Checked when "treeId" isn't available.
- "usingTree": {
- "root": {
- // Execute each child until one of them succeeds, or they all fail.
- "priority": {
- "id": "PRIORITY_NPC_SAM_CONVERSATION",
- "children": {
- // Initial conversation entry.
- "count-limit": {
- "id": "SAM_INITIAL_CONVERSATION_COUNT",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "SAM_INITIAL_CONVERSATION_TASK_NODE",
- "using": {
- "id": "FOUND_LAKE_TASK",
- "action": {
- "conversationAction": {
- // The title does not need to change each time.
- // If not provided, the previous conversation step will be used.
- "title": {
- "default": "{Angry face}...."
- },
- // We only need to assign a new face when we want it changed.
- // Otherwise, it will use the previous conversation response face.
- "face": {
- "id": "NPC_SAM",
- "icon": "general",
- "position": "right"
- },
- // This is used to determine how you'd like to have the text displayed.
- // progressive - text is displayed showing only a partial amount and increasing over time until completed.
- // instant - shows the entire text all at once.
- "displayStyle": "progressive",
- "responseText": {
- "default": "Bill ! You're late again.\nHow do you ever expect to become a decent apprentice ?"
- },
- "autoResponse": {
- // How long to wait until moving onto the response.
- "waitDuration": 5,
- // The response to move onto.
- "responseId": "NPC_SAM_HELLO_FINISHED"
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "conversation": {
- // Normally to match for a conversation you will want to look for the previous response ID.
- // However, in the cases when this is the initial conversation, that ID is not available.
- // This flag allows you to indicate to the match that we're looking for the case when the ID was not provided.
- "initial": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- "task": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK_NODE",
- "using": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK",
- "action": {
- "conversationAction": {
- "title": {
- "default": "Bill:"
- },
- "face": {
- "id": "NPC_BILL",
- "icon": "general",
- "position": "left"
- },
- "displayStyle": "progressive",
- "responseText": {
- "default": "But..but...I'm here now; that counts...right ?"
- },
- "autoResponse": {
- "waitDuration": 4,
- "responseId": "NPC_BILL_FIRST_RESPONSE_FINISHED"
- }
- }
- },
- "triggers": {
- "simple": {
- "conversation": {
- "responseId": "NPC_SAM_HELLO_FINISHED"
- }
- }
- }
- }
- },
- "task": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK_NODE",
- "using": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK",
- "action": {
- "conversationAction": {
- "title": {
- "default": "Sam:"
- },
- "face": {
- "id": "NPC_SAM",
- "icon": "general",
- "position": "right"
- },
- "displayStyle": "progressive",
- "responseText": {
- "default": "Bill...Bill...Bill...what will I ever do with you.\nAt least you've started the fire pit without screwing that up."
- },
- "autoResponse": {
- "waitDuration": 7,
- "responseId": "NARRATOR_FIRST"
- }
- }
- },
- "triggers": {
- "simple": {
- "conversation": {
- "responseId": "NPC_BILL_FIRST_RESPONSE_FINISHED"
- }
- }
- }
- }
- },
- "task": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK_NODE",
- "using": {
- "id": "NPC_BILL_FIRST_RESPONSE_TASK",
- "action": {
- "conversationAction": {
- "title": {
- "default": "Narrator:"
- },
- "face": {
- "position": "none"
- },
- "displayStyle": "instant",
- "responseText": {
- "default": "...{All of a sudden}..."
- },
- "autoResponse": {
- "waitDuration": 2,
- "responseId": "CONVERSATION_CLOSE"
- }
- }
- },
- "triggers": {
- "simple": {
- "conversation": {
- "responseId": "NARRATOR_FIRST"
- }
- }
- }
- }
- },
- // The final task in the conversation.
- "task": {
- "id": "CONVERSATION_CLOSE_TASK_NODE",
- "using": {
- "id": "CONVERSATION_CLOSE_TASK",
- "action": {
- // Close out the conversation window.
- "conversationAction": {
- "conversationCompleted": true
- },
- // Setup event actions for continued cut-scene display from the main tree.
- "eventActions": {
- // Set a trigger so that the map decision tree can do additional work.
- "trigger": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "TREE_CATCHES_FIRE"
- }
- }
- },
- "triggers": {
- "simple": {
- "conversation": {
- "responseId": "CONVERSATION_CLOSE"
- }
- }
- }
- }
- } // end
- }
- }
- }
- }
- }
- },
- {
- "id": "NPC_BILL",
- "displayName": {
- "default": "Bill"
- },
- // The atlas file to load for the sprite graphics.
- // NPC atlas files are different from playable/monsters because they are not scaled for screen sizes and are constant.
- // Thus we do not provide a key for the sizes like we do for those and instead just load the one atlas for all sizes.
- "spriteAtlas": "spriter/npc/four_directional/directional.atlas",
- // The file path to the SCML data.
- "spriteScml": "spriter/npc/four_directional/directional.json",
- // The name of the entity to load from the SCML.
- "spriteEntityName": "Knight",
- // If you want to have certain character maps applied upon creation, assign them now.
- // Character map names used should be obtained from the animator character map types.
- // For example: com.netprogs.mobile.games.rpg.sprites.creatures.animators.NpcSpriteAnimator.CharacterMap (or customs like it)
- "spriteCharacterMaps": [ "archer" ],
- // This is the sprite animator you wish to use to build the animations from the atlas above.
- // We leave these as a "loose" connection between core and the game itself because we want to allow us to be
- // able to create as many various animators we want without having to update the core code to do so.
- "spriteAnimator": "npc",
- // Overrides inherited if provided.
- // Atlas that contains all the require icons for this creature.
- // These can be generated any way wanted, but you must follow the naming patterns defined to ensure matching animations.
- "iconAtlas": "spriter/npc/four_directional/npc_archer_icons.atlas",
- // Adds to the list of inherited if provided.
- // This is a "loose" connection between the atlas and the code allowing us to define icon textures within it.
- // Each unique key/value in the list is combined with the parent. If same keys are used, these override parent.
- "icons": {
- "general": {
- // 32x32
- "small": "general_small",
- // 64x64
- "large": "general_large"
- }
- },
- // [OPTIONAL] This is the list of available paths for the NPC to take.
- "paths": {
- "ENTER_TO_TREE": {
- "startPointId": "NPC_BILL_START_POINT",
- "endPointId": "NPC_BILL_END_POINT",
- "faceDirection": "right",
- "cameraCentered": true,
- "decisionWhenCompleted": false
- },
- "TREE_TO_EXIT": {
- "startPointId": "NPC_BILL_END_POINT",
- "endPointId": "NPC_BILL_START_POINT",
- "faceDirection": "left",
- "removeWhenCompleted": true,
- "cameraCentered": false,
- "forcePlayerWait": false
- }
- },
- // [OPTIONAL] This is the list of available paths for the NPC to take.
- "animations": {
- // Make bill fiddle on the ground (start fire pit)
- "FIDDLE": {
- "animation": "action",
- "alternateAnimation": "horizontal_fiddle",
- "animationSound": {
- "sound": "data/music/effects/spells/explode5_new.ogg",
- "looping": false,
- "delay": 1000
- },
- "runningFaceDirection": "right"
- }
- }
- }
- ],
- // This decision tree is called upon every render call regardless of movement.
- "decisionTree": {
- // Checked when "treeId" isn't available.
- "usingTree": {
- "root": {
- // Execute each child until one of the succeeds, or they all fail.
- "priority": {
- "id": "PRIORITY_NODE_EVENT_TOWN_CUT_SCENE",
- "children": {
- // Initial scene load should cause the camera to scan across the map.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_STORYLINE_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_STORYLINE_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_STORYLINE_TASK",
- "action": {
- "eventActions": {
- // This allows us to make some minor changes to the player sprite itself.
- // If you wish to have advanced features, set visible here to false and create a
- // separate NPC variation of the player instead for the advanced features.
- "updatePlayerSprite": {
- // Should the player sprite be visible on the screen
- // This overrides the map setting if it was provided.
- "visible": false,
- // Blocks player from movement on the map.
- "forcePlayerWait": true,
- // Check to see if the navigation console should be displayed or not.
- // This does not block user input, only hides the console.
- // To block the user input (also or instead) you can do so by setting the visible field to false.
- "hideNavigationConsole": true
- // If you want to have certain character maps applied, assign them now.
- // Character map names used should be obtained from the animator character map types.
- // SEE: com.netprogs.mobile.games.rpg.sprites.creatures.animators.DirectionalSpriteAnimator.CharacterMap (or customs like it)
- //"characterMaps": {
- // "apply": [ "archer" ]
- // "remove": [ "mage" ]
- //},
- },
- // Story override
- //"trigger": {
- // "eventId": "TOWN_CUT_SCENE",
- // "triggerId": "STORY_COMPLETED"
- //},
- // Display the story line window with a brief story.
- "activateStoryline": {
- "storylineId": "HOME_TOWN_CUT_SCENE_STORYLINE",
- // The list of triggers to invoke once the story is completed.
- "completedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "STORY_COMPLETED"
- }
- ]
- }
- }
- },
- // The cut scene task should only execute when the INITIAL_CAMERA_COMPLETED is false.
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "STORY_COMPLETED",
- "triggered": false
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Initial scene load should cause the camera to scan across the map.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_CAMERA_PATH_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_CAMERA_PATH_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_CAMERA_PATH_TASK",
- "action": {
- "eventActions": {
- // Camera override
- //"trigger": {
- // "eventId": "TOWN_CUT_SCENE",
- // "triggerId": "INITIAL_CAMERA_COMPLETED"
- //},
- // Causes the camera to follow the path provided on the current map.
- // NOTE: This blocks the player movement during this time and is removed upon completion.
- // NOTE: Be careful not to have any player/NPC camera follows at the same time.
- "followCameraPath": {
- // Provide a polyline or polygon path ID from the current map that defines an exact path to follow.
- "coordinatePathId": "TOWN_NPC_COORD_PATH",
- // The speed, in percent of "normal", that the camera should be moved at.
- "speed": 1,
- // The list of triggers to invoke once the camera path is completed.
- "completedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "INITIAL_CAMERA_COMPLETED"
- }
- ]
- }
- }
- },
- // The cut scene task should only execute when the INITIAL_CAMERA_COMPLETED is false.
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "INITIAL_CAMERA_COMPLETED",
- "triggered": false
- },
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "STORY_COMPLETED",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Once the camera is done the path, load in the first NPC (Sam)
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_LOAD_SAM_NPC_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_LOAD_SAM_NPC_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_LOAD_SAM_NPC_TASK",
- "action": {
- "eventActions": {
- "updateNpcSprite": {
- "npcId": "NPC_SAM",
- "npcPathId": "ENTER_TO_TREE",
- "npcPathCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_LOADED"
- }
- ]
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "INITIAL_CAMERA_COMPLETED",
- "triggered": true
- },
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_LOADED",
- "triggered": false
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Make Sam curse because Bill isn't here yet.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_SAM_CURSE_NPC_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_SAM_CURSE_NPC_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_SAM_CURSE_NPC_TASK",
- "action": {
- "eventActions": {
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_SAM",
- // The list of triggers to invoke once the caption display has completed.
- "completedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_CURSED"
- }
- ],
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "#$@#, He's late !!!"
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "INITIAL_CAMERA_COMPLETED",
- "triggered": true
- },
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_LOADED",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Once the camera is done the path, load in the second NPC (Bill), but only after the first.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_LOAD_BILL_NPC_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_LOAD_BILL_NPC_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_LOAD_BILL_NPC_TASK",
- "action": {
- "eventActions": {
- "updateNpcSprite": {
- "npcId": "NPC_BILL",
- "npcPathId": "ENTER_TO_TREE",
- "npcPathCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_LOADED"
- }
- ]
- },
- // Displays the caption while he's running.
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_BILL",
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "Wait ! I'm on my way !"
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_CURSED",
- "triggered": true
- },
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_LOADED",
- "triggered": false
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Now that Bill has loaded and run over to the tree, get him to start the fire pit.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_BILL_START_FIRE_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_BILL_START_FIRE_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_BILL_START_FIRE_TASK",
- "action": {
- "eventActions": {
- "updateNpcSprite": {
- "npcId": "NPC_BILL",
- // If you wish the NPC to run an animation, set the ID of that animation here.
- "npcAnimationId": "FIDDLE",
- // The list of triggers to invoke once the animation is completed.
- // NOTE: This does not get activated if using a looping animation.
- "npcAnimationCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_STARTED_FIRE"
- }
- ]
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_LOADED",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Now that Bill has loaded and run over to the tree, get him to start the fire pit.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK",
- "action": {
- "eventActions": {
- // Show the fire pit layer.
- "activateMapLayer": {
- "mapLayerId": "Foreground_FirePit",
- "visible": true,
- "opacity": 1.00
- },
- // Show the light source for the fire pit.
- "activateLightPoint": {
- "mapPointId": "FIRE_PIT_LIGHT",
- "active": true
- },
- // Move Sam forward.
- "updateNpcSprite": {
- "npcId": "NPC_SAM",
- "npcPathId": "STEP_TO_FIRE_PIT",
- "npcPathCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_STEPPED_TO_FIREPIT"
- }
- ]
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_STARTED_FIRE",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Now that Sam has run over to the pit, make him start a conversation with Bill.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_BILL_FIRE_STARTED_TASK",
- "action": {
- "eventActions": {
- // Start Sam's conversation by running his tree.
- // You do not want to have conversations in the main decision tree because it gets called too often.
- // By placing conversations into the NPC tree, we allow it to be called only upon each conversation step.
- "updateNpcSprite": {
- "npcId": "NPC_SAM",
- "executeDecision": true
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_STARTED_FIRE",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Picking up where the conversation ended. The tree should now catch on fire !
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_TREE_CATCHES_FIRE_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_TREE_CATCHES_FIRE_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_TREE_CATCHES_FIRE_TASK",
- "action": {
- "eventActions": {
- // This displays an effect animation on the screen in the map point location provided.
- "displayEffectAnimation": {
- // The "mapPointId" from "animationPoints" to place the effect within the current map.
- "animationPointId": "ANIMATION_POINT",
- // The ID of the sprite effect to animate
- // See com.netprogs.mobile.games.rpg.sprites.effects.EffectSpriteType for the list of available effect sprite's.
- "effect": "fire-wall",
- // This is which layer on the map you wish to have the animation placed.
- // behind: For animations that the player should "stand in front of" (the objects are in BEHIND them).
- // front: For animations that the player should "stand behind" (the objects are in FRONT of them).
- "placement": "behind",
- // Set the play mode of the animation.
- // See com.netprogs.mobile.games.rpg.sprites.effects.EffectSpritePlayMode
- "playMode": "loop",
- // OPTIONAL
- // This is the sound to play while the effect sprite is having the animation shown.
- "sound": {
- // Path to the sound file to play. This file CANNOT be more than 1MB large due to Android restrictions.
- // Libgdx supports MP3, OGG and WAV files. RoboVM (iOS) currently does not support OGG files.
- "sound": "data/music/effects/spells/explode1_new.ogg",
- // If you want the sound to loop, set to true.
- "looping": false,
- // OPTIONAL
- // Normally the sound will be played immediately along with the animation.
- // Should you want to delay the sound for a period of time first, add that time here in milliseconds.
- "delay": 100
- }
- // The list of triggers to invoke once the animation is completed.
- // This only gets called on non-looping sounds.
- //"completedTriggers": [
- // {
- // "eventId": "LEAVE_TOWN_EVENT",
- // "triggerId": "SPAWNED_TOWN_NPC"
- // }
- //]
- },
- // Turn on the layer showing additional fire damage.
- "activateMapLayer": {
- "mapLayerId": "Foreground_Fire",
- "visible": true,
- "opacity": 1.00
- },
- // Activate the light for the fire.
- "activateLightPoint": {
- "mapPointId": "TREE_FIRE_LIGHT",
- "active": true
- },
- // Make Bill face looking up.
- "updateNpcSprite": {
- "npcId": "NPC_BILL",
- "faceDirection": "up"
- },
- // Displays the caption while he's running.
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_BILL",
- // The list of triggers to invoke once the caption display has completed.
- "completedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPCS_RUN_AWAY"
- }
- ],
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "!!!???!!!"
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- },
- // Make Sam face looking up.
- "updateNpcSprite": {
- "npcId": "NPC_SAM",
- "faceDirection": "up"
- },
- // Displays the caption while he's running.
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_SAM",
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "!!!???!!!"
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "TREE_CATCHES_FIRE",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // Now that the tree is on fire, make the NPC's run away from it.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_RUN_AWAY_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_TASK",
- "action": {
- "eventActions": {
- /*
- // Play the continual fire sound.
- "playSound": {
- // Path to the sound file to play. This file CANNOT be more than 1MB large due to Android restrictions.
- // Libgdx supports MP3, OGG and WAV files. RoboVM (iOS) currently does not support OGG files.
- "sound": "data/music/effects/spells/explode5_new.ogg",
- // If you want the sound to loop, set to true.
- "looping": true
- },
- */
- // Make Bill run away screaming !
- "updateNpcSprite": {
- "npcId": "NPC_BILL",
- "npcPathId": "TREE_TO_EXIT",
- "npcPathCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_FINISHED_RUNNING"
- }
- ]
- },
- // Displays the caption while he's running.
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_BILL",
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "Run for your life !"
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- },
- // Make Sam run away screaming !
- "updateNpcSprite": {
- "npcId": "NPC_SAM",
- "npcPathId": "TREE_TO_EXIT",
- "npcPathCompletedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_FINISHED_RUNNING"
- }
- ]
- },
- // Displays the caption while he's running.
- "activateCaption": {
- // This is the ID of the sprite you wish to place the caption above.
- // If the ID is not provided, then the player sprite is used.
- // If the ID is provided, but if the sprite does not exist in the current map,
- // then this caption is not displayed.
- "id": "NPC_SAM",
- // This is the configuration elements for the caption itself.
- "caption": {
- // The text to display. Try to keep it short & simple as it does not wrap.
- "text": {
- "default": "#$@#!! apprentice..."
- },
- // OPTIONAL
- // The caption style (bubble type).
- // TODO: For now there is only one, but we'll add more later.
- //"captionStyle": true,
- // OPTIONAL
- // This can be any style available to the Label.
- "textStyle": "caption",
- // OPTIONAL
- // The amount of time to delay before showing the text.
- "delayDisplayDuration": 0f,
- // OPTIONAL
- // The amount of time to delay before starting the fade effect on the text.
- "delayFadeDuration": 2.0,
- // OPTIONAL
- // The amount of time to decrease the fade by each increment.
- // The higher the number, the longer it takes to fade.
- "fadeDuration": 0.75
- }
- }
- // Cause a delay, then set the trigger for fading the screen and finishing up.
- //"trigger": {
- // "eventId": "TOWN_CUT_SCENE",
- // "triggerId": "NPCS_FINISHED_RUNNING",
- // "delay": 2000
- //}
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPCS_RUN_AWAY",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // The NPC's have run away from the fire, so fade out the screen.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK",
- "action": {
- "eventActions": {
- //"trigger": {
- // "eventId": "TOWN_CUT_SCENE",
- // "triggerId": "MAP_FADE_COMPLETE"
- //}
- // Fade the current adventure map.
- "fadeAdventureMap": {
- // The rate in which you wish the fade to happen.
- "rate": 0.3,
- // The list of triggers to invoke once the fade is completed.
- "completedTriggers": [
- {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "MAP_FADE_COMPLETE"
- }
- ]
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- // We want to ensure that both NPC's completed their path's before fading.
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_SAM_FINISHED_RUNNING",
- "triggered": true
- },
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "NPC_BILL_FINISHED_RUNNING",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- },
- // The NPC's have run away from the fire, so fade out the screen.
- "count-limit": {
- "id": "COUNT_CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK_NODE",
- "limit": 1,
- "incrementPolicy": "success",
- "allowReinitialize": false,
- "children": {
- "task": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK_NODE",
- "using": {
- "id": "CUT_SCENE_EVENT_RUN_AWAY_COMPLETED_TASK",
- "action": {
- "eventActions": {
- // Stop the continual fire sound.
- "playSound": {
- // Path to the sound file to play. This file CANNOT be more than 1MB large due to Android restrictions.
- // Libgdx supports MP3, OGG and WAV files. RoboVM (iOS) currently does not support OGG files.
- "sound": "data/music/effects/spells/explode5_new.ogg",
- // If you want to stop all instances of this particular sound, set this to true.
- "stop": true
- },
- // Load the town map, but the one the player can use.
- "loadAdventureMap": {
- // The ID of the map to load.
- "adventureMapId": "HOME_TOWN",
- // The entry point within the new map for the player to start.
- "entryPointId": "EAST_PATH_ENTRANCE"
- }
- }
- },
- "triggers": {
- "logical": {
- "matches": [
- {
- "matchExpressions": {
- "event": {
- "eventId": "TOWN_CUT_SCENE",
- "triggerId": "MAP_FADE_COMPLETE",
- "triggered": true
- }
- }
- }
- ]
- }
- }
- }
- }
- }
- } // end
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement