I will use this page to post general information for people wishing to contribute to (or further hack) scourge. The page is mainained on a per request basis so if you're interested in something that is not posted here, let me know and I will make an attempt at describing the feature. And as always: many thanks to all contributors!
Items are 3ds objects. I try to keep the poly count low (I use Milkshape3d).
For textures, I try to not add any new ones unless it's absolutely needed (e.g.: marble columns).
The objects live in data/objects the textures in data/. I try to not have
too many 3ds objects (so all "axe"-s have 1 model).
When adding a new 3ds object, edit data/world/shapes.txt. You can copy
the "AXE" block for example. The top of the file explains what each
line means. If you add a new texture, it also needs to be added in the
textures section (T:) of the same file.
Now, edit data/world/items.txt and for a given item and set the
"shape_index" (middle of 3rd line) to the name you gave your object in
shapes.txt. If you want to create a whole new item for your shape, it
is a little bit more involved (see items.txt) and usually requires a
code change (for new item types). If you're adding new shapes, you can
temporarily modify an existing item's shape_index and run the game to
see if it looks good. ("Dagger" is a good candidate, new party members
usually have one and monsters usually have one too.)
Another consideration for 3ds objects is that "magic" items will be
outlined in four different colors. For this to work correctly, the
edges of the panels of the object should mesh well. You can try this
for yourself by either looking for a magic item or creating one
(enchant button in the inventory).
They're all quake2 models I've downloaded from
polycount (or planetquake). They usually come with multiple (color at
least) skins so I can reuse the model for multiple monsters.
I use the "stand", "run", "pain" and "attack" animations only.
Unfortunately when the game was first started I used a different
strategy for adding models to the game (ie. a hack) so the
properties files can be a little confusing. I will only describe the
new way here.
When adding a monster:
- Put your model, skins, sounds, readme, etc. into a directory under /data/models/ (e.g.: frog,demoness)
- The model file must be called tris.md2 (like in quake2)
- The skin files must be in bmp format. (there is a pcx2bmp converter for linux in the root dir.)
- The only sound files I use are: gurp1,gurp2,jump,land,pain_100_1,pain_100_2,pain_75_1,pain_75_2,pain_50_1,pain_50_2,pain_25_1,pain_25_2. They must be in wav format.
- Edit /data/world/creatures.txt and add your creature. Copy a new-style md2 block (e.g. frog) for this. The file header has the details on what the keys mean.
- Optionally you can equip your monster with items and spells and set
its skills (like magic resistances.) I usually add the monster to
level 1 while testing and then move it to another level.
When adding a character model:
- Put your model content into a directory in /data/models/character/.
- Edit /data/world/shapes.txt and add a row for your model in the "character models" section.
- Currently sounds are not associated with a model for characters
(ie. there are no wav files in /data/models/character/ dirs), rather
they're stored in /data/sound/ and declared in
/data/world/characters.txt (see "knight" for details.) This might
change in the future.