forked from crawl/crawl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonster_creation.txt
121 lines (99 loc) · 5.08 KB
/
monster_creation.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
A checklist for adding new monsters
===================================
This assumes you've already done (or are in the process of finishing) the design
work for creating a monster. These are the files that you will need to edit to
implement the new monster.
When adding entries, when possible add them in alphabetical order and near other
monsters of similar type. Bolt yaks should be added after yaks and before death
yaks, for example. Certain files list their entries in strictly alphabetical
order. Whenever possible follow present convention.
enum declaration is VERY important! Many things you create will need to be
declared in the appropriate files or your build will not compile.
====
Basic files to edit. These are the necessary files that need to be edited to
have the monster exist and spawn. If your monster is as complex as an iguana,
then this is all you need to do!
- /source/monster-type.h
- Defines monster type enumeration (an ID for the monster)
- In monster_type, find similar monsters and add a new entry there.
- To preserve save compatibility, you need to wrap that entry
in #if TAG_MAJOR_VERSION > 34 #endif.
- In the '// Add new monsters here:' block, at the end of that block
add another entry for the monster. This entry should come right above
the 'num_monsters' line.
- /source/mon-data.h
- Define the base statistics and flags for the monster. HD, speed, etc.
- Follow the conventions in the large comment block at the head of the file.
- Add an entry here near other similar monsters.
- /source/mon-pick-data.h
- Determines where and how often monster will spawn.
- See random-pick.h to understand the variables.
- Add entries for each branch of the Dungeon the monster will spawn in.
- Unique monsters should not be added to this file. Instead, add them to
uniques.des, as below.
- /source/dat/descript/monsters.txt
- Describe what the monster looks like and what it does.
Optional:
- /source/mgen-enum.h
- If the monster will spawn in bands, add entries here.
- /source/mon-place.cc
- Define how many and with which monsters the banded monsters will spawn.
- /source/dat/des/builder/uniques.des
- If you are adding a unique monster, add an entry with its
spawn depths here.
====
Implementation now becomes more complicated. Edit these files for
any special abilities, spells, or unique behaviour that the monster will have.
- /source/mon-cast.cc
- Define what the spells *do* here, if you created a new spell.
- /source/spl-data.h
- Define spell data and flags here.
- /source/mon-spell.h
- Give the monster its spellbook here.
- /source/dat/database/monspell.txt
- Add an action line for when the monster casts a spell.
- /source/dat/descript/spells.txt
- Add descriptions of any spells the monster has for xv.
- /source/spell-type.h
- Declare the spell here if you created a new spell.
- You will also need to declare the spell and some parameters in the
appropriate spl-(school).cc file.
- /source/rltiles/gui/
- Add spell icons here if any are applicable.
- /source/rltiles/dc-spells.txt
- Declare enum for spell icons.
- /source/mon-abil.cc
- Define any special abilities here.
If the ability involves status effects or flags -on the monster itself-, you
will need to edit:
- /source/enchant-type.h
- Declare the effect here.
- /source/mon-info.cc
- Add under trivial_ench_mb_mappings
- /source/mon-info.h
- Add under monster_info_flags
- /source/mon-ench.cc
- You need to add entries to enchant_names[] and to apply_enchantment().
- /source/timed-effects.cc
====
These files handle the monster's visuals and other fluff. Become pretty today!
- /source/rltiles/mon/
- Add the tile for the monster.
- Place it in an appropriate subdirectory.
- If you can't think of an appropriate subdir, leave it in /mon/ and it'll
eventually be sorted.
- /source/rltiles/dc-corpse.txt
- Add an entry so the game will generate a squashed & bloody version
of the monster's tile for corpses.
- Relevant only for monsters that are their own species: if you add, for
example, orcish warg riders, you do not need to add a new corpse entry.
- Group it with other monsters sharing its glyph.
- Name of the monster in lowercase, then 'CORPSE_MONSTERNAME'.
Optional:
- /source/tilemcache.cc
- Add entries here to set offsets for your monster
- For if your monster uses weapons and/or shields.
- /source/mon-speak.txt
- Add speech lines if the monster can speak. Optional.
- /source/dat/descript/quotes.txt
- Add a quote: pithy, edifying, or otherwise. Optional.