|
|
(8 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | {{script overview
| + | #Redirect[[API:Script Index]] |
− | |name=Inventory Manager
| + | |
− | |author={{user profile|682814|Jonathan Burke}}
| + | |
− | |version=1.0
| + | |
− | |lastmodified=2015-01-31
| + | |
− | |code=InventoryManager
| + | |
− | |dependencies=
| + | |
− | |conflicts=
| + | |
− | }}
| + | |
| | | |
− | This is an example of an API script listing to demonstrate the format we'd like contributors to mimic. Keeping a unified look will lower the barrier to entry for mentors just learning how to use API scripts in their games. In this space we're looking for a general description of the script and it's use. If there a specific installation instructions you should make a note of it here but detail them in the Help.txt and optionally below in it's own section. | + | This API is no longer in the API library, see Community Wiki's [[API:Script Index]] for newer alternatives. |
− | | + | <!-- Don't delete redirect, help center links to this page even though API have been removed --> |
− | == Syntax ==
| + | |
− | {{syntaxbox top|Example|nocat=true}}
| + | |
− | {{API command|example}}<br>
| + | |
− | {{API command|example 3}}<br>
| + | |
− | {{API command|example off}}
| + | |
− | {{syntaxbox end}}
| + | |
− | | + | |
− | == Installation ==
| + | |
− | Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts API GitHub Repository]. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
| + | |
− | | + | |
− | == Setup ==
| + | |
− | | + | |
− | === Character Area ===
| + | |
− | | + | |
− | This script expects you to have a special token for each character you want to be able to use the inventory manager. The token represents the area owned by that character. All items that get dropped inside of this area will become controlled by that character and he can freely move them around (even drop them into other character areas). This token has to have '''main''' set in its gm-notes section and should be placed on the map layer.
| + | |
− | | + | |
− | === Equipment Slots ===
| + | |
− | | + | |
− | After you have created a character area, you can create any amount of tokens that should represent equipment slots for that character. You can have one big slot all over the character or split them up to indicate various regions on your character. Those slots have to have '''worn''' set in their gm-notes section and should be placed on the map layer. All items placed over such an equipment slot will be recognized by the script as 'being worn'.
| + | |
− | | + | |
− | === Items ===
| + | |
− | | + | |
− | Each and every item a player can hold or store is a token. The green bar of a token represents its weight, the blue bar its volume. For ease of use it is recommended that you create often used tokens and save them as handouts so that you can drag them onto a character area whenever you need a new item. You dont have to have a handout for every item, e.g. rare items would not need a handout.
| + | |
− | | + | |
− | ==== Special Items ====
| + | |
− | | + | |
− | Some items are special in that they represent container or have special properties. These properties can be identified by adding modifiers to the gm-notes section of that token. Available modifiers are:
| + | |
− | | + | |
− | {| class="wikitable"
| + | |
− | |-
| + | |
− | ! Modifier !! Effect
| + | |
− | |-
| + | |
− | | unstowable || For items that should not be stored inside of containers (e.g. greatswords)
| + | |
− | |-
| + | |
− | | e.g. backpack || For items that represent containers (each container has its own key, see below)
| + | |
− | |-
| + | |
− | | constantweight || For containers that have a constant weight and ignore the weight of their contents (e.g. bag of holding)
| + | |
− | |-
| + | |
− | | liquid || For containers that store liquids (e.g. vials)
| + | |
− | |-
| + | |
− | | weight [number] || For items that have a base-weight (primary use for liquid containers)
| + | |
− | |-
| + | |
− | | coins [type] || For items that should represent a coin
| + | |
− | |-
| + | |
− | | ignore || For items or tokens that should not be considered at all (e.g. visual sugar)
| + | |
− | |}
| + | |
− | | + | |
− | ==== Container ====
| + | |
− | | + | |
− | Container kinds are defined in the script config section. Per default are the following containers defined:
| + | |
− | | + | |
− | {| class="wikitable"
| + | |
− | |-
| + | |
− | ! Key !! Max. weight !! Max. volume
| + | |
− | |-
| + | |
− | | backpack || 30 || 1
| + | |
− | |-
| + | |
− | | quiver || 1 || 0.1
| + | |
− | |-
| + | |
− | | boltcase || 1.5 || 0.15
| + | |
− | |-
| + | |
− | | pouch || 6 || 0.2
| + | |
− | |-
| + | |
− | | pocket || 3 || 0.1
| + | |
− | |-
| + | |
− | | bagofholding || 500 || 64
| + | |
− | |-
| + | |
− | | hhh || 80 || 8
| + | |
− | |-
| + | |
− | | hhhside || 20 || 2
| + | |
− | |-
| + | |
− | | chest || 300 || 12
| + | |
− | |-
| + | |
− | | cart || 600 || 50
| + | |
− | |}
| + | |
− | | + | |
− | You can add additional containers or change the values as you like. Keep in mind that already placed containers do not change their values.
| + | |
− | | + | |
− | | + | |
− | == Changelog ==
| + | |
− | {{changelog version|1.0|2015-01-31|* Release}}
| + | |