(This is the "Dungeon Designs" column from the September 1989 issue of the Eamon Adventurer's Guild newsletter. Copyright 1989 Eamon Adventurer's Guild, 7625 Hawkhaven Dr., Clemmons, NC 27012-9408. You may reproduce this freely as long as this credit remains attached to the article.) Using Effects for Eamon Games with Version 7.0 by Robert Parker Being somewhat new to the use of Effects in an Eamon game, I have sat down and written out a mini-manual for beginning Eamon designers. The use of Effects is not explained in great detail in the designer manual, and I sorely needed to understand them. After a letter of help from Tom Zuchowski, and the study of the Eamon games 'Eamon v7.0 Demo Adventure' and 'Assault on Dolni Keep', I understand them a bit better now. I wrote down the uses as I came across them, and a wide variety of uses did I find. Effects can be used for several things. They can print on the screen the message on a note found in a bottle. They can print something when a sword is picked up. They can be used to 'scare' the player. Etc... Below follow just a few examples of the uses of Effects. Different people use Effects for different uses. Don't let this be a guideline of how to use them, but rather use it to give you ideas of what to do with them. For those who don't know (i.e. beginners), Effects are stored in EAMON.DESC, record numbers 401 through 600. Basically, to print out an Effect, one would have a line like this in the MAIN PGM: R = 401: GOSUB 45 Where R is the record number of the Effect to be printed. In this example, we are printing Effect #1. Since Effects are stored at 401-600, we must add 400 to the Effect number to get the record number. GOSUB 45 calls the subroutine that reads in and prints EAMON.DESC records. But the question here is, where would one have an Effect in the program? One such place would be in lines 3070-3390 (MOVE). An example of a use in this area would be like this: 3070 IF R2 = - 300 THEN R = 425: GOSUB 45: GOTO 100 R2 is the room to be moved to. When the player tries to move to a room connection with a negative number, he is not actually moved. This allows extra programming to be added for special stuff. In this example, we are using a room connection of (- 300) to trigger the printing of Effect #25, or record #425. Such an Effect might be something like: THE CAR RACES PAST YOU, ALMOST HITTING YOU. THE DRIVER LEANS OUT THE WINDOW AND SHOUTS SOMETHING ABOUT BEACHES. Another example is: WALKING INTO THE CRUSHER, YOU BARELY JUMP OUT BEFORE IT FLATTENS EVERYTHING INSIDE OF IT! Another interesting use of Effects would be this: you are climbing a mountain. Every now and then, this happens: SUDDENLY, A LARGE BOULDER COMES CRASHING DOWN, NOT 5 FEET FROM WHERE YOU STOOD A MOMENT AGO! This could be generated this way: 510 IF RO < 24 OR RO > 36 THEN 100 520 IF RND(1) > .7 THEN R = 401: GOSUB 45 RO is the current room number. In this example, the mountains are rooms 24 through 36, and the Effect is #1. 100 is the beginning line number of the YOU SEE code that prints what you see in the room. Line 520 sets up a random number, which will be greater than 0 but less than 1. In this example, if it is .7 or less, the effect will not be printed. What this does is to set the odds to be 70% that it will not happen and 30% that it will. You can set this number to anything between .01 and .99. Putting this code in the 500-900 programming area will cause it to print out after the player's command has been executed and before any monster attacks take place. Another good place to put it is in the 201-209 area, where it will print just before the YOUR COMMAND? prompt. If there isn't enough room in the 201-209 area, you can GOSUB to some free line numbers somewhere else. Another Effect could be added to our 'mountain effects' like this. Imagine that we have 6 effects that are Effects #1-6: 530 R = INT(RND(1) * 6) + 1: IF R < 6 THEN R = R + 400: GOSUB 45 In this way it produces a random effect. Effect #1 might be the 'huge boulder' line printed previously. Effect #2 might be: YOUR HAND SLIPS! YOU BEGIN TO FALL, BUT CATCH YOURSELF AT THE LAST MOMENT! Effect #3 might be: TINY ROCKS BEGIN TO PELT YOU FROM ABOVE. IT APPEARS THAT SOMEONE OR SOMETHING IS THROWING THEM DOWN ON YOU. Another kind of Effect would involve picking up a weapon or artifact: 4145 IF A = 8 THEN IF NOT QQ THEN R = 405: GOSUB 45: QQ = 1 4235 IF A = 8 THEN IF NOT QQ THEN R = 405: GOSUB 45: QQ = 1 In this example, the Effect is #5 and it is printed when Artifact #8 is picked up, but only if QQ = 0. If QQ = 1, then the artifact has been picked up before and the Effect is not printed. You could use another variable name besides QQ that is not already being used. Line 4145 covers a regular GET command, and Line 4235 covers the command GET ALL. If you have a LOT of something like this to handle, you could do it like this: 31440 DIM QQ%(NA) 4145 IF A = 8 THEN IF NOT QQ%(8) THEN R = 405: GOSUB 45: QQ%(8) = 1 4235 IF A = 8 THEN IF NOT QQ%(8) THEN R = 405: GOSUV 45: QQ%(8) = 1 This code does the same as above, but instead of a single variable QQ, you use an array QQ%() that has a location for every artifact. This makes keeping track of them easier for you while programming the adventure. You can use any array name, as long as it is not already being used. Consult the Designer's Manual to see which array names are already in use. Here's another example, using the array technique: 4146 IF A = 9 THEN IF NOT QQ%(9) THEN R = 478: GOSUB 45: DF = 0: D2 = 3: GOSUB 7636: QQ%(9) = 1 4236 IF A = 9 THEN IF NOT QQ%(9) THEN R = 478: GOSUB 45: DF = 0: D2 = 3: GOSUB 7636: QQ%(9) = 1 In this example, when artifact #9 is picked up for the first time, then Effect #78 is printed, then the player takes 3 points of damage. For use of Effects when reading a note or label, etc., refer to lines 23000-23210 in the MAIN PGM. The use of Effects here is already added to the MAIN PGM. You use DUNGEON EDIT 7.0 to make the note a 'Readable' artifact type, and put the number of the Effect in the field that is titled '1ST EFFECT'. If it is a long message, you can use sequential effect numbers and then put the total number of Effects to be printed in the '# OF EFFECTS' field. If there is just one effect to be printed, '# OF EFFECTS' must be 1. I am now through describing some basic uses of Effects. Any further ideas should be used by you. If you have any interesting uses for them, please drop me a line with your idea. I'd love to hear some others. Thanks to Tom Zuchowski for writing to me explaining how to use Effects. Robert Parker, 4025 Sunset Pl., South Bend, IN 46619.