The Mud Connector

Author Topic: Is it possible to build a room to view fights in another room in SMAUG?  (Read 4174 times)

Panchy

  • New to TMC
  • *
  • Posts: 1
    • View Profile
On a game I work on I trying to figure out how to make a room to view fights in without players having a chance to interfere in the fight and possibly heal a fighter. Is this possible at all in the SMAUG/DBS/SWR codebase?

Epilogy

  • Sr. Member
  • ****
  • Posts: 395
    • View Profile
I imagine so.

I'm not a coder... but I'd look at how the imm command snoop works, and try to adapt that somehow.

Dokkar

  • New to TMC
  • *
  • Posts: 13
    • View Profile
I know it's possible in ROM.  And Smaug is close-ish...(I think?) so it should be doable.

Quixadhal

  • Sr. Member
  • ****
  • Posts: 452
    • View Profile
Of course it's possible.  How much effort do you want to put into it?

RahjIII

  • TMC Member
  • ***
  • Posts: 149
    • View Profile
    • The Last Outpost
If you are just trying to 'televise' what goes on in one room into another room, you could try adding a 'sends to room X' field or list onto your room structure, then patch act() so that when it is called with TO_ROOM and it sees a linked room, it also sends a copy of the act message to the players in the linked room.

Alternatively, if you are ok with only televising into adjacent rooms, you could add a new door flag for act() to consider when it is called with TO_ROOM.

You might want to patch your do_look routine to make use of whatever mechanism you choose, in case you want your viewers to be able to look directly at the combatants.
"The Last Outpost"

Hades_Kane

  • TMC Veteran
  • *****
  • Posts: 1295
  • Owner / Administrator of End of Time
    • View Profile
    • End of Time
We did it in ROM fairly easy.

We created an item type that works as a one way or two way, audio, visual, or both, and whether it was the source or target object type to broadcast according to the values, and it was as simple as putting a check in act or send_to_char and related functions to check the room for a source, and if found, check for its target and clone the output to that room.
-Diablos
End of Time, a 100% free Final Fantasy & Chrono Trigger based MUD with a large original world, unique combat & magic systems, and more!
eotmud.com : 4000 • http://www.eotmud.comhttp://www.facebook.com/eotmud
http://www.mudconnect.com/mud-bin/adv_search.cgi?Mode=MUD&mud=End+of+Time

Drizzt1216

  • Sr. Member
  • ****
  • Posts: 279
    • View Profile
    • tbaMUD
Of course it's possible.  How much effort do you want to put into it?

Optimally less effort than it takes to view or respond to an old thread I made.

Oh wait....

Quixadhal

  • Sr. Member
  • ****
  • Posts: 452
    • View Profile
It kinda depends on your game design.  In an LPMUD, rooms usually have an event that fires whenever something happens, so you'd just hook into those events and do them to that room + another target room.

In a DikuMUD, every bit of code usually does its own printing to the players.  So, you'd have to add if() checks to every bit of code that would output to the players to check for a non-empty target room, and have it also mirror to that room's players.

Printing to a room is easy, trapping all instances of things printing to a room is more annoying.

Ateraan

  • TMC Veteran
  • *****
  • Posts: 801
  • New Worlds Ateraan
    • View Profile
    • New Worlds Ateraan
On a game I work on I trying to figure out how to make a room to view fights in without players having a chance to interfere in the fight and possibly heal a fighter. Is this possible at all in the SMAUG/DBS/SWR codebase?
We do this kind of thing on Ateraan with Arena fight viewing from the stands and Leather ball tourneys where you watch the action from the stands.

What I've found, however, depending on your base broadcasting code, you may have to identify what you want the viewer to see and not to see. I don't advise using snoop code as this is low level and might not provide the results you are seeking.
New Worlds Ateraan
www.ateraan.com

AdventuresWithJ

  • New to TMC
  • *
  • Posts: 11
    • View Profile
We have this on the mud i'm active on (Erion). There's a place called "monster colosseum" and you fight monsters, 1 v 1 , progressively for 20 rounds. There is a viewing area for other players to come and watch. Killing each gives you a token you redeem for gear/runes (stat boosting on eq)


On a game I work on I trying to figure out how to make a room to view fights in without players having a chance to interfere in the fight and possibly heal a fighter. Is this possible at all in the SMAUG/DBS/SWR codebase?