Ideas for traps/detecting/removing

  • Jan
  • Jan's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 week 5 days ago - 1 week 3 days ago #6784 by Jan
Jan created the topic: Ideas for traps/detecting/removing
Hi

Anyone who ever made a trap/detect traps/remove traps skill system ? Who wanna share how you did it, or ideas how to make it.

Maybe even with trigges, i know traps themself can be make with that. But what about detecting them and removing.

Also maybe the possibility for a ranger to set a trap.
Last Edit: 1 week 3 days ago by Jan.

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #6785 by Thomas
Thomas replied the topic: Ideas for traps/detecting/removing

JTP wrote: Anyone who ever made a trap/detect traps/remove traps skill system ? Who wanna share how you did it, or ideas how to make it.

Maybe even with trigges, i know traps themself can be make with that. But what about detecting them and removing.

Also maybe the possibility for a ranger to set a trap.


it depends what you mean by traps. I made a system once, where you could block an exit for a short period (I think it was called spiders web or something). This was a special magic spell, which blocked the exits from the current room for one or two battle ticks. It was efficient for keeping the monsters from fleeing - in practice trapping them there.

If you are referring to creating "touch" traps, or "land mines", you could easily create an object with an "enter" trigger, that explodes/implodes/sends arrows/spikes when someone enters, damaging them. Or even put in a short delay, so they might try to disarm it. Or check their "sense trap" skill (if applicable). Or check their dexterity.

If you are referring to boobytrapping chests and the like, this would almost certainly have to be a skill/spec_proc.

Please Log in or Create an account to join the conversation.

  • Jan
  • Jan's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 week 3 days ago #6786 by Jan
Jan replied the topic: Ideas for traps/detecting/removing
Could an actual skill remove a room Or obj trigger, If so How ?

Please Log in or Create an account to join the conversation.

  • Jan
  • Jan's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 week 3 days ago - 1 week 3 days ago #6787 by Jan
Jan replied the topic: Ideas for traps/detecting/removing
And what about detecting traps ? Making the skill it self is easy, but having it tell the player when entering a room sense a trap, comming from a trigger ?
Last Edit: 1 week 3 days ago by Jan.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #6791 by Thomas
Thomas replied the topic: Ideas for traps/detecting/removing
As I wrote above, this would have to depend on the kind of trap you are creating.

If you are going the way of having a skill ("create trap"?) that allows you to create an object in the room, this object could have the necessary triggers to handle what you are looking for.

Let's say you have an item "fire trap" with a couple of different triggers.
An enter trigger, which checks the "detect traps" skill of the entering character and sets a variable if it is detected.
An enter trigger, which checks the variable set above. If detected, it performs a dex check or similar to see if any damage should be avoided. It sets the damage factor as a variable.
An enter trigger, which fetches the two variables above, and does the actual damage, if any. Also tells the player if he avoided damage. If the trap is triggered, remove it. If the trap is detected, leave it in the room (it might hit the next guy).
A get trigger, which again checks for the detect traps skill, and conditionally destroys the trap, if the skill is too low.

In this scenario, you can create different traps by tweaking the variables.

Please Log in or Create an account to join the conversation.

  • Jan
  • Jan's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
18 hours 9 minutes ago - 2 hours 43 minutes ago #6806 by Jan
Jan replied the topic: Ideas for traps/detecting/removing
Ok here goes the beginning:

i made ITEM_TRAP and skill sense trap.

then i added case ITEM_TRAP
    switch (GET_OBJ_TYPE(obj)) {
    case ITEM_NOTE:
      if (obj->action_description) {
        char notebuf[MAX_NOTE_LENGTH + 64];

        snprintf(notebuf, sizeof(notebuf), "There is something written on it:\r\n\r\n%s", obj->action_description);
        page_string(ch->desc, notebuf, TRUE);
      } else
        send_to_char(ch, "It's blank.\r\n");
      return;

    case ITEM_DRINKCON:
      send_to_char(ch, "It looks like a drink container.");
      break;

    case ITEM_TRAP:
      if (GET_OBJ_TYPE(obj) == ITEM_TRAP && GET_SKILL(ch, SKILL_SENSE_TRAP > 0)) {
        send_to_char(ch, "You sense a trap.");
      } else
        send_to_char(ch, "You see nothing special..");
      break;

    default:
      send_to_char(ch, "You see nothing special..");
      break;
    }
    break;

  default:
    log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode);

ok it Works, but i would like it to also show description or extra description.

how can i do that ?

Would also be good if different skill % still had a chance to fail giving info.
Last Edit: 2 hours 43 minutes ago by Jan.

Please Log in or Create an account to join the conversation.

Time to create page: 1.245 seconds