The Mud Connector

Author Topic: Creating Predefined Room Layouts in CircleMUD  (Read 874 times)

Gicker

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • d20MUD: Star Wars
Creating Predefined Room Layouts in CircleMUD
« on: June 11, 2018, 12:28 PM »
Hello all,

I'm wondering if any CircleMUD/TBAMUD coders out there can help me with some thing I'm looking to do.

The code is for my Star Wars d20MUD game, to automate the creation of new ships, which currently requires a staff member to set up.

Essentially, I want to allow a single command create a predefined room structure, with exits and room descriptions.  Basically I want to copy an existing ship layout to a new set of rooms.  I can create the 'new rooms' ahead of time, but it would be even better if the code could create new vnums itself.

So, for example, say the player wants to buy a YT-1300 (Millenium Falcon ship type) and the interior of the ship has a layout along the lines of a central room, with exits to the sw, s, se and ne.  I'd like the command to create that exact room structure, including the room descriptions and titles.

The main obstacle I'm having is how to create and link the new rooms.

Anyone out there have some advice on this?

Thanks and all the best,

Gicker
d20MUD Star Wars: Role Play, PvE & PvP using d20 and SAGA rules
www.d20mud.com d20mud.com port 6000

4th Age Dragonlance Role Play & Adventure
ageofdragons.com port 4000

Darkozx

  • Sr. Member
  • ****
  • Posts: 427
  • Owner of Dragonball Evolution
    • View Profile
Re: Creating Predefined Room Layouts in CircleMUD
« Reply #1 on: June 11, 2018, 3:24 PM »
If all else fails, set up a macro to build it and pass on that macro to any of your builders.
Dragonball Evolution, the longest running DBZ MUD online!
Address: evolution.wolfpaw.net
Port: 1874
Website: www.dbemud.com

Gicker

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • d20MUD: Star Wars
Re: Creating Predefined Room Layouts in CircleMUD
« Reply #2 on: June 11, 2018, 3:27 PM »
If all else fails, set up a macro to build it and pass on that macro to any of your builders.

Yeah, that's  good backup plan, thanks for the suggestion!
d20MUD Star Wars: Role Play, PvE & PvP using d20 and SAGA rules
www.d20mud.com d20mud.com port 6000

4th Age Dragonlance Role Play & Adventure
ageofdragons.com port 4000

Epilogy

  • Sr. Member
  • ****
  • Posts: 335
    • View Profile
Re: Creating Predefined Room Layouts in CircleMUD
« Reply #3 on: June 11, 2018, 4:21 PM »
Wouldn't it be more forward thinking to store such instructions on the server, in such a way that if you want to edit a layout, it will be able to affect all currently existing ships as well? Also sounds like you'd need a way to handle vnums when linking rooms, if I understand right that you'd have a simple dig script for each. I mean when it comes to, say, linking the 4th room to the first if you built a square loop. Not impossible, but not the sort of thing I'd want left open to human error.

Gicker

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • d20MUD: Star Wars
Re: Creating Predefined Room Layouts in CircleMUD
« Reply #4 on: June 11, 2018, 5:29 PM »
Well, in line with Darkozx's suggestion, my thought was to create a single command that called other commands with the appropriate arguments passed along, depending on ship type, so there'd be no space for human error (beyond my own in setting it up).

I wouldn't want to modify existing ships, as some players have custom descs and player housing set up inside their ships.
d20MUD Star Wars: Role Play, PvE & PvP using d20 and SAGA rules
www.d20mud.com d20mud.com port 6000

4th Age Dragonlance Role Play & Adventure
ageofdragons.com port 4000