setting room flags via triggers

  • rudeboyrave
  • rudeboyrave's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 2 weeks ago #8305 by rudeboyrave
setting room flags via triggers was created by rudeboyrave
is there a way to set a room flag on or off using dg?

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

  • rudeboyrave
  • rudeboyrave's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 1 week ago #8312 by rudeboyrave
Replied by rudeboyrave on topic setting room flags via triggers
The reason i ask is that if we could get a function to do this i think i can set up roguelike random generated areas using dg. if anyone could help with this it would be great

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
2 months 1 week ago #8313 by Sascha
Replied by Sascha on topic setting room flags via triggers
Do you mean like changing/adding/removing room flags randomly so you could have INDOOR and then a player moves east and it generates a random room with a random flag, random exits, etc? Kind of creating an open world concept where no two players would have exactly the same map? Or are you envisioning something else?

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

  • rudeboyrave
  • rudeboyrave's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 1 week ago #8314 by rudeboyrave
Replied by rudeboyrave on topic setting room flags via triggers
in my implementation when the player is created he will start in a room with a lever.

when he pulls that lever the zone will generate and his dungeon door will open.
the dungeon will consist of 10+ dungeon and hall rooms, a boss door, treasure rooms, trap rooms.
this is where i need to use dg scripts to assign a new room flag i made ROOM_ASSIGNED so that the mud will know that this room is not to be touched until the area is completed by the player, and the flag is removed.

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
2 months 1 week ago #8315 by Parnassus
Replied by Parnassus on topic setting room flags via triggers
I guess the next question then is: untouched by what? If you make the zone no-reset, then the game itself won't touch the zone ever and you'll need to set a trigger to make the zone reset or appear to reset.

My tarot zone sets up a small area just for one player and if you look at the triggers, they do all sorts of weird stuff to try to make sure nobody interferes but also that nobody can 'hog' the set of rooms. There's also a trigger to clear the rooms when no longer needed.

I have a maze zone in progress on the buildport which triggers a layout and resets the zone when a new maze is needed. There's more information on that here . I haven't worked on it lately because it's mostly slog work needed now so I'm not sure what sort of shape it's in.

If you're thinking that you want the player to be able to go in and out of the small section, how about making a 'key' item to allow that player access but nobody else can get in. Tarot has 3 private sections but it seems that you might want, say... 4 or 5 sections depending on how many treasure rooms and so on that you need. If you keep the 'keys' in one room, find obj will show if a key is missing and that section cannot be accessed by any other player. If all 'keys' are gone, nobody else can play the zone until an earlier player finishes and returns it.

I say 'key' because it should not actually BE a key-type but a treasure or trash in key form.

I'm not sure if this is what you're looking for but if not, please let me know. Now that my brain is on this, I could probably make another unfinished zone along those lines myself :)

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

  • rudeboyrave
  • rudeboyrave's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 1 week ago #8316 by rudeboyrave
Replied by rudeboyrave on topic setting room flags via triggers
by untouched i mean that the room itself will not be assigned to another players dungeon should the lever (to generate a dungeon) be pulled for another players run.

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
2 months 1 week ago #8317 by Parnassus
Replied by Parnassus on topic setting room flags via triggers
My zones were relatively easy because the rooms are already attached but it sounds like you're using a more complicated method of making the rooms and and attaching them randomly which leads to much more flexibility.

My tarot deck uses 78 cards and the shuffle checks each random card to see if it's already in use. The main difference is that each player uses a different set of cards so the vars just attach themselves to each virtual deck. The problem is going to be finding where to attach your vars.

I think it should be possible to do this using a room trigger in some sort of waiting room or a mob trigger on a receptionist in the waiting room. Place a var of the room number on the trigger and have the trigger go though all available rooms and check for a var.

Actually, even easier would probably be treating it more like the maze. When the player starts, attach the rooms with exits. When the player has finished, remove all exits in that players set of rooms. This can be done using the 'key' to hold the room number vars. When a new player enters, check each random room for an exit. If an exit exists, check the next random room until you find one with no exits. This would cut down the list of vars in one place since you'd only have a limited set on each key rather than one set trying to keep track of the whole zone.

The keeping track of the whole zone thing is a whole different problem. The thing that comes to my mind is work out how many people can use the zone and keep track of the used rooms in the first section. When that section is used up, any other players would get the message that they can't enter. You might be able to save some room vnums by making a few halls that any player can enter but with exits that only the player with the matching 'key' can enter. Or, hey, how about a trigger that teleports the player from the hall to the next room vnum var on the 'key'. This can look a bit messy because they enter one room to find themselves in another room but that can be cut down by making a throw-away room that looks exactly like the one they entered except the exit will lead somewhere else.

After this example of how my brain works, aren't you glad you don't do DG anymore? :)

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

Time to create page: 1.350 seconds