DESOLATION

Help manual · Example Code

Vehicles

Vehicles

Vehicles are pretty simple. Just inherit VEHICLE;, and then plug in messages for each different type of message listed. Like.

 inherit VEHICLE;

 void setup() {
       //Your id's.
       set_id("motorcycle%^RESET%^","bike","harley","dyna wide
       glide","dyna","hog","cycle","motorcycle");
       
       //Your adjectives.
       set_adj("%^BBLACK%^harley-davidson");
        
       //The desc you want the people riding the vehicle to be seen in.
       set_riding_in_room_desc("%^BBLACK%^Mounted atop a black, 
       %^RESET%^%^ORANGE%^junk-scavenged%^RESET%^ %^BWHITE%^harley 
       %^BBLACK%^motorcycle, $N leans back in his seat.%^RESET%^\n");
       
       //What the vehicle looks like unattended.
       set_empty_in_room_desc("%^BBLACK%^A %^RESET%^%^ORANGE%^junk-scavenged%^BBLACK%^ 
       harley davidson with a %^BRED%^red%^BWHITE%^-%^RESET%^%^BRED%^cross%^RESET%^%^BBLACK%^ 
       on it's tank sits tilted on it's kickstand here.%^RESET%^\n");
       
       //The sound of the vehicle arriving. Note $o is the vehicle, and $o1 
       is the direction you're arriving from.
       
       set_vehicle_arrive_message("An unmistakable sound is heard as a $o $vcruise 
       into the room from the $o1.");
       
       //The sound of the vehicle leaving. $o is the vehicle, $o1 is the direction 
       you're going to.

       set_vehicle_leave_message("The sound of american thunder reverberates as 
       the harley zooms off to the $o1.");
       
       //The message it makes when someone slows your vehicle.
       set_brake_message("$N $vpush down on the front foot and $vpull down handbrake, 
       slowing the bike.");

       //The message it makes when someone speeds your vehicle up.
       set_accelerate_message("$N $vroll the right handlegrip, sending the bike 
       speeding forward with a roar.");

       //The message it makes when someone downshifts the vehicle. Gear is important 
       because in controls how many rooms scroll by at a time. $o1 is 1st, 2nd, 3rd, etc.
       set_shift_down_message("$N $vdownshift with your left foot into $o1 gear.");

       //Upshift message.
       set_shift_up_message("$N $vshift into the $o1 gear.");

       //The inevitable crash message.
       set_crash_message("The bike slams into the hard surface, sending it's riders flying.");

       //The slow-moving or idle message of the vehicle.
       set_idle_message("The harley idles with a deep, throaty, 'potatopotatopotato' sound.");

       //The cruising random message of the vehicle.
       set_cruising_message("The harley's motor roars a steady, throaty beat in mid-range.");

       //The really as-fast-as-you-damn-well-please moving message of the vehicle.
       set_speeding_message("The massive motor purrs loudly, giving all it's got.");

       //The steering message. $o1 is the direction.
       set_steering_message("$N $vlean $p harley to the $o1.");

       //Rev message. Flavor text, essentially.
       set_rev_message("$N $vrev $p engine, and every one of the 103 cubic inches 
       scream in a primal roar of power.");
       
       set_long("Your long desc");
       set_default_relation("on");

       //For every 270 units, you can hold a person. (A little less actually, 
       but I add some spare room.)
       set_max_capacity((270*2),"on");

       //Not gettable anyway...
       set_size(LARGE);

       //You can add your own objects here, like saddlebags or trunks.
       set_objects( ([
       "rsaddlebag" : 1,
       "lsaddlebag" : 1,
       "tank" : 1,
       ]) );
 }

Category:Example Code