The Masterplan Custom Maps

From Nexus Mods Wiki
Jump to: navigation, search

Create a level in 7 steps!

  1. Copy template.tmx found in Steam's The Masterplan folder and rename it to mylevel.tmx.
  • (\Steam\steamapps\common\The Masterplan\src_assets\levels\template\template.tmx
  1. Download and install Tiled, the same map editor we use.
  1. With Tiled, open mylevel.tmx and create your amazing level. (See http://steamcommunity.com/groups/TheMasterplanWorkshopBeta/discussions/0/541907867785540275/ for help.)
  1. Once done with editing mylevel.tmx, still in Tiled, save all your changes. Then:
     
  2. Create a new folder under \The Masterplan\assets\custom_content\maps\ with the same name as your level, in this case, 
    \mylevel\
  3. in Tiled, choose File', and E'xport as'..., then choose .json from the Save as Type drop-down and save the file in the folder you just created (\The Masterplan\assets\custom_content\maps\mylevel\mylevel.json)
     
  4. Copy the The Masterplan\src_assets\levels\template\info.json file and paste it to \mylevel\ folder
     
  5. Modify the new info.json (with any text editor) and insert the correct loot amount and level name (e.g. "name": "mylevel",)
     
  6. Start The Masterplan and access your level from "custom content" in the main menu!
  • Tiled - the Map Editor

Installing Tiled Map Editor

Use version 0.11.0 

Later versions may be incompatible with The Masterplan levels

 

Windows

http://files.mapeditor.org/daily/tiled-2015-01-12-win32-setup.exe

OSX

http://tilemapkit.com/tiled/tiled-2015-01-12.dmg

 

Level source files can be found in the game install folder

src_assets/levels/

src_assets/levels/template/template.tmx - a template level that contains all basic functions

 

!! Please 'always 'use the template level included in the game as a base for your own level. You can open the template.tmx, then resave it in a new location with a new filename. !! 

 

Basic Tiled tips

  • Make sure you have the following windows visible: "Tilesets", "Layers" and "Properties". You can find the visibility setting for each in View -> Views and toolbars.
  • There are two types of layers, object and tile layers.("objects_low" = object layer, "ground2" tile layer)
  • Object layers contain items that can be rotated and placed freely.
  • Tile layers have items that snap to tiles and can be rotated in 90 degree increments.
  • You can copy and paste items from other levels.
  • "Z" rotate current brush/object - useful for making walls.
  • "X" flip current brush/object.

 

Advanced Tiled tips

General best practices for tiled:

https://github.com/bjorn/tiled/wiki

Keyboard shortcuts

https://github.com/bjorn/tiled/wiki/Keyboard-Shortcuts

!! Please 'always 'use the template level included in the game as a base for your own level. You can open the template.tmx, then resave it in a new location with a new filename. !! 

 

Template level

Use this level, found from Steam The Masterplan folder and preset with all the vital functions to create a simple level, to get started:

src_assets/levels/template.tmx 

 

Size

Tilesize 128x128px. If you make a new level, the tilesize must be set to 128x128.

 

Layers:

Each layer needs a "layer" property to be displayed in the correct order.

The layer is set in the "Custom Properties" panel. Click a layer in the layer panel, then click "+" to add a "layer" property, then set the number.

 

The layer numbers correspond as follows:

  • LAYER_BG = 0;   (behind everything, used for water tiles)
  • LAYER_FLOOR = 1;   (the floor tiles, papers, everything flat on the floor)
  • LAYER_FLOOR_OBJECTS = 2; (objects on floor like bottles, boxes)
  • LAYER_OBJECTS = 3;  (objects that are about chest high, tables, things on tables)
  • LAYER_OVERHEAD = 4;   (above characters, such as walls, lamps)

 

Pre-placed functions:

-Starting positions for goons (ghost figures with text "Goon slot A" etc.)

-Starting position for getaway van.

 

-Starting positions for called cops and cop car. These will be spawned after 60 seconds when someone calls the cops after witnessing crime.

 

-Spawn positions for reinforcements, which appear with a small delay if you kill the on-call cops.

 

-A standing guard. - will stay in the same spot, looking around

-A patrolling guard - will follow patrol markers starting from the nearest marker.

  • There are different colored sets of patrol markers. Each color is a single patrol route. You don't have to use all the numbers.

 

-Telephones - civilians will use the payphones, while guards will use private (red) or public phones.

 

-Off limits area - determines an area where you will be suspicious to guards. You can set the suspiciousness amount in the properties of the area object.

 

-A camera circuit system - see details below.

 

Circuits

-Each camera, camera switch and camera power box is assigned to a circuit to group them together.

For example, the two camera groups in "template.tmx" are defined as { circuit: "camerasA" } and { circuit: "camerasB" }, using a switch or breaking a circuit box in a circuit will shut off cameras in the same group.

 

Level Objectives

Each objective is added as a property on an object in the map. For example, an objective to steal a pile of money is setup simply by adding a custom property to it called "ObjectiveComponent" with data "{name:"levelNameObjective1"}"

Once each item with this objective is collected, the objective will be complete.

 

Tilesets, saving, music

'Add' more 'tilesets to 'use

In Tiled choose: Map -> Add External Tileset -> src_assets/levels/tilesetExport/TILESETNAME

This will add the tileset to your "tilesets" window

 

'Sav'e and activate your level

In Tiled choose: File -> Export as

Save in INSTALL_FOLDER/assets/custom_content/maps/MYFOLDER/MY_LEVEL.json

The levels saved here will appear in the main menu under "custom content"

The level needs to be accompanied with a "info.json" which includes the level filename, level name, objectives and music choice.

The contents of the info.json is as follows:

{
        "loot": 10300,
        "name": "Challenge Bar",
        "objectives": [
                {
                        "name": "cBarObjective1"
                },
                {
                        "name": "cBarObjective2"
                },
                {
                        "name": "cBarObjective3"
                }
        ],
        "intel": "intelChallengeBar",
         "music": "ambientHorror"
}

 

Choose the music

if you define one music type in "music" then that will play all the time.

if can also define situational music as follows:

        "music": {

                "sneak": "musicSneakB",

                "exciting": "musicExcitingB",

                "chaos": "musicChaosB"

        }

 

You can download one of the challenge maps from workshop and copy/modify the info.json for your own level.

 

List of music/ambient choices (single track):

ambientIndoors

ambientOutdoors

ambientArcade

ambientDocks

ambientSewer

ambientHorror

musicFinalScore

musicHalloween

musicHell

musicHideout

musicKnox

musicOpening

 

List of music choices (multi track, situational)

musicSneak

musicExciting

musicChaos

musicSneakB

musicExcitingB

musicChaosB

musicSneakC

musicExcitingC

musicChaosC

musicSneakCasino

musicExcitingCasino

musicChaosCasino

musicSneakPier

musicExcitingPier

musicChaosPier

musicSneakSneak

musicExcitingSneak

musicChaosSneak

musicSneakWhite

musicExcitingWhite

musicChaosWhite

 

Advanced editing: Entities

All the game items, characters, cars etc. are defined in something called "entityDefinitions" which are composed of components which define the function and stats of each item.

 

Here's an example entity, the shotgun. (guns are defined with multiple entities, one for the item on the floor and another when it's in your inventory)

 

var shotgun = { extend: gunBase, components: [

        {

                c: WeaponComponent,

                d: {

                        maxRange: 8,

                        maxAngle: 10,

                        randomAngle: 30,

                        projectilesPerShot: 15,

                        ejectedShell: ejectedShellShotgun,

                        effect: muzzleFlashShogtun,

                        ejectedShellsPerShot: 2,

                        impulse: 2.5,

                        interval: 1.5,

                        firingSoundClipName: "shotgunShot",

                        ammoType: "shotgunAmmo"

                }

        },

]};

 

NOTE: Each entity needs to be defined before the reference in a component. For example, here the "ejectedShellShotgun" entity needs to be defined above the "shotgun" entity.

 

Extend means it's adding to and modifying another entity. The stats are quire self-explanatory, so now if I change the interval to something a lot less and change the projectile I can create an auto-shotgun that fires vomit bullets, pretty scary O_O

 

 

You can also add your own definitions, just copy and paste some of the existing ones for guidance. Then these can be added to your custom levels.

Here's what you need for a custom weapon:

Copy the entities called "shotgun" and "pickableShotgun" the pickable one is the item on the ground which has a reference to the actual equipped shotgun entity like so "equippedDefinition: "shotgun","

You can find these in assets/definitions

 

Modifying the copy text: Language

All the text is defined in: assets/localisation/english.json

 

The language can be edited in this spreadsheet:

https://docs.google.com/spreadsheets/d/1Vzl4ULywd8oBNoNpKhnpT0c0TM0Zfh8esCwjHr4cDVk/edit#gid=1605807687

 

Copy the spreadsheet to make your own personal file, which you can modify.

Once you're done, click export json for this sheet

 

Then copy the exported content to english.json