Index of /quest/linux/

NameLast ModifiedSize
UpParent Directory
Directorysrc2023-03-19 02:02-
[CMP]quest-item-gen-1.2.tar.gz2023-03-19 02:02 11k
QUESTCORE ITEM GENERATOR ------------------------ Version 1.2 2/16/2021 http://www.centaur.pw <jon@centel.cc> ABOUT ----- This is an interactive program for use with a LambdaMOO server running the QuestCore2 database to generate script files used to create weapons, ammunition, armor, food, and monsters. Script files can be read directly into the server. Download QuestCore2 : http://www.centaur.pw/questcore/QuestCore2.db.gz Download LambdaMOO : http://www.centaur.pw/satyr/lmc-night.tar.gz QuestCore Manual : http://www.centaur.pw/questcore/QuestCore_Manual.txt TABLE OF CONTENTS ----------------- 1. Compiling & Installation 2. Command Line Parameters 3. Menu Interface 4. Weapon Generator 5. Ammunition Generator 6. Armor Generator 7. Food Generator 8. Monster Generator 9. Script Usage 1. COMPILING & INSTALLATION --------------------------- To compile the 'quest' binary: $ make To move the 'quest' binary to /usr/bin and copy the manual page file 'quest.7.gz' to /usr/share/man/man7: $ make install To remove the object files generated by make: $ make clean To delete the installed binary and manual: $ make uninstall 2. COMMAND LINE PARAMETERS -------------------------- If 'quest' is invoked with a parameter, it will begin creating a new item based on the parameter. This may be a weapon, armor, food, or monster item. Accepted parameters are: weapon (or w) armor (or a) food (or f) monster (or m) Examples: $ quest weapon $ quest w $ quest armor $ quest a $ quest food $ quest f $ quest monster $ quest m The program will terminate when it is finished creating the item. When invoked with no parameter, the program will start in the menu interface. See the final paragraph in the next section for information on setting the output file. 3. MENU INTERFACE ----------------- The program remains in the menu interface until the 'quit' (or 'q') command is received. 'quest' only starts in the menu interface when invoked with no argument, e.g.: $ quest The commands available in the menu function are the same as the parameters accepted by the program when invoked: w - Create weapon o - Create ammo a - Create armor f - Create food m - Create monster q - Exit program Each command may also be typed in long form, as 'weapon', 'armor', 'food', 'monster', and 'quit' respectively. The 'help' (or '?') command can be used within the menu interface to display the menu. This is also displayed when pressing [Enter] without a command. You will be prompted for a file name. Files are only created or appended to; they are never overwritten. For each different type of item, the default file displayed at the prompt may be used by pressing [Enter]. If a full path is not provided, the file is created or opened in the current working directory. 4. WEAPON GENERATOR ------------------- The following information is prompted for when creating a weapon: Weapon Name - The name of the weapon Global Variable Name - The property to be created on #0 for the new object Description - A description of the weapon, up to 128 characters Projectile - Set to 0: Melee weapon; no ammunition required - Set to 1: Projectile weapon requiring ammunition Ammo - Object number of the ammunition parent needed for the weapon Maximum Load - Maximum number of rounds the weapon can contain (Ammo and Maximum Load are only prompted for if Projectile is set to 1.) Action String - The verb shown in text when attacking with the weapon, e.g. 'swing' will set the verbage to " %<swings> %p %D at ", where %p is the player's possessive pronoun and %D is the name of the weapon For example: Centaur swings his Long Sword at Goblin. Damage - The damage done by the weapon must be a decimal, e.g. 2.0, 3.5 Can Stun - Set to 0: Weapon cannot stun; Set to 1: Weapon can stun Can Paralyze - Set to 0: Weapon cannot paralyze; Set to 1: Weapon can paralyze Value - The value in gold of the weapon must be a decimal, e.g. 15.0, 33.5 Example (Melee) --------------- The following input for each of the prompts: Weapon Name: Short Sword Global Variable Name for #0: shortsword Description: A short sword made of steel. Projectile: 0 Action String: swing Damage (decimal): 3.5 Can Stun (0 or 1): 1 Can Paralyze (0 or 1): 0 Value (decimal): 15.0 will generate and append the following script to the output file: @create $weapon named Short Sword @desc Sho as A short sword made of steel. @set Sho.shoots to 0 @set Sho.usage_verbage to " %<swings> %p %D at " @set Sho.damage_base to 3.5 @set Sho.can_stun to 1 @set Sho.can_paralyse to 0 @set Sho.value_base to 15.0 @chmod Sho rf ;add_property(#0, "shortsword", max_object(), {player, "rc"}) ;move($shortsword, $nothing) @kgen $shortsword Example (Projectile) -------------------- The following input for each of the prompts: Weapon Name: Long Bow Global Variable Name for #0: longbow Description: A curved wooden long bow. Projectile (0 or 1): 1 Ammo (#obj): #275 Maximum Load: 1 Action String: shoot Damage (decimal): 8.0 Can Stun (0 or 1): 1 Can Paralyze (0 or 1): 0 Value (decimal): 20.0 will generate and append the following script to the output file: @create $weapon named Long Bow @desc Lon as A curved wooden long bow. @set Lon.shoots to 1 @set Lon.ammo_type to #275 @set Lon.max_load to 1 @set Lon.shoot_verbage to " %<shoots> %p %D at " @set Lon.projectile_dam to 8.0 @set Lon.can_stun to 1 @set Lon.can_paralyse to 0 @set Lon.value_base to 20.0 @chmod Lon rf ;add_property(#0, "longbow", max_object(), {player, "rc"}) ;move($longbow, $nothing) @kgen $longbow 5. AMMUNITION GENERATOR ----------------------- The following information is prompted for when creating ammunition: Ammo Name - The name of the armor Global Variable Name - The property to be created on #0 for the new object Description - A description of the ammunition, up to 128 characters Rounds - Number of rounds before the object is depleted Value - The value in gold of the ammunition must be a decimal Example ------- The following input for each of the prompts: Ammo Name: Quiver of Arrows Global Variable Name for #0: arrow_quiver Description: A leather quiver for carrying arrows on one's back. Rounds: 12 Value (decimal): 8.0 will generate and append the following script to the output file: @create $ammo named Quiver of Arrows @desc Qui as A leather quiver for carrying arrows on one's back. @set Qui.rounds to 12 @set Qui.value_base to 8.0 @chmod Qui rf ;add_property(#0, "arrow_quiver", max_object(), {player, "rc"}) ;move($arrow_quiver, $nothing) 6. ARMOR GENERATOR ------------------ The following information is prompted for when creating armor: Armor Name - The name of the armor Global Variable Name - The property to be created on #0 for the new object Description - A description of the armor, up to 128 characters Body Area - Part of the body the armor is worn on, e.g. 'torso' Armor - Armor bonus provided by the armor must be a decimal Value - The value in gold of the armor must be a decimal Example ------- The following input for each of the prompts: Armor Name: Leather Armor Global Variable Name for #0: leather Description: A suit made of several layers of thick leather. Body Area: body Armor (decimal): 3.0 Value (decimal): 20.0 will generate and append the following script to the output file: @create $clothing named Leather Armor @desc Lea as A suit made of several layers of thick leather. @set Lea.body_area to "body" @set Lea.armor to 3.0 @set Lea.value_base to 20.0 @chmod Lea rf ;add_property(#0, "leather", max_object(), {player, "rc"}) ;move($leather, $nothing) @kgen $leather 7. FOOD GENERATOR ----------------- The following information is prompted for when creating food: Food Name - The name of the food Global Variable Name - The property to be created on #0 for the new object Description - A description of the food, up to 128 characters Units - Number of times the food can be consumed Solid - Set to 0: liquid (uses 'drink'); Set to 1: solid (uses 'eat') Heals - Life healed when the food is consumed must be a decimal Value - The value in gold of the food must be a decimal Example ------- The following input for each of the prompts: Food Name: Bread Global Variable Name for #0: bread Description: A small loaf of bread. Units: 2 Solid (0 or 1): 1 Heals (decimal): 3.0 Value (decimal): 2.0 will generate and append the following script to the output file: @create $food2 named Bread @desc Bre as A small loaf of bread. @set Bre.units to 2 @set Bre.solid to 1 @set Bre.healing to 3.0 @set Bre.value_base to 2.0 @chmod Bre rf ;add_property(#0, "bread", max_object(), {player, "rc"}) ;move($bread, $nothing) 8. MONSTER GENERATOR -------------------- The following information is prompted for when creating a monster: Monster Name - The name of the monster Global Variable Name - The property to be created on #0 for the new object Description - A description of the monster, up to 128 characters Spawn Message - Message displayed when the monster spawns, e.g. '%N wanders nearby.', where %N is the name of the monster For example: Orc wanders nearby. Death Message - Message displayed when the monster dies, e.g. '%N dies.', where %N is the name of the monster For example: Orc dies. Strength - Strength stat of the monster; integer or decimal Dexterity - Dexterity stat of the monster; integer or decimal Intelligence - Intelligence stat of the monster; integer or decimal Health - Health stat of the monster; integer or decimal Combat - Combat skill of the monster; integer or decimal XP - Experience points gained by killing the monster must be an integer Gold - Gold gained by killing the monster must be a decimal Hostility - Hostility of the monster must be an integer between 0 and 6: 0: does not attack 1: returns attack 2-6: aggressive; higher number increases aggression level Natural Defense - Natural (unarmed) weapon of the monster must between 0 and 2: 0: bite 1: claw 2: hand Can Wander - Set to 0: monster cannot move; Set to 1: monster can move Picks Up Items - Set to 0: monster will not pick up items; Set to 1: monster will pick up nearby items Can Be Eaten - Set to 0: monster cannot be eaten; Set to 1: monster can be eaten Magic Immunity - Set to 0: monster is not immune to magic; Set to 1: monster is immune to magic Health From Eating - Life gained from eating the monster must be a decimal (This is only prompted for if 'Can Be Eaten' is set to 1.) Rot Time - Time until the dead monster disappears given in seconds must be an integer Respawn Time - Time until the dead monster respawns given in seconds must be an integer Weapons - List of object numbers of weapons a monster can use, e.g. '#301, #302, #303' with each object being a weapon parent Example ------- The following input for each of the prompts: Monster Name: Orc Global Variable Name for #0: orc Description: An ugly green and pig-like humanoid. Spawn Message: %N wanders nearby. Death Message: %N dies. Strength: 13 Dexterity: 8.5 Intelligence: 6.0 Health: 14 Combat: 1.4 XP: 30 Gold (decimal): 1.0 Hostility (0 to 6): 4 Natural Defense (0 to 2): 2 Can Wander (0 or 1): 0 Picks Up Items (0 or 1): 1 Can Be Eaten (0 or 1): 1 Magic Immunity (0 or 1): 0 Health From Eating (decimal): 1.0 Rot Time (seconds): 25 Respawn Time (seconds): 35 Weapons: (#obj1, #...): #301, #302, #303 will generate and append the following script to the output file: @create $monster named Orc @desc Orc as An ugly green and pig-like humanoid. @birth_msg Orc is "%N wanders nearby." @death_msg Orc is "%N dies." @str Orc is 13 @dex Orc is 8.5 @int Orc is 6.0 @hea Orc is 14 @com Orc is 1.4 @set Orc.exp to 30 @set Orc.startmoney to {{"gold", 1.0}} @set Orc.money to {{"gold", 1.0}} @set Orc.hostility to 4 @set Orc.natural_def to 2 @set Orc.wander_ok to 0 @set Orc.greedy to 1 @set Orc.edible to 1 @set Orc.magic_immunity to 0 @set Orc.eat_heal to 1.0 @set Orc.rot_time to 25 @set Orc.gestate to 35 @set Orc.weapon_types to {#301, #302, #303} @chmod Orc rf ;add_property(#0, "orc", max_object(), {player, "rc"}) ;move($orc, $nothing) @kgen $orc 9. SCRIPT USAGE --------------- The files generated on the machine can be viewed in any editor, and copied and pasted into a terminal window connected to a QuestCore2 database. If the file is on the same machine as the server in a directory accessible by the server, a new command may be added to load it directly into the server. Loading files will require the File Utilities Package version 1.8 or higher. This is included in the link for the server software in the ABOUT section of this file. Add a property to the user which will point to a directory: @prop $wiz.pwd "/srv/questcore2" Add a verb called @getfile (or @getf) for use by wizards: @verb $wiz:@getf*ile any any any rxd #2 Set the code for the new command: @program $wiz:@getf if (length(args) != 2 && length(args) != 1) return player:tell("Usage: ", verb, " [path] <file>"); endif if (length(args) == 2) path = args[1]; file = args[2]; elseif (length(args) == 1) path = player.pwd; file = args[1]; endif if (!fileexists(path, file)) return player:tell("File not found."); endif for x in (fileread(path, file)) force_input(player, x); endfor . If the command was programmed successfully, you can load a script file on the same machine as the server directly using @getfile. Example ------- @getfile Orc @getfile /home/centaur/scripts ShortSword Note: If a directory is provided, there must be a space between a directory and a file name. Directory and file name are case-sensitive.
Proudly Served by LiteSpeed Web Server at bzap.org Port 443