Talos Mud Development Blog

One mans quest to blog about Mud Development

Old Code Converted To 3.0

leave a comment »

So I imported my old domain from 2.1.18 all the way up to the current 3.0, but man there are some crazy little changes that occured.  Like new verbs that upset the addactions that I had coded up.  Here’s what I learned:

create an object that uses this code:


OLD CODE: stage.c

static void create() {
    SetShort(“White Dove Inn – Performers Stage”);
    SetLong( (: LongDesc :) );
    SetExits( ([
 “east” : “/domains/talos/whitedoveinn/room/dancefloor2.c”
      ]) );
    SetItems( ([
       : “A pull rope to open and close the curtains.”
      ]) );



New Code: stage.c

  WDI_OBJ”stage_rope.c”: 1,
 ]) );


New Code: stage_rope.c

#include <lib.h>
#include “../whitedoveinn.h”

inherit LIB_DUMMY;
inherit LIB_PULL;

int pullRope(object who);

static void create()
 SetId(({“rope”, “curtain rope” }));
 SetShort(“a curtain rope”);
 SetLong(“A rope used to open and close the curtain.”);
 SetPull( (: pullRope :) );

int pullRope(object who)
 write(“Trying to ‘Pull Rope’\n”);
 return 1;

There are two very important facts here: on the object you need to have the LIB_DUMMY so that it doesn’t show up in the room inventory, and then all you have to do is have your item call the code alread created: environment(this_player())->pull_rope();



Written by Troy

January 18, 2010 at 6:39 am

Posted in Convesions

Tagged with , ,


leave a comment »

So streets are going to be the cornerstone of the urban setting of TalosMUD. Each Street is going to dynamically create the description of the ‘room’ based upon the street type, the buildings contained there. So Right Now we are adding the following functionality to the street_room.c:
void SetStreetName(string StreetName);
void SetStreetLights(int i);
void SetStreetWidth(int i);
void SetRoadType(int i);
void SetGuardRotation(int TimeInterval);
string GetStreetName();
int GetStreetLights();
int GetStreetWidth();
int GetRoadType();
int GetGuardRotation();

int DetermineWealth();
void AddBuilding(string Direction, string BuildingFileName);
void EstablishExits();
void GenerateDescription();
void EstablishLongs();

While we are on the topic of streets it is relevant to talk about what buildings are going to be. They are virtual constructs that will be the lifeblood of the city. The street will call the buildings to determine the descriptions and the longs of the ‘room’

Written by Troy

January 17, 2010 at 4:01 pm