-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexample.js
116 lines (102 loc) · 3.8 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
Contributed map templates will be used to generate a corportate operations building that the game takes place in.
Each level of the game will represent a floor in the office building and be one of the following types:
office, warehouse, laboratory. (suggestions for others welcome)
Levels will be generated by randomly composing map templates of the given type.
Indicate what type of map template you are contributing below.
Map templates should be of areas plausable to find in the given level type.
The following is an example of a map template submission. Valid javascript is not required. I will implement everything.
Please make clear notes explaining the purpose and intent of any non-generic tiles.
Map template must be 20x20.
If you are interested in making larger templates or major contributions please create a github issue and we will get in touch.
*/
var author = 'YOUR NAME HERE';
var templateType = 'office';
var mapData = [
'####################',
'&WWWWWWWWWWW.......&',
'&.CT.CT.CT.......CT&',
'&U.h..h..h........h&',
'&.................h&',
'&...............BCT&',
'&................CT&',
'&.................h&',
'&..h..h..h........h&',
'&.CT.CT.CT.......CT&',
'&SSSSSSSSSSSS......&',
'&############&&+&&&&',
'&..................&',
'&..TTTTTT..TTTTTT..&',
'&...hTTh....hTTh...&',
'&....TT......TT....&',
'&...hTTh....hTTh...&',
'&..TTTTTT..TTTTTT..&',
'#U.................#',
'####################',
];
/*
Do NOT add doors to the outside edges of your map template.
A single door will be randomly placed on one or more sides of the
map template connected to a hallway or adjacent map template.
Color suggestions are appreciated but not required.
description = wood, metal, glass
blocksLos = true/false (default true)
destroyable = true/false (default true)
hp: 1-10
*/
var doorTypes = {
wood: '', // hp 3
metal: '', // hp 5
glass: '', // NOT blocksLos, hp 2
};
/*
Describe the type of doors that should be placed on each side of your fragment.
All sides must be able to have a door placed.
*/
var doorSides = {
top: 'wood',
bottom: 'wood',
left: 'glass',
right: 'glass',
};
/*
Describe the type of map tile each character represents.
Map Tiles cannot be destroyed. If you want a destroyable object make it a furniture object.
Color suggestions are appreciated but not required.
settings
blocksLos = true/false (default false)
passable = true/false (default true)
*/
var characterToTile = {
'.': 'floor',
'&': 'window', // NOT passable
'#': 'wall', // NOT passable, blocksLos
};
/*
Describe the type of furniture each character represents.
Tiles with furniture characters are assumed to be on floor tiles.
Color suggestions are appreciated but not required.
settings
blocksLos = true/false (default false)
passable = true/false (default false)
pushable = true/false (default false)
destroyable = true/false (default false, true if object has hp)
hp = 1-10
*/
var characterToFurniture = {
W: 'whiteboard',
C: 'cabinet',
B: 'beanbag',
U: 'trashcan', // pushable, 1 HP
S: 'shelves', // pushable, 5 HP
h: 'char', // pushable, 1 HP
T: 'table' // pushable, 2 HP
};
/*
Submit this map template with a pull request adding the file to the map-templates folder
If you need to describe a tile with a type other than floor
that has furniture or any other tile with multiple elements
you will have to make multiple map layers.
I may make edits to your map template to fix problem areas or replace an object with a
similar existing one or adjust stats for balance and consistency.
*/