GENERATE(Builder)

From CoffeeMud Wiki
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    
===GENERATE===
Usage: GENERATE "OBJ TYPE" "ID" (FROM "FILENAME") ("VAR"="VAL"...) ("DIRECTION")
Examples: generate area maze_dungeon from randareas/example.xml areasize=50 "areaname= the test" level_range=10?20 aggrochance=50 theme=kobolds south

generate string list

Shorts:
Description: This command uses an xml file to generate random content for your mud. This content can be anything from whole areas, to rooms, mobs, items, or simple strings. By default, the content is built from the file in resources/randareas/example.xml, though the builder may specify his or her own xml file path as one of the many arguments. The arguments, briefly, are:
  • OBJ TYPE: One of the following: AREA, ROOM, MOB, ITEM, or STRING.
  • ID : one of the "id" xml attributes defined on any tag in the XML file. Use GENERATE STRING LIST for a list of all "id" attributes defined in your file.
  • FROM "F": An optional argument to specify your own xml file, with the resources directory being the default root.
  • VAR=VAL : One or more variables and their definitions. Many tags will have a specific set of required variables which must be defined in order for the content to be generated. Failing to specify one of the required variables will cause an error message listing the variables which must be defined, and the type of data required for the variable. Variable types which list numbers as their data types may also have math expressions values (so you can use random numbers). See the help on MATH EXPRESSION for more information on this. In addition to required variables, you may also use the space to enter one or more "override" values. Many object fields (such as LEVEL for mobs and items, or NAME, etc) as well as the XML id tags, can have their "random" values overridden by defining them using the generate command. If you need to use a space in a variable value, enclose the ENTIRE definition in quotes, such as "areaname=the dungeon" instead of areaname="the dungeon".
  • DIRECTION: This applies only to ROOM and AREA object types. The object, if successfully generated, will be linked to the current room that the player is standing in, in the direction they specify.

In closing, the GENERATE command is an interesting way to deliver large amounts of dynamic content for your world, though it can never replace the caring touch of a real, creative builder. If anyone is interested in writing their own xml content, please open up the /resources/randareas/example.xml file and begin reading. Use that file as an example on how to construct your own.

Notes

.