SUINEVERE   Sega Saturn Hacks and Homebrew

SATURN LINK : MIDGAARD   GMODIFY
Guides » Running the world » Archon help » G » GMODIFY
GMODIFY
Command : GMODIFY
Usage   : GMODIFY (AREA/ROOM/WORLD/PLAYERS/#TAG) [FIELD=VAL](&&/||[...])
Usage   :         (CHANGE=[FIELD=VAL])
Example : gmodify area class=genmob&&name=the cityguard change=name=the guard
Example : gmodify world class=[cs]GenMob&&name=[ss]city change=name=[ss]
Example : gmodify world class=[cs]GenItem&&name=a rusty sword change=destroy=true
Example : gmodify players charclass=Fighter
Example : gmodify #mytag change=ability=12
Example : gmodify ?
Short(s):
A command to select objects in a an area, some rooms, or the whole world based on the specified field values, and optionally change some of those specified fields.

Searching the entire WORLD is implied, but the first parameter may be the word AREA or ROOM to narrow the search.  You may also enter a hash mark and the name of a TAG to only search tagged objects.

The next parameter is the search criteria.  The key phrase WHEN= may optionally precede it to make explicit that you are specifying the search criteria.  The search criteria fields may be separated by && strings to specify that all of the preceding criteria AND the next single criteria must be true.  The criteria fields may also be separated by || strings to specify that all of the preceding criteria OR the next single criteria may be true.  One of those strings must be present when specifying more than one criteria.

Each field in the search criteria must be of the form FIELD=VALUE, FIELD!=VALUE, FIELD$VALUE, FIELD>VALUE, FIELD<VALUE, FIELD>=VALUE, or FIELD<=VALUE.  Where FIELD must be a valid search field.  Enter GMODIFY ? for a complete list of all valid fields.  Not all fields will apply to all object types, so take this into account especially when using < or != operators.  The operators are all normal except for the new one, $, which means that the value is really a regular expression. The VALUE portion of the criteria may be prefixed with modifiers, which include: 
[ss]val to specify that the value refers to a substring of the fields whole value.
field[ss] to specify that the field value may match a substring of the given value.
[cs] to specify that the search is case sensitive (case insensitive is implied).

The last parameter is the optional change specifications.  These specifications must be prefixed with the key phrase CHANGE=.  If these specifications are not included, GMODIFY will display the results of the search.  The change specifications are similar to the search criteria in that they consist of groupings of FIELD=VALUE separated by && strings.  Unlike search criteria, however, operators other than =, and strings other than || have no special meaning.  The fields, like in the search criteria, must be valid fields for the options selected by the search criteria.  A special field name "DESTROY", when set to true, will obliterate the item in question.  Otherwise, the ordinary fields on the object will be changed to the specified value UNLESS the following conditions are met: the VALUE portion of a field is prefixed with the modifier [ss], and the VALUE portion of an identical field in the search criteria was also prefixed with the modifier [ss].  Under those special conditions, instead of substituting the entire field value on the object with the new value, ONLY the portion of the string selected in the search criteria will be substituted.

* Be very careful with this command! It is wise to try the command WITHOUT change= ... first, to make sure you are matching Exactly what you expect, before doing a change pass.
[guides] [handbook] [races] [classes] [world] [levels] [help] [search] [home] [play]