Trouble making a WIELD command SOLVED!!!!!!!!!!

Hello im not sure what im doing wrong but i followed the tutorials model for commands so i made a verb called wield and also a command: wield #object#, The stone has the integral of weapon set to 1 so it should be considered a weapon

if expression not HasInt(object, "weapon") print message Only a fool would use this as a weapon So i tried wielding the snake in the room but it didn't tell me only a fool would use this as a weapon, I'm so lost

My bad i think it's because the verb overrides my command

Can somebody help me please? Im trying to make a verb called wield that can be used like the wear command because right now to equip my stone i have to type wear stone ;(

i made a verb called wield and also a command

A verb is a special type of command. So basically you've made 2 different commands that respond to the same input from the player.

Verbs are for commands that do something different depending what you do them to. For example, "use" would be a good verb, because using a motorbike, using a snorkel, and using a saw do very different things. (Except it isn't, because "use" is a special case; but it's a good example of the kind of thing verbs are good for)

A command has a script which is run every time you use the command, regardless of the object you use.

A verb is a special kind of command, where this script is preset. All it does is check if the object has a script attribute with the same name as the verb, and run that.

You probably want to delete the verb, so that the command will run.

Alternatively, if you're using the desktop version of Quest, I would suggest modifying the existing wear command so that it works with different words. By default, there are 4 different patterns for the "wear" command: "wear #object#", "put on #object#", "put #object# on", or "don #object#". If you add "wield #object#" and "equip #object#" to that list, then the player can enter "wield rock" or "wear rock" and both will work (and the player will probably not even notice). The only hard part would be putting the right one on the object's inventoryverbs menu.

mrangel thank you so much!!!!!! Do you know where/how i can modifyt the existing wear command please?

Sorry, I only use the online version of Quest, which can't do this.
I know that in the desktop version it's possible to view and edit the built-in elements, but I don't know where the option is.

No worries thanks

at the lower [edit: left] corner is the 'filter' button, click on that, and then click on the 'show library elements' so that it is checked/toggled 'on', which will reveal all of the built-in stuff of quest, as the light grey text in the left side's "Tree of Stuff", but then you got to find what you're looking for...

there's sections for 'Commands', 'Verbs', but you also might have to look at the individual Objects' Script Attributes too:

left side's "Tree of Stuff" -> 'WHATEVER' Object -> right side -> 'Attributes' Tab -> 'Attributes' (the box at the bottom) -> search for the Script Attribute (or you can change/edit/delete a non-Script Attribute as well) -> click on it so it is highlighted and then adjust/change/edit/delete it as desired

this is how to change the built-in stuff from within the GUI/Editor (by doing it this way, it forces you to click on the 'copy' button in the upper right corner, so that it protects you from messing up the quest coding itself, as otherwise, you'd have to re-download and install quest again)

you can also always just right click on your game/library 'WHATEVER.aslx' files themselves, and choose to 'open' them with a text editor software (notepad, wordpad, Apple: text editor, notepad++, etc) to directly get to your game/library code itself, being able to change it as you want. But this isn't the underlying built-in code of the quest engine...

you can always go into the quest folder and directly change the quest engine 'core' files themselves too (see above)... but this is messing with the quest program/software/engine files directly, so you got to really know what you're doing... or you'll mess up quest, and have to re-download and install it again

hegemonkhan this is great help too you guys very nice i can only thank you more ;) hehe!!!!!!!!!!!

In this case, you'd need to copy the wear and remove commands, but you only need to change their pattern (the script will work fine). I'm not sure how it looks in the editor, but if the pattern is something like put on; wear; put #object# on; don you'd change it to put on; wear; put #object# on; don; wield; equip. And do the same for the "remove" command, maybe adding "unequip" and "sheathe".

You would also need to copy the _SetVerbsForGarment function. I'd suggest replacing its script with something like:

outer = _GetOuterForGarment(game.pov, garment)
verblist = Split("[LookAt];[Drop]")
if (outer = null) {
  canwear = true
else if (outer.wear_layer < garment.wear_layer) {
  canwear = true
else {
  canwear = false
if (canwear) {
  if (not GetBoolean (garment, "worn")) {
    if (HasString (garment, "customwearverb")) {
      list add (verblist, garment.customwearverb)
    else {
      list add (verblist, "[Wear]")
  else if (GetBoolean (garment, "removeable")) {
    if (HasString (garment, "customremoveverb")) {
      list add (verblist, garment.customremoveverb)
    else {
      list add (verblist, "[Remove]")
if (GetBoolean (garment, "worn")) {
  if (HasAttribute (garment, "wornverbs")) {
    verblist = ListCompact (ListCombine (verblist, garment.wornverbs))
else if (HasAttribute (garment, "invverbs")) {
  verblist = ListCompact (ListCombine (verblist, garment.invverbs))
garment.inventoryverbs = verblist

Then you would give weapons a pair of string attributes named customwearverb and customremoveverb, which contain the word you want to appear instead of "wear" and "remove" in the buttons on the inventory pane, and the popup when you click on the item.

Doing it this way, the player could still type "wield hat" or "wear rock", because "wield" and "wear" are the same thing as far as Quest is concerned; this function just changes what shows up on the buttons/menu.

That worked :) solved i will learn more!

Log in to post a reply.