Skip to content
Zachary Perlmutter edited this page Jun 6, 2022 · 4 revisions

The give, spawn, affect, and use commands support methods as their last inputs.

Methods are object-specific actions used by the game to implement behaviors.

For example, to upgrade an Item, the method upgrade is used. In fact, the command give sword +3 is interchangeable with give sword level 3 or the nearly equivalent give sword upgrade 3.

Finding valid methods with inspect

The inspect command displays all valid methods for a given class.

The following is an inspection of the class TengusMask:

image

Any of the shown methods are valid substitutes for [<method> [<args..>]] when utilizing TengusMask in give or use. To use choose to select a subclass, in the case, one could write use tengusmask choose gladiator.

That said, many of the methods do nothing, as they are often written to be used in very specific circumstances rather than on the fly.

Types of methods

- represents an instance method of the inspected class. Instance methods are actions that are supported by objects of that type, and otherwise act on a specific object.

* represents a static method of the inspected class. Static methods are methods that are related to the class but do not act on a specific object of it. Item does not have many of these as seen in this screenshot, but updateQuickslot, for example, would update all quickslots for all items. Static methods can be called on classes that are not otherwise creatable, as they do not require an instance to run.

Clone this wiki locally