Softcode commands

From Serenity : The Wiki
Jump to: navigation, search

This page contains several softcode commands that players might find useful.

Code Conventions

  1. We are storing commands in tree structures rather than keeping everything visible in the 'ex me'. This decreases the level of clutter when looking through the attribute list.
    1. Each group of commands should have it's own branch off of 'cmd'.
    2. For those not familiar with branches, make sure to use the '`' (that's the character under the '~' on most keyboards) character between levels of commands: ie - cmd`group`command
  2. When using the attr tree to store data, use branches that have the same root name as the command group.
    1. &shuttle`data me=4 rather than &shuttle_data me=4.

Flying Commands

A collection of commands to help you pilot a spaceship.

 &cmd`pilot`course  me=$course * to *:@fo me=start %0;@fo me=stop at %1;@fo me=proximity/on;@fo me=plot

Usage: course <start> to <end>

 &cmd`pilot`cruise`set me=$cruise/set *=*:@set me=pilot`speed`%0:%1

Usage: cruise/set <ship>=<speed>

 &cmd`pilot`cruise`ship me=$cruise/ship *:@set me=pilot`ship:%0

Usage: cruise/ship <default ship>

 &cmd`pilot`cruise me=$cruise:@fo me=ss [v(pilot`speed`[v(pilot`ship)])]

Usage: cruise

 &cmd`pilot`cruise2 me=$cruise *:@fo me=ss [v(pilot`speed`%0)]

Usage: cruise <ship>

 &cmd`pilot`flank me=$flank:@fo me=ss [v(pilot`speed`[v(pilot`ship)])];@fo me=afterburn

Usage: flank

 &cmd`pilot`flank2 me=$flank *:@fo me=ss [v(pilot`speed`%0)];@fo me=afterburn

Usage: flank <ship>

 &cmd`pilot`brake me=$brake:@fo me=noburn;@fo me=ss 0

Usage: brake

Equipment Commands

put

This command allows you to use the more natural 'put <object> in <container>' rather than using the give command.

 &cmd`put me=$put * in *:@fo me=give %1=%0;

getl

If you're like me, you can never remember how to get things from your locker and have to do 'loc help' every other time. This reduces it to an easily remembered command.

 &cmd`getl me=$getl *:@fo me=loc remove %0;

getb

Exactly like the locker command, but this one works for backpacks. NOTE: Backpacks are being phased out.

 &cmd`getb me=$getb *:@fo me=remove %0;

fget

This command combines the getl and getb functions, this will get an object from either a backpack or a locker;

 &cmd`fget me=$fget * from *:@switch/all [first([lcstr([name(%1)])])]=backpack,@fo me=remove %0,storage,@fo me=loc remove %0

Arm/Disarm

A more complex series of commands allowing your to set a default weapon and it's armed/disarmed modes. Note the multiple modes for arm & disarm. NOTE: The Virtual Object System updates have been made. Also per River, this code probably won't be allowed in an actual fight, equipping and toggling would be 2 separate actions in 2 rounds.

 &cmd`arm`default me=$arm/default *=*/*:@set me=arm_weapon:%0;@set me=arm_mode:%1;@set me=disarm_mode:%2

Usage: arm/default <weapon>=<armed mode>/<disarmed mode>

 &cmd`arm`arm me=$arm:@fo me=+equip [v(arm_weapon)];@wait 0=@fo me=+toggle [v(arm_mode)]

Usage: arm Note that arm/default must be set before this command will work

 &cmd`arm`arm2 me=$arm *=*:@fo me=+equip %0;@wait 0=@fo me=+toggle %1

Usage: arm <weapon>=<mode>

 &cmd`arm`disarm me=$disarm:@fo me=+toggle [v(disarm_mode)];@wait 0=+unequip [v(DSS_WEAPON)]

Usage: disarm Note that arm/default must be set before this command will set the mode properly.

 &cmd`arm`disarm2 me=$disarm *:@fo me=+toggle %0;@wait 0=+unequip [v(DSS_WEAPON)]

Usage: disarm <mode>

VOS object descriptions

The new VOS system doesn't allow you to set permanent descriptions for objects via the &desc_<item dbref> me=<short desc> method. The descriptions set by +set/location disappear when you drop or store items. Wile we can't make the system automatic, we can simplify re-labeling them:

 &cmd`gear`set me=$gear/set *=*:@set me=gear`%0:%1
 &cmd`gear`reset me=$gear/reset *=*:@fo me=+set/location %0=[v(gear`%1)]

Using gear/set <label>=<description> creates a permanent attribute on your character. You can use anything you want for <label>, but it should be something relevant - 'pocket' for 'Stored in a pocket', or 'duster' for 'A battered armored duster that's seen better days'.
Gear/reset <vos #/name>=<label> will reset your equipment to the same description each time <label> is used. Nowhere near as convenient as the DBref system, but slightly better than re-descing all of your weapons each time you visit the bar.

Invdesc

A somewhat different approach to the problem addressed in the previous section.

 &cmd`invdesc me=$invdesc:@dolist/delim ` [iter(lattr(me/inv`*),[last(##,`)]=[v(##)], ,`)]=+set/location ##

If there's an object you wanna describe, you use '&inv`<item> me=<desc>'. For example, I might desc my peacemaker with '&inv`peacemaker=An old Colt Peacemaker holstered at his left hip.' When I drop the item and pick it back up (or do anything else that causes me to lose the location), I just run 'invdesc' and everything is set the way it should be.

Miscellaneous Commands

ezshuttle

This allows you to type 'ezshuttle <planet>' to shuttle to any planet. No more looking up which number to type into the '+shuttle' command. When traveling to a hub world (Persephone, Londinium, or Ezra) you need to tack the letter of the shuttle console you wanna use at the end of the command. For example, if I'm in the core, I can shuttle to Osiris by going to the platform and typing 'ezshuttle osiris'. But to reach Persephone, I'd type 'ezshuttle persephonea'. Currently the command only works for core and border worlds. I'll add rim later.

 &cmd`ezshuttle me=$ezshuttle *:@fo me=switch(%0,ariel,+shuttle-a 1,bernadette,+shuttle-a 2,londiniuma,+shuttle-a 3,osiris,+shuttle-a 4,sihnon,+shuttle-a 5,persephonea,+shuttle-a 6,ezraa,+shuttle-a 7,beaumonde,+shuttle-b 1,bellerophon,+shuttle-b 2,boros,+shuttle-b3,ezrab,+shuttle-b 5,hera,+shuttle-b 6,londiniumb,+shuttle-b 7,new melbourne,+shuttle-b 8,newhall,+shuttle-b 9,paquin,+shuttle-b 10,persephoneb,+shuttle-b 11,santo,+shuttle-b 12,verbena,+shuttle-b 13,yinyang,+shuttle-b 14,th Not a valid planet)

shuttle

This is an alternative to ezshuttle. Here we are using the attribute tree structure like a database to store route information rather than code it into a switch. Note that multi word planets like 'New Melbourne' use an '_' between the words.

 &shuttle`a`ariel me=1
 &shuttle`a`bernadette me=2
 &shuttle`a`londinium me=3
 &shuttle`a`osiris me=4
 &shuttle`a`sihnon me=5
 &shuttle`a`persephone me=6
 &shuttle`a`ezra me=7
 &shuttle`b`beaumonde me=1
 &shuttle`b`bellerophon me=2
 &shuttle`b`boros me=3
 &shuttle`b`dyton me=4
 &shuttle`b`ezra me=5
 &shuttle`b`hera me=6
 &shuttle`b`londinium me=7
 &shuttle`b`new_melbourne me=8
 &shuttle`b`newhall me=9
 &shuttle`b`paquin me=10
 &shuttle`b`persephone me=11
 &shuttle`b`santo me=12
 &shuttle`b`verbena me=13
 &shuttle`b`yinyang me=14
 &shuttle`c`angel me=1
 &shuttle`c`athens me=2
 &shuttle`c`beylix me=3
 &shuttle`c`ezra me=4
 &shuttle`c`greenleaf me=5
 &shuttle`c`haven me=6
 &shuttle`c`higgins_moon me=7
 &shuttle`c`ita_moon me=8
 &shuttle`c`jiangyin me=9
 &shuttle`c`lilac me=10
 &shuttle`c`londinium me=11
 &shuttle`c`persephone me=12
 &shuttle`c`regina me=13
 &shuttle`c`silverhold me=14
 &shuttle`c`triumph me=15
 &shuttle`c`st_albans me=16
 &shuttle`c`whitefall me=17
 &shuttle`c`whittier me=18
 
 &cmd`shuttle`route me=$shuttle/* *:@fo me=switch([v(shuttle`%0`%1)],>0,@fo me=+shuttle-%0 [v(shuttle`%0`%1)],think That is not a valid destination on the [ucstr(%0)] route.)

Usage: shuttle/<route> <planet>

 &cmd`shuttle`noroute me=$shuttle *:@fo me=switch([v(shuttle`a`%0)],>0,@fo me=+shuttle-a [v(shuttle`a`%0)],switch([v(shuttle`b`%0)],>0,@fo me=+shuttle-b [v(shuttle`b`%0)],switch([v(shuttle`c`%0)],>0,@fo me=+shuttle-c [v(shuttle`c`%0)],think That is not a valid destination on any route.)))

Usage: shuttle <planet> - note Londinium, Ezra, and Persephone will always try to take shuttle a. If there is no shuttle a console, use the shuttle/<route> <planet> version.

goout

Many ships have a hatch that requires you to 'go hatch' then 'disembark'. We can reduce that to a single command:

 &cmd_goout me=$goout:@fo me=hatch;@fo me=disembark;