Warp Rogue Modification Guide


WORK IN PROGRESS - MAY CONTAIN ERRORS!


Contents

RDB Files
	Color Fields

Standards
	NPCs

Core Hacking
	Adding a New Color

Error Log

Debug commands


RDB Files

Almost all external data is stored in RDB files. You can find the documentation of that format in /lib/rdb.txt. 


Color Fields

The data tokens of the COLOR field might need some explanation. Here are two examples of valid COLOR field definitions:

COLOR:Red:

COLOR:Metal:Rusty:33:

The first is a simple definition, the second one defines the COLOR field of a terrain / an object which features alternating colors. In the example 'Metal' is the primary color, 'Rusty' is the secondary color, and '33' is the secondary color frequency.  

The frequency determines how often the secondary color is chosen instead of the primary color. The frequency ranges from 1 to 100 i.e. 1% - 100% chance that the secondary color is used.

You may want a list of all available colors. Download the source of the game and look at ui_colors.c. Don't be afraid, you don't need to be a C programmer to understand the color table (GameColor). 


== Standards ==

Symbols:
lowercase = small, uppercase = average/tall

A = alien
C = human corrupted by Chaos
B = beast
D = daemon
H = human (Imperium)
R = rebel/outlaw/outcast human (enemy of the Imperium)

Uniques: uniques must not have the same look as the NPCs who surround them.


Core Hacking

To modify the program core you need C programming skills. Teaching those is way outside of the scope of this guide. However, if you can program in C, here are a few useful tips: 

Adding a New Color

max.h: increment MAX_COLORS
colors.c: add the new color to the GameColor array.
enums.h: add the new color to the color_enum type

Do a full recompile (make clean, make install) with UPDATE_SYMBOLS defined. The program depends on SDL_ttf when compiled this way. You need to use one of the development makefiles dev_win.mak or dev_unix.mak to compile because the release makefiles do not link SDL_ttf.

Run the program. You can terminate it again once you see the title screen, no need to start an actual game. A binary compiled with UPDATE_SYMBOLS defined will create a new symbols bitmap (using SDL_ttf) every time you start the game! 

Do not define UPDATE_SYMBOLS when making release builds!


Error Log

If the program terminates itself at start up, it might has detected an error in the .rdb files. See the log file in /data/user. Other kinds of errors that might occur during actual play may also produce a log file, this is less likely, though, because the program does not do much error checking  after start up.


Debug commands

To enter a debug command during play use the debug console command: '#'
Nothing visible will happen, but the key handler is waiting for your debug command. 

List of Debug Commands

'x': Player controlled character gets 10000 EP.
'm': Player controlled character gets 10000 credits.



