Traps

For builders to discuss and ask building questions.
Post Reply
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Traps

Post by Dalvyn » Sun Aug 10, 2003 12:23 pm

The new code has been completed for traps and requires 2 things.

First it needs to be tested. This can be done by the builders who put traps in their areas of course.

Second, I need your help making traps. I would like a general base of traps for builders to begin with and we can add on from there. Any builders who have traps in their areas now or plan to add them should apply.

There are two formats that traps might take. The first uses a skill or spell to determine how the trap acts. As you can see the one below casts acid arrow.

Code: Select all

#TRAP
Name a minor acid trap~
Type TTYPE_MINOR_ACID
DamageType SD_ACID
Target TTARGET_CHAR
Skill acid arrow~
Learnmod 3
Expmod 3
Level 10
End
The second type of trap is pure damage and has the following format. The trap below does 10d4 piercing damage to the triggering character.

Code: Select all

#TRAP
Name a deadly spike trap~
Type TTYPE_DEADLY_SPIKE
DamageType SD_PIERCE
DNum 10
DType 4
Target TTARGET_CHAR
Learnmod 13
Expmod 50
Level 50
End
I would like for builders who use traps to submit similar code to Mystra so that we might expand our trap inventory. Mystra will be working on trap lessons soon but for now you need to know:
  • TTARGET_NONE 0
    TTARGET_CHAR 1
    TTARGET_ROOM 2
    TTARGET_OBJ 3
  • SD_NONE 0
    SD_FIRE 1
    SD_COLD 2
    SD_ELECTRICITY 3
    SD_ENERGY 4
    SD_ACID 5
    SD_POISON 6
    SD_DRAIN 7
    SD_HOLD 8
    SD_PHYSICAL 9
    SD_HEALING 10
    SD_MIND 11
    SD_BASH 12
    SD_PIERCE 13
    SD_SLASH 14
    SD_NONMAGIC 15
The TTYPE you can make up as long as it starts TTYPE_.

Tyr
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sun Aug 10, 2003 12:25 pm

So far we have not covered how they are used or triggered. There are two parts to traps. The first part is the type of trap which I have requested submitions for. This determines all the characteristics of a trap that are not specific to an instance of use.

So far I have only made the two types you see above. So if you want a fireball trap for instance you will need to submit a trap type in the above format. Once somebody has submitted a trap type and it is in the game, any builder can use that trap type.

Now for how traps are actually placed in the game. They are put in resets similar to previous code.

Code: Select all

T [1|0] TTYPE_ # TRIGGER_TYPE|TRIGGER_TYPE
If placed after a D reset it is applied to the exit. If placed after an object
(O,G,E,P,H) reset its applied to the object.

[1|0] 1 is reset after repop. 0 is never reset after the first time.
TTYPE_ is the trap type. We can add these as easily as spells or races.
# is the number of times it can be triggered per reset.
TRIGGER is the things that trigger it.

TRIGGER_OPEN, TRIGGER_GET and other similar command triggers are pretty self explainatory. The one that isnt is TRIGGER_MOVE. This should be placed on traps after D resets. This puts the trap on the room exit and when a char moves through that exit it is triggered. Disarm and detection take place in the room with the exit but the trap will actually spring in the new room.
  • TTARGET_NONE 0
    TTARGET_CHAR 1
    TTARGET_ROOM 2
    TTARGET_OBJ 3
    TRIGGER_NONE 0
    TRIGGER_GET 1
    TRIGGER_OPEN 2
    TRIGGER_SHOVE 4
    TRIGGER_PUT 8
    TRIGGER_EXAMINE 16
    TRIGGER_USE 32
    TRIGGER_UNLOCK 64
    TRIGGER_CLOSE 128
    TRIGGER_MOVE 256
    TRIGGER_PICK 512
Note some triggers such as TRIGGER_OPEN and TRIGGER_UNLOCK can be used for exit or object traps.

Tyr
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sun Aug 10, 2003 12:41 pm

Learnmod, Expmod, and Level... what do they represent?

Also, I would guess that TTARGET_CHAR traps would damage only 1 character, while TTARGET_ROOM traps would damage all the characters in the room. But then, what about TTARGET_OBJ traps?
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Mon Aug 11, 2003 11:39 pm

How to set a trap on a room connection WITHOUT adding a door?

You can add a fake D reset in the RESETS section. It will most likely have the following form:

Code: Select all

D 0 (rvnum) DIR_* DOOR_NONE
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Mon Aug 11, 2003 11:51 pm

Traps that are currently available

Direct damage traps

Code: Select all

TTYPE_SPIKE_MINOR (a minor spike trap) : 5d6/PIERCE  on  CHAR 
TTYPE_SPIKE_AVERAGE (an average spike trap) : 10d6/PIERCE  on  CHAR 
TTYPE_SPIKE_STRONG (a strong spike trap) : 15d6/PIERCE  on  CHAR 
TTYPE_SPIKE_DEADLY (a deadly spike trap) : 25d6/PIERCE  on  CHAR 
TTYPE_BLADE_MINOR (a minor spinning blade trap) : 5d6/SLASH  on  CHAR 
TTYPE_BLADE_AVERAGE (an average spinning blade trap) : 10d6/SLASH  on  CHAR 
TTYPE_BLADE_STRONG (a strong spinning blade trap) : 15d6/SLASH  on  CHAR 
TTYPE_BLADE_DEADLY (a deadly spinning blade trap) : 25d6/SLASH  on  CHAR 
TTYPE_STONE_MINOR (a minor falling stone trap) : 5d6/BASH  on  CHAR 
TTYPE_STONE_AVERAGE (an average falling stone trap) : 10d6/BASH  on  CHAR 
TTYPE_STONE_STRONG (a strong falling stone trap) : 15d6/BASH  on  CHAR 
TTYPE_STONE_DEADLY (a deadly falling stone trap) : 25d6/BASH  on  CHAR 
TTYPE_ACID_MINOR (a minor acid trap) : 5d8/ACID  on  CHAR 
TTYPE_ACID_AVERAGE (an average acid trap) : 10d8/ACID  on  CHAR 
TTYPE_ACID_STRONG (a strong acid trap) : 15d8/ACID  on  CHAR 
TTYPE_ACID_DEADLY (a deadly acid trap) : 25d8/ACID  on  CHAR 
TTYPE_FROST_MINOR (a minor frost trap) : 10d4/COLD  on  CHAR 
TTYPE_FROST_AVERAGE (an average frost trap) : 20d4/COLD  on  CHAR 
TTYPE_FROST_STRONG (a strong frost trap) : 30d4/COLD  on  CHAR 
TTYPE_FROST_DEADLY (a deadly frost trap) : 50d4/COLD  on  CHAR 
TTYPE_FIRE_MINOR (a minor fire trap) : 10d4/FIRE  on  CHAR 
TTYPE_FIRE_AVERAGE (an average fire trap) : 20d4/FIRE  on  CHAR 
TTYPE_FIRE_STRONG (a strong fire trap) : 30d4/FIRE  on  CHAR 
TTYPE_FIRE_DEADLY (a deadly fire trap) : 50d4/FIRE  on  CHAR 
TTYPE_ELECTRICITY_MINOR (a minor electrical trap) : 8d6/ELECTRICITY  on  CHAR 
TTYPE_ELECTRICITY_AVERAGE (an average electrical trap) : 16d6/ELECTRICITY  on  CHAR 
TTYPE_ELECTRICITY_STRONG (a strong electrical trap) : 25d6/ELECTRICITY  on  CHAR 
TTYPE_ELECTRICITY_DEADLY (a deadly electrical trap) : 42d6/ELECTRICITY  on  CHAR 
TTYPE_NEG_ENERGY_MINOR (a minor negative energy trap) : 8d8/HEALING  on  CHAR 
TTYPE_NEG_ENERGY_AVERAGE (an average negative energy trap) : 16d8/HEALING  on  CHAR 
TTYPE_NEG_ENERGY_STRONG (a strong negative energy trap) : 25d8/HEALING  on  CHAR 
TTYPE_NEG_ENERGY_DEADLY (a deadly negative energy trap) : 42d8/HEALING on  CHAR 
Traps based on spells:

Code: Select all

TTYPE_SPELL_RAZORBAIT (a razorbait spell trap) 
TTYPE_SPELL_SWORDBAIT (a swordbait spell trap) 
TTYPE_SPELL_WINTER_MIST (a winter mist spell trap) 
TTYPE_SPELL_BLAZEBANE (a blazebane spell trap) 
TTYPE_SPELL_CHARGED_BEACON (a charged beacon spell trap) 
TTYPE_SPELL_WEAKEN (a weaken spell trap) 
TTYPE_SPELL_FUMBLE (a fumble spell trap) 
TTYPE_SPELL_CURSE (a curse spell trap) 
TTYPE_SPELL_ILL_FORTUNE (an ill fortune spell trap) 
TTYPE_SPELL_BLINDNESS (a blindness spell trap) 
TTYPE_SPELL_ENTANGLE (an entangle spell trap) 
TTYPE_SPELL_HOLD_MONSTER (a hold monster spell trap) 
TTYPE_SPELL_RAINBOW_PATTERN (a rainbow pattern spell trap) 
TTYPE_SPELL_COLOR_SPRAY (a color spray spell trap) 
TTYPE_SPELL_FAERIE_FIRE (a faerie fire spell trap) 
TTYPE_SPELL_POISON (a poison spell trap) 
TTYPE_SPELL_DISPEL_MAGIC (a dispel magic spell trap) 
TTYPE_SPELL_CAUSE_LIGHT (a cause light spell trap) 
TTYPE_SPELL_CAUSE_SERIOUS (a cause serious spell trap) 
TTYPE_SPELL_CAUSE_CRITICAL (a cause critical spell trap) 
TTYPE_SPELL_HARM (a harm spell trap) 
TTYPE_SPELL_SHOCKING_GRASP (a shocking grasp spell trap) 
TTYPE_SPELL_BURNING_HANDS (a burning hands spell trap) 
TTYPE_SPELL_CHILL_TOUCH (a chill touch spell trap) 
TTYPE_SPELL_MAGIC_MISSILE (a magic missile spell trap) 
TTYPE_SPELL_ACID_ARROW (an acid arrow spell trap) 
TTYPE_SPELL_FLAME_ARROW (a flame arrow spell trap) 
TTYPE_SPELL_FLAMESTRIKE (a flamestrike spell trap) 
TTYPE_SPELL_PHOENIX_CLAW (a phoenix claw spell trap) 
TTYPE_SPELL_FIREBALL (a fireball spell trap) 
TTYPE_SPELL_SOUND_BURST (a sound burst spell trap) 
TTYPE_SPELL_ACID_BLAST (an acid blast spell trap) 
TTYPE_SPELL_LIGHTNING_BOLT (a lightning bolt spell trap) 
TTYPE_SPELL_CHAIN_LIGHTNING (a chain lightning spell trap) 
TTYPE_SPELL_CONE_OF_COLD (a cone of cold spell trap) 
TTYPE_SPELL_ICE_STORM (an ice storm spell trap) 
TTYPE_SPELL_ENERGY_DRAIN (an energy drain spell trap) 
TTYPE_SPELL_PHANTASMAL_KILLER (a phantasmal killer spell trap) 
TTYPE_SPELL_DISINTEGRATE (a disintegrate spell trap) 
Post Reply