forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODDING.txt
106 lines (95 loc) · 4.68 KB
/
MODDING.txt
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
MODDING
Certain features of the game can be modified without rebuilding the game from
source code; you should be able to just modify the pertinent files and run the
game to see your changes. This attempts to document these features.
1.1 Adding a profession.
The data on professions is contained in data/raw/professions.json
The format of the file follows:
[
{
"ident" : "example", <-- This is a unique string that identifies the
profession; it is used internally by the game as
opposed to in the user interface.
"name": "Example Profession", <-- This is the name that will be displayed
on the user interface; this is
what you actually "see" in-game.
"description": "An example profession.", <-- This field contains the
description of the profession
that will be displayed in the
character creation screen.
"points" : 0, <-- This value describes the point cost of the profession;
note that negative numbers are accecptable. A positive
value will deduct points from the players total whereas
a negative one will give the player creation points.
"items": ["jeans", "tshirt", "sneakers"], <-- This list contains the items
a character will start with
if they choose this
profession.
"addictions" : [ <-- This is the OPTIONAL list of starting addictions.
{
"type": "nicotine", <-- The identifier of the addiction.
"intensity" : 10, <-- The intensity of the addiction.
}
],
"skills" : [ <-- This list is also OPTIONAL; it contains the starting
skills and their modified levels.
{
"name": "melee", <-- The identifier of the skill that will be modified.
"level" : 1 <-- The value that the skill will be modified; note that
this is NOT the starting level of the skill. It is
the value that the player's starting level will be
modified by. In other words, if the player puts 1
point into melee to give themselves level 2 melee,
taking this profession would add one additional level
resulting in level 3.
},
{
"name" : "dodge",
"level" : 1
}, <-- It is possible to list multiple skills for a single profession;
it's an unused feature in the current game.
]
},
]
1.2 Example of adding a profession.
Let's say we want to add a survivalist profession; this profession represents a
character who was already living off the land before the disaster struck. We'll
say this profession starts with archery, survival, traps, beef jerky
and a few survival items. We'll set the starting cost at 3 points since
it modifies skills and items. We could do that with the
following entries:
{
"ident" : "survivalist"
"name": "Wilderness Survivalist",
"description": "You live off the wild and wander the world; you've never
had\na place to live or items other than what you can
scavenge off the land. People called you crazy; now,
after the disaster, you're the sane one."
"points" : 3,
"items": ["pants_cargo", "boots", "beltrig", "selfbow", "jerky", "arrow_field_point"],
"skills" : [
{
"name": "archery",
"level" : 1
},
{
"name" : "survival",
"level" : 1
},
{
"name" : "traps",
"level" : 1
}
]
},
After adding this to the professions.json file, we should see the new profession
show up in the character creation screen.
1.3 IMPORTANT NOTE on JSON FILES:
The following characters: [ { , } ] : "
are *very* important when adding or modifying the JSON files for technical
reasons. This means a single missing , or [ or } can be the difference between
a working file and a hanging game at startup. Many editors have features
that let you track { [ and ] } to see if they're balanced (ie, have a matching
opposite); Notepad++ is a popular, free editor on Windows that contains
this feature. On Linux, there are a plethora of options, and you probably
already have a preferred one :-).