The Official D-Mod Author's FAQ
Frequently Asked Questions about creating D-Mods for Dink Smallwood

The Dink Player/Developer Forums: www.cxo.com/~wyndo/forum
The Dink Smallweb: www.cxo.com/~wyndo/dmods
Maintained by Mike Snyder: wyndo@cxo.com

Revision: 1.3, Revised on: 09/06/1998


  1: What tools do I need to create a D-Mod
  2: Do I need to be a programmer, or know C, to write a D-Mod?
  3: Is there any sample source code to look at?
  4: How do I start creating my D-Mod? What do I do first?
  5: What are some of the limits & thresholds?
  6: Why can't Dink walk to the next room in my D-Mod?
  7: I set a variable (such as TEMP) to a value (such as 15) but it doesn't work. Why?
  8: How do you make the Status Bar show up when the game begins?
  9: What do all the keys do in Sprite Edit mode?
10: How do I make a warp, such as a door or a Dink's Doppelganger-style arch?
11: How can I add new graphic sprites to the game?
12: How can I add new background TILE sets to the game?
13: How can I take a “screen shot” of my D-Mod?
14: How can I fix the hardbox around houses and other big objects?
15: How can I “pick up” or edit sprites that are hidden under other sprites?
16: What is the best way to use “ScreenMatch” to line up sprites on adjacent screens?
17: How can I tell which sprites have scripts attached?
18: I edited the main Dink game and many blocks have M and S on them. Why?
19: How can I make a MIDI play in some rooms of the game?
20: When I finish my D-Mod, how do I zip it up to distribute?
21: How do I make monsters, like Goblins & Slayers, work right?
        *** NEW: (Added 9-6-98) ***
22: All my trees (or whatever) turn into pillbugs when I play! How can I fix it?
23: What numbers should I use for Base Attack, Base Walk, and so forth?
24: Is there any way to change the 256-color Palette that Dink uses?
25: How can I block passages and make Dink turn around and say something?
26: How can make use of different “visions” in Dink?
27: How do you make choices pop up, such as conversations?
28: What colors can be used for dialogue? What are the codes?


 Q: What tools do I need to create a D-Mod?

 A: You need to own a copy of Dink Smallwood on CD (available from RTSoft at www.rtsoft.com). There is a folder on your DINK CD called “develop”. Copy everything from this folder into your main Dink directory. That's it! The map editor is called DINKEDIT.EXE. I'd recommend downloading DinkRun (mine) or CreatedWorlds (Silencer's) as a front-end for running DinkEdit.

NEW: I have created a D-Mod Skeleton which is the shell of a D-Mod you can simply UNZIP into a Dink subdirectory of your choice. It includes a blank map, start .C files, and other files you need to get started! This makes things easier because you no longer have to figure out what files you need or how to set it up. Just install it like any other D-Mod, then jump right in and edit it!

 Q: Do I need to be a programmer, or know C, to write a D-Mod?

 A: This kind of depends on your personal talent, and how dedicated you want to be in learning how. Dink-C might carry over the same basic style as the C programming language, but it's very different and much easier. It's more of a scripting language than a programming language. Having programming experience is a big plus, especially if it's in C, but I don't think it's absolutely necessary if you read through TUT1.TXT, read this FAQ, and get help from others already doing it -- and if you have the time and patience to give it a try. Start small. Don't try to create a large D-Mod as your first effort if you're having trouble understanding how to write one.

 Q: Is there any sample source code to look at?

 A: The entire source code to Dink Smallwood (the game, not the engine) is included. If you copied everything from your CD's “develop” dir, then you'll notice a ZIP file called source.zip in your main Dink dir. It has all the .C source files for Dink. Many of them, just as enemy scripts & weapon scripts, are totally easy to use in your own D-Mod! Make a directory under your main Dink directory called SOURCE and unzip this file into it. You'll need some of these source files even to begin your D-Mod. I ended up with C:\DINK\SOURCE\ which contained all the .c files. Yours might be C:\PROGRAM FILES\DINK\SOURCE or something else.

I have also released some source code of my own. I have posted the intro source files to Dink's Doppelganger, and I may be adding more in the future. I also plan to release some “general-purpose” plug-and-play scripts. Keep your eye on the Dink Smallweb for more source code.

RTSoft has made the source code to Mystery Island available for free. You can pick up a copy in the “D-Mod Author's” section of the RTSoft site.

Last but not least, you can get help from a lot of people. It's preferrable to try to answer your question by reading this FAQ first (we all get tired of answering the same questions over and over again) but try the Dink Programmer's Forum at www.prowler-pro.com/pcgi/ultimate.cgi?action=intro. I answer as many questions as I can, and many others who do this help out too!

 Q: How do I start creating my D-Mod? What do I do first?

 A: Well, after making sure you copied the development folder off your CD into your main Dink directory, you need to make a subdirectory for your D-Mod. Under your main Dink directory, make a folder (directory) to store your D-Mod files. For instance, my main Dink directory is C:\DINK\ so I made a folder under this called SCAROFD and ended up with C:\DINK\SCAROFD\ to begin my Scar of David D-Mod. If my main Dink directory had been C:\PROGRAM FILES\DINK then I would have made C:\PROGRAM FILES\DINK\SCAROFD.

Next, make subdirectories under this directory. Call them GRAPHICS (for your sprites, if you add any), TILES (for your background tiles, if you change any), SOUND (for your .WAVs and .MIDIs, if you add any) and STORY (for your source .c files -- the guts of the game). I ended up with C:\DINK\SCAROFD\GRAPHICS (which will be referred to here as the D-Mod Graphics directory), C:\DINK\SCAROFD\TILES (D-Mod Tiles directory), C:\DINK\SCAROFD\SOUND (D-Mod Sound directory), and C:\DINK\SCAROFD\STORY (D-Mod Story directory).

Next, you have to copy over the required files as a base for your D-Mod. From your main Dink directory's SOURCE subdirectory (the one you created to store the source code from source.zip) copy MAIN.C, START.C, START-1.C, START-2.C, and START-4.C. Copy these 5 files into your D-Mod's Story directory. (Note: START-3.C is not needed because it was the script for the "Order" button, not needed in the full version of Dink).

Now, there are two files from your main Dink dir's DINK subdirectory (yes, your main DINK directory has a folder inside of it called DINK) which you need to copy into your main D-Mod directory. The files are DINK.INI and HARD.DAT. For my setup, I copied C:\DINK\DINK\HARD.DAT to C:\DINK\SCAROFD\HARD.DAT, and then C:\DINK\DINK\DINK.INI to C:\DINK\SCAROFD\DINK.INI.

These are the files you should need to begin working on your D-Mod. DINK.INI in your main D-Mod directory contains initialization stuff. This is what you edit to add new graphics or change existing ones (to be explained later). MAIN.C in your D-Mod's Story directory contains global variable initialization. For instance, &player_map is contained in MAIN.C and it defines the room # that Dink will start in. START.C is the intro script. It is what sets up the title screen, defines what .WAV files are going to be used, and so forth. START-1.C is the script for the Start button., START-2.C is the script for the Continue button. START-4.C is the script for the Quit button.

To start working on your map, I recommend using DinkRun (available at The Dink Smallweb or CreatedWorlds (available lots of places, including Black Oaks software). If you're in a hurry to get started right away, you can also launch the map editor by hand by simply running DINKEDIT -GAME <gamedir> (where gamedir is the name of your main D-Mod directory such as SCAROFD) from within your main Dink directory. For example, before I wrote DinkRun, I would click my Windows 95 START button, click RUN, then type C:\DINK\DINKEDIT -GAME SCAROFD and press <enter>. If your main Dink directory was C:\PROGRAM FILES\DINK\ then you would run C:\PROGRAM FILES\DINK\DINKEDIT -GAME SCAROFD.

NEW: I have created a D-Mod Skeleton which is the shell of a D-Mod you can simply UNZIP into a Dink subdirectory of your choice. It includes a blank map, start .C files, and other files you need to get started! This makes things easier because you no longer have to figure out what files you need or how to set it up. Just install it like any other D-Mod, then jump right in and edit it!

 Q: What are some of the limits & thresholds?

 A: You can have up to 99 sprites on one screen. You can have as many as 200 scripts running at once. You can set up to 200 global variables. You can place up to 50 sprites in a sequence (animation or sprite set) and up to 1000 sequences total (for a grand total of 50000 frames). You can have up to 600 “set_sprite” commands in dink.ini. Up to 100 “callbacks” can be set at once. The game can load up to 99 sounds.

 Q: I have two rooms side by side, and I use sp_map(); to start Dink in the right room, but when the game starts, he can't walk to the next screen. What's wrong?

 A: Don't bother with sp_map(); I think it's in START-1.C but isn't being used. Instead, edit your MAIN.C and find &player_map, and set it to the starting room. Or, in place of sp_map(); just set &player_map = the room you want to start in.

 Q: I set a variable (such as TEMP) to a value (such as 15) but it doesn't work. Why?

 A: Dink-C is kind of picky when it comes to this. There are several things you might be doing wrong. First, remember that all variables begin with the & symbol. You can't use TEMP but you can use &TEMP. Also, remember to put spaces before and after the equal sign. For instance, &TEMP = 15; Also remember the ending semicolon ; at the end of each line.

 Q: How do you make the Status Bar (at the bottom of the screen) show up when the game begins?

 A: In the original Dink Smallwood, the beginning is an “intro” scene where Dink is talking to his mother. At one point, you hear a chime and the status bar appears and you can begin controlling Dink. Well, this is why the status bar doesn't show up when you start your D-Mod. To cure it, simply add these lines to the appropriate place in START-1.C:

    set_mode(2);
    &update_status = 1;
    draw_status();
Actually, set_mode(2); should already be there, but you can add it if it isn't.

 Q: What do all the keys do in Sprite Edit mode?

 A: Here is a rundown of the sprite-mode editor keys:

1: Set the size of the sprite.
2: Set the basic type of the sprite.
3: Set the Brain type for this sprite.
4: Set the Speed of the sprite (if a brain is used).
5: Set the Timing of a sprite.
6: Set Base Walk. For example, 640 is a Slayer.
7: Set Base Idle sequence. Not used very often.
8: Set the Depth Que. Make it appear “above” or “below” things.
9: Set the hardness. 0=hard, 1=not hard.
0: Set the warp property. 0=normal, 1=warp.
SHIFT-1: For warps, set the SCREEN # it will warp to.
SHIFT-2: For warps, set the X pixel to warp to.
SHIFT-3: For warps, set the Y pixel to warp to.
SHIFT-4: Set the animation sequence to use (if any).
SHIFT-5: Set the script name for this sprite.
SHIFT-6: Set the base death sequence.
SHIFT-7: Set Sound this sprite will play.
SHIFT-8: Set the number of hitpoints this sprite will have.
SHIFT-9: Set “NoHit” setting. Can this sprite be punched?
ALT-1: Set Touch Damage (damage afflicted to Dink if touching this).
     NOTE: Touch damage of -1 will make it run the “touch” function of the attached script.
ALT-2: Set the Base Attack sequence used for this sprite.
ALT-3: Set number of defense points for this sprite.
I: Hold this key to show info for all on-screen sprites.
S: If holding a sprite, use S to stamp down a copy of it.
V: Change the vision mode being used. 0 is the default.
B: Attach a Base Script to this room. Room Scripts are VERY handy.
M: Turn ScreenMatch on or off.
E: If “holding” a sprite, go to sprite chooser to change.
E: If not holding a sprite, go to sprite chooser to pick a new sprite.
ENTER: If “holding” a sprite, drop it.If not holding a sprite, pick it up.
Z & X: Trim/clip sprites. Hardboxes remain full-size.
[ & ]: If “holding” a sprite, change its size.
[ & ]: If not holding a sprite, cycle through all on-screen sprites.

Note that many of the settings involving numbers (brain, speed, sequence, and so forth) can be set via code. This makes it possible to add a slayer sprite, give it the script “EN-SLAY” and not set anything else. EN-SLAY.C handles everything by setting its brain, speed, and so forth. These commands usually start with sp_ (such as sp_brain, sp_speed), so be sure to look up those command.

 Q: How do I make a warp, such as a door or a Dink's Doppelganger-style arch?

 A: This is easier than it would seem. Edit the object you want to be the warp by “grabbing” it. hit 0 (zero) to edit its warp properties and set it to 1... 1 meaning it is a warp tile (this will turn its hardbox orange after you drop it). Next, press SHIFT-1 to set the ROOM the warp will link to. Press SHIFT-2 to edit the X pixel postion to warp to. Press SHIFT-3 to edit the Y pixel position to warp to.

Now, you have a basic warp tile. This is useful for things like the arches in Dink's Doppelganger, holes in the ground (found in sequence 89), or staircases (found in sequence 428).

There is an easy way to set the Map, X, and Y properties for a warp (without having to use shift-1, shift-2, and shift-3). First, go to the map you wish to warp to. In sprite edit mode, move the blue arrow to the exact spot you wish Dink to appear, then press ALT-W. This will store the current map number, X, and Y into a temporary buffer. You should hear a tone when this happens. Now, return to the map that has the sprite you want to be a warp. Pick up the sprite and press ALT-W. You still must change it to a warp tile (press 0) and make sure it has hardness (press 9). But, you won't have to manually set the position and map to have it warp to!

If you want it to play a sound other than the default “door creaking open” sound, press SHIFT-7 and enter the sound number you want it to play. For example, you might want to add the footsteps on a stairway sound to a stairway warp. The sound is STAIRS.WAV. Look in START.C to see what number it is, or add it as a new number if it isn't there. Use SHIFT-F7 to attach this sound to the sprite.

A warp also allows Dink to leave the inside of a house and return to the outside. However, these warps are invisible. To do this, make a regular warp as described above, but attach it to a table or something similar (to create a large enough area). Now, press 2 and you can set its basic type. The screen says the options are 0 and 1, but you can also set it to 2 and this will make it invisible. Place it where the exit opening is in the room. If in doubt, remember to hit <spacebar> after dropping the sprite to check the screen's hardness.

You can also change the animation number by using SHIFT-4 to change the sequence. This is how you cause a door to open and close. The sequence number for a door opening to the SouthEast is 61. The sequence number for a door opening to the SouthWest is 62. The sequence number for a castle door opening SouthEast is 68.

If you're making the warp for a door (as explained above) you actually have TWO sprites. The first is an ordinary door frame (such as the two door frames found in the house set 63). Then, on top of this, put the door animation you plan to use. The way the depth dots work, you might have to set its Depth Que by pressing 8 otherwise it might be hidden under the house or the door frame. Just experiment.

 Q: How can I add new graphic sprites to the game?

 A: This isn't hard to do, but it's difficult to explain. First, draw your graphics using the program of your choice. I use Paint Shop Pro 4.0, but a rendering program like 3DMax would be much better. Anyway, draw them on a white background (white will be invisible when used as a sprite). When done you must save them using the Dink Palette as a .BMP file.

To get the Dink palette, load any of the images from the main Dink GRAPHICS directory (part of the source you got from the CD) or from the DINK subdirectory's GRAPHICS subdirectory. Depending on what program you use, you should be able to “Save Palette As” -- I saved it as DINK.PAL in my main Dink directory for easy access. Once you have the palette, load your own graphics and select to “Load Palette.” Paint Shop Pro gives 3 options for applying a palette to an existing image. Nearest Color is something I rarely use, as it makes my pictures look too weird. I almost always use Error Diffusion instead. This will probably make the picture look “pixely” but it will probably be more like what you want. The third option, Maintain Indexes, is useful for applying the Dink palette after a screen capture. Your graphics program might work different... just read its docs or help file to figure out how to save and load a palette.

Save your graphics to a temporary folder until you get them like you want, then save them to your D-Mod's GRAPHICS directory. The naming is very important. The name can be from 1 to 5 letters, and must end in -## such as -01, -02 ... -30, and so forth. You might name sprites THING-01.BMP, THING-02.BMP, THING-03.BMP, etc. If you have a lot of different “single” images, you can name them with the same starting name with -01, -02, -03, and so forth. You will be able to pick them separately. If you have sprites that make up an animation, do the same thing, but be sure not to name any sprites this way that aren't part of the animation. Basically this gives you two ways of collecting sprites: Either as a set of different sprites you want to use (such as the set of trees in Dink), or an animation (such as the opening doors, or the monster sequences).

There are two ways to add them to the game. The first way is to pick sequences you will not be using, and get rid of them. For instance, The animated arrows that pop up behind the logo on the original Dink title screen (sequences 197, 198, 199, and 200) can be replaced. Edit the DINK.INI (but BE CAREFUL and make a copy of it first in case you mess up) and change the graphics being loaded by these sequences to be the graphics you want. This takes a bit of practice. Look at how it's done in Dink.Ini (it uses “load_sequence_now”). You'll also want to delete the “set_sprite_info” in DINK.INI that refers to these sequences (the first number after set_sprite_info is the sequence number -- find all the ones for the sequence you're changing and erase those lines). If you need to set hardboxes, you can do this as normal using the map editor.

The second way to add a new graphic sequence is to give it a new number. Find a sequence number that isn't in use. To do this, you could use the map editor to go to the last page of sprites, then press <enter> to see it's number. The highest sequence in the stock DINK.INI is 843, but it's part of a monster animation (and they use a full 10 sequences, no matter what) so the first available number above the current graphics is 850. I tend not to use this second method, since it takes a long time (even on my Pentium 233Mhz) for Dink to load up the last page. I prefer replacing sprites (using method #1) from the earlier numbers so they show up sooner in the sprite chooser.

 Q: How can I add new background TILE sets to the game?

 A: You can't really “add” new tile sets, because Dink expects to find exactly 41 of them, named TS01.BMP to TS41.BMP. They can be as large as 600x400 but many of them are not this big. You can load any of these tile pages (found in your main Dink Dir's DINK\TILES subdirectory) and edit them with your graphics program. Save them back in your own D-Mod's TILES directory (so you don't mess up the original). I did away with the existing TS39.BMP set and created my own TS39.BMP to which I added new grass, new floor tiles, and so forth. For example, load TS39.BMP from the TILES directory for The Ninth Lock. TS39.BMP is available in the map editor by pressing ALT-9.

There are only a few things to remember when modifying a tile set. First, remember that the tiles must be in exact multiples of 50x50 pixels. For example, you might have a tile for grass that is 100x100 and is positioned from 0,0 to 99,99.... or from 150,50 to 249,149. This is VERY important because the square box you use to pick tiles in the map editor jumps around in exact 50x50 pixel increments. Also, remember to apply the Dink Pallette to the tile set and save it into your D-Mod's TILES directory.

 Q: How can I take a “screen shot” of my D-Mod?

 A: When I wanted to put pictures of Dink's Doppelganger on my web site, I tried and tried to make it work but I couldn't. Finally, I found an EASY (and probably the best) way to do it. While playing the game (or while in the map editor) get to the screen you want to capture. Then, simply hit the <print-screen> key on your keyboard. Nothing visible will happen, but the current screen will be copied to your clipboard. Now, go into your graphics program and select to paste the file in as a new image. It will probably look really weird with bright pastel colors (that's how it looked in Paint Shop Pro). Well, load the Dink Pallete, but select “maintain indexes” as the option. VOILA! The picture should appear correctly. Now, save it as a .GIF for your web site or whatever, or shrink it, cut it smaller, or whatever you want to do.

 Q: How can I fix the hardbox around houses and other big objects?

 A: You'll notice that the hardbox around things like houses just doesn't do the job. Hardboxes have to be rectangular, and things like houses are too complex for this to work. There are at least three methods to “fill in” the hardness around a house. It's probably best to set its hardness type to 1 (not hard) and totally draw the hardness yourself as explained below. I use a combination of the first two usually.

When you are in tile edit mode (where the square box is on the screen, not the blue sprite arrow) press the H key to enter hardness edit mode. In hardness edit mode, you can use the [ and ] keys to run through the available tile hardnesses. Pick one that closely matches what you need, and use S to stamp it down. Be careful not to edit any of the hardness blocks you select this way, because they belong to the tiles on the various tile pages and you could accidentally mess one up without meaning to.

I usually supplement that by adding things like trees, stumps, fences, and posts around the house. This can “cover up” gaps in the hardness, or help hide places where the hardness extends too far from the house using the first method.

A third way to fill in the hardness is to use a sprite with a fairly small hardbox and stamp it around the house. The trick is to use the 2 option to set its basic type to 2 (invisible). This way, you can fine tune the hardness area without placing visible objects around it.

 Q: How can I “pick up” or edit sprites that are hidden under other sprites?

 A: If the answer to this was documented, I never found it. I was having a very hard time because I put a lot of sprites on my screen. Small things ended up being behind large things (like trees). I could still see them just fine, but when clicking on them with the mouse, I would end up picking up the tree instead of the small rock behind it.

I realized, don't use the mouse when you're placing sprites. It's not very precise and it's easy to move things a few pixels off. Instead, use the arrow keys to move sprites around (leave the mouse alone). Use CTRL+ARROWS to move a sprite 1 pixel at a time to get it exact. Use SHIFT+ARROWS to move a sprite real fast.

Now, if a sprite ever gets covered up, simply use the [ and ] (square brace) keys to cycle through all your sprites. A green box will appear around each sprite. Keep hitting the brace keys to cycle through them all. You'll be able to access ALL sprites, even the ones behind other objects. Press <enter> to “pick up” the sprite to move or edit it.

Be careful though. If you have already selected the sprite, the [ and ] brace keys will shrink or enlarge it. If you accidentally change the size of a sprite, you can use 1 (one) to change it back to 100%.

 Q: What is the best way to use “ScreenMatch” to make sprites line up on two adjacent screens?

 A: ScreenMatch is a funny thing. You activate it in sprite edit mode by pressing the M key. In the lower part of the screen, it will indicate whether ScreenMatch is on or off. If you leave it on, you're likely to end up with a lot of “duplicated” sprites overlapping the adjacent screen. The is especially bad if you move a sprite, stamp it down, decide to move it more, and stamp it down again. On the adjacent screen, you will have several matching sprites, not just the 1 you had intended.

So, only turn on ScreenMatch when you are going to place a sprite that overlaps to the adjacent screen. Then, immediately turn it off. I do this when I place trees. If I want the top of the tree to extend into the room above it, I grab the sprite and move it where I want it to be, then I press M to turn on ScreenMatch, then I press <enter> to drop the sprite, then I press M again to turn off ScreenMatch. If you ever move a sprite that is “matched” to an adjacent screen, remember to first delete its twin on the other screen, then come back to the screen you wish to change and repeate the step to turn on ScreenMatch, move and drop the sprite, and turn ScreenMatch off.

 Q: Is there any way to know which sprites have scripts attached without editing each one to check?

 A: Yes. In sprite edit mode (or even tile edit mode), hold the I key down. Several red and black boxes will appear. They won't always be centered over their respective sprites, but it gives you a general idea. This shows whether each sprite is hard or not, and what script (if any) is attached. This is good for locating places where you “accidentally” put scripts on sprites that weren't supposed to have them. I accidentally put a treasure chest script on some trees in Dink's Doppelganger... they looked like trees but when you hit them, 200 gold pops out. WOOPS!

 Q: I edited the main Dink game and many blocks have M and S on them. Why? or... How can I make a MIDI play in some rooms of the game?

 A: When you're in the screen-chooser section (that's what I call the screen with all the purple and red blocks on it in the map editor), press the S key to set the screen type. This controls whether or not it will show up on the map as a flashing dot. This is normally used to designate some rooms as being “inside” so when the map is viewed, the little “you are here” flashy will be shown at the last room Dink visited that was NOT inside. If you don't use a map (controlled by BUTTON6.C) then don't worry about it.

The M key sets the music number for this screen. For example, if you set it to 50, then a song called “50.MID” in your D-Mod's Sound directory will be played.

 Q: When I finish my D-Mod, how do I zip it up to distribute?

 A: If you have WinZip, I believe the task is easier. There is also a tool for winzip to make self-extracting EXE's out of a ZIP file. There is a similar tool for PKZIP DOS but it doesn't automate the installation.

Anyway, I use PKZIP 2.04G for DOS, and I created a batch file called M.BAT. I put this file in my D-Mod directory. Then, I run a dos-prompt and change into my D-Mod directory. From there, I just type M.BAT <enter> and it does it! M.BAT contains:

    pkzip dmodname.zip *.* -aPr
    pkzip dmodname.zip -d m.bat
    pkzip dmodname.zip -d *.zip
Whatever method you use to zip it up, remember to designate to recurse and store path names (that's what -aPr does for PKZIP DOS, in the above batch file).

On a side note, several weeks ago several authors agreed on the convention of not zipping up your D-Mod directory with the ZIP. This means the player makes a D-Mod subdirectory of their choice, and unzips your D-Mod into it instead of unzipping your D-Mod right into the main Dink directory.

 Q: How do I make monsters, like Goblins & Slayers, work right?

 A: The stock Dink source files include monster files for everything in the game. Look for the files that start with EN- (such as EN-SLAY, EN-PILL, EN-BONC). These are the enemy scripts. Attach an enemy script to any sprite, and it will become that monster. For example, place a slayer on the screen, press SHIFT-F5 to set its script to EN-SLAY, and voila! You now have a slayer for Dink to battle against.

I usually copy scripts I plan to use into my D-Mod's story directory. This way, I can edit the script and make the monster less power if needed, and distribute the new monster script as part of my D-Mod.

 Q: All my trees (or whatever) turn into pillbugs when I play! How can I fix it?

 A: It's important to always keep in mind that DinkEdit remembers all (or most) of the properties of the last sprite you “touched.” Basically, that means if you add a pillbug to the game and set its properties for Basewalk, hit points, and so forth, the game is going to remember all of this because it's the last sprite to touch. Now, if the very next thing you do is go add a tree to the game, DinkEdit is going to create those trees using all these properties of the pillbug. You'll end up with trees that turn into pillbugs when you play the game.

Is this a bug? Absolutely not. It might be an inconvenience at times, but “Property Duplication” has lots of good uses and I'm glad it's there! I wish there were a toggle to turn it off or on the way you do with Screenmatch, but there isn't.

There is no way to easily “fix” the damage you've done by placing trees that turn into pillbugs (or anything that turns into anything else). Basically, just go in and grab each sprite in the editor and give it the right brain (or brain 0) and fix the all the properties by hand.

What you can do, is learn the correct way to add sprites. Get in the habit of always placing one “plain” thing on each screen... such as a tree or a table... something that has brain 0, no hit points, no base walk... nothing. After you place a pillbug, a goblin, an NPC, or even a fireplace, water animation, or a door or warp, always remember to go grab your “plain” sprite before you add anything else. This will guarantee your properties to be reset and it can save you lots of time from “fixing” later.

Why is Property Duplication a good idea? For one, you may want to place lots of goblins on a screen without having to set all the properties on each one. Moreover, you may want to place goblins on different screens, and Property Duplication works between screens too. Moreover, suppose you add an NPC to one screen two weeks ago, and you decide to put a similar person somewhere else in the game but you don't remember which all properties you changed. Property Duplication is a big help! But, what's the most beneficial thing about property duplication that I have found, is that I don't always remember what sprite sequence certain things are in. For instance, the fountains are in the "dirt patch" sequence, but I didn't always remember this. With Property Duplication, I can go grab a fountain from some other screen, then come back to a different room and add it... without having to weed through tons of different sprite sequences to remember which one has the fountain.

 Q: What numbers should I use for Base Attack, Base Walk, and so forth?

 A: A group of 10 sequences is reserved for each “base” anything, and it's always a multiple of 10. If you want to add a creature that walks around with sequences 601, 603, 607, and 609, then the BASE WALK should be set to 600. If you want to add a creature that attacks with sequences 531, 533, 537, and 539, then the BASE ATTACK would be 530. Basically, the “base” gives a quick number to use by simply adding the direction. If facing right (direction 6) then 530 + 6 = 536. If facing north-west (direction 7) then 530 + 7 = 537. It's really pretty easy.

 Q: Is there any way to change the 256-color Palette that Dink uses?

 A: Yes. In the “Dink” directory under your main Dink Smallwood directory, there is a TILES directory. Inside tiles is a file called SPLASH.BMP. This is the “please wait while loading” screen (you can change this if you want, but be sure to place the changed version in your OWN Dmod Tiles directory). The Dink Palette is obtained when the game loads by reading this screen. Simply make your own SPLASH.BMP with a different 256-color palette, and Dink will use it!

However, keep in mind that the existing graphics are going to turn freaky if you do this. You'll have to completely redesign all the graphics of the game. For this reason, it's doubtful that anybody ever actually will change the palette.

 Q: How can I block passages and make Dink turn around and say something?

 A: Place something to block the passage or the door or whatever it is, such as a table (pick something that's just the right size). Use SHIFT-5 to set the script on this thing (I usually name mine BLOCKER or BLOCKER1 or something). Now, you need to CLIP the sprite away to nothing (sometimes making it invisible using the “2” option will cause it not to run the script correctly, so I just clip them). To clip, simply grab the table (or whatever), hold the X or Z key down, and start pressing the arrow keys to clip it away to nothing.

Now that you've created the blocker sprite (and it's not visible on the screen any longer) you need to write the script to control making Dink move and talk when it's touched. Begin the BLOCKER.C script like this:

void main(void)
{
    sp_touch_damage(&current_sprite, -1);
}
This will cause the sprite's “touch” script to be called if Dink runs into it. Now, simply add code for this touch function:

void touch(void)
{
    //Prevent the player from being able to control Dink for a moment...
    freeze(1);
    //Move Dink to the right... change this depending on where you want
    //him to go.
    move_stop(1, 6, 190, 1);
    //make him turn around to the left so he's facing the thing
    //he just came from
    sp_dir(1, 4);
    //Now make him say something!
    say_stop("I can't go inside that cave yet!", 1);
    say_stop("It's much too dark!", 1);
    say_stop("Maybe I should find a lantern first!", 1);
    //lastly, unfreeze him so the player can begin moving again.
    unfreeze(1);
}
The last thing to consider is what you want to do to make this blocker sprite go away. I've used just about every method imaginable. The easiest way is to attach a script to the room that changes the vision if Dink is carrying a candle, and put the blocker sprite in vision 1 so that if Dink has the candle, the room script makes the vision 0 otherwise makes it 1. Sound complicated? It's really not, but it only works if Dink has to do something on a different screen for the blocker to vanish.

Suppose you want the thing to vanish when dink HITS it. Simply add a “hit” function to blocker.c like this:

void hit( void )
{
     sp_hard(&current_sprite, 1);
     draw_hard_map();
     int &hold = sp_editor_num(&current_sprite);
     if (&hold != 0)
     {
         //this was placed by the editor, lets make it not come back
         sp_kill(&current_sprite,10);
         editor_type(&hold, 1);
     }
     kill_this_task();
}
There are other instances you might want to get rid of the blocker. For instance, in Elemental Peace I get rid of the castle door blocker when Dink gives flowers to the guard. This requires that I made a global variable and assigned it to &current_sprite in the blocker's “main” function. Then, after giving flowers to the guard, I use the technique above (in the “hit” function) except I use my global variable instead of &current_sprite.

 Q: How can I make use of different “Visions” in Dink?

 A: Not hard at all. When you're editing a room, simply hit the “V” key to change the vision. Any sprites added to this vision will ONLY show up if the vision in Dink matches this vision numbers. You can use TONS of vision numbers... 1, 2... 100, 1000... I used a 9-digit vision number in Dinkanoid!

Visions are VERY useful. Suppose you have an NPC (like the guy hiding behind the wall in Elemental Peace) that you only want to appear if a certain condition is true. Change vision to 1 (it defaults to 0) and add your NPC. Now, change the vision back to 0 and the NPC appears to have vanished! Change back to 1, and he's there. Note that it's best to use visions of 1 and 2 and 3 so you'll remember where your hidden sprites are later.

You can also move existing sprites into a vision. Simply “pick up” the sprite in vision 0, press “V” and change to a different vision, press <enter> to drop the sprite in this new vision, then change the vision back to 0.

To make visions work with the game, simply attach a script (press “B”) to the room. In the “main” function of this room script, change the vision! In Elemental Peace I used one script for all rooms to make it much simpler, then I just check to see what room the player is in, and if a certain thing has been done:

void main(void)
{
    //default to vision 0 for everything....
    //Note that it isn't necessary to set vision to 0 at the beginning of
    //a room, because vision is reset to 0 every time Dink walks or warps
    //to a new room... but I set it to 0 anyway just because I want to.
    &vision = 0;
    //check to see if the player is in room #402...
    if (&player_map == 402)
    {
        //Yes they are, so now check to see if they have talked to BOB
        if (&talkbob > 0)
        {
            //change to vision 1 now
            &vision = 1;
        }
    }
    //check to see if the player is in room #530...
    if (&player_map == 530)
    {
        //Yes, so check to see if they've killed the goblin yet...
        if (&killed_gob == 0)
        {
            //They haven't killed the goblin yet, so let's change vision
            //to 1 so that the blocker still shows up in this room.
            &vision = 1;
        }
    }
}
Make a point to learn how to use different visions like this. It can greatly help when needing things to show up or not show up depending on some condition.

 Q: How do you make choices pop up, such as conversations?

 A: If you've asked this question, you didn't read through DINKC.TXT. Search for choice_start and choice_end in the DINKC.TXT file. This is fully explained there.

 Q: What colors can be used for dialogue? What are the codes?

 A: Colors work when you use “say” or “say_stop” commands. It's good to pick a single color for each NPC, and make them “speak” in that color in anything they say. Unfortunately, you can only use one color per line (it would be nice to make a single message multi-colored, but you can't). Begin each line with one of the following codes:

`1 - Pink
`2 - Dark Green
`3 - Light Blue
`4 - Orange
`5 - Purple
`6 - Brown
`7 - Light Gray
`8 - Dark Gray
`9 - Light Blue
`0 - Light Green
`# - Rose
`$ - Yellow (default)
`% - White
For instance, to make an NPC say something in orange:
say_stop("`4Dink! Get off of my foot!", &current_sprite);
This is similar to the LORD-style color codes, but isn't exactly the same.

Copyright © 1998 by Mike Snyder