Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Difference between revisions of "Script:Backpack"

From Roll20 Wiki

Jump to: navigation, search
(Item Definitions)
(Item Definitions)
Line 34: Line 34:
  
 
<br>
 
<br>
{{token|type}} {{rarr}} Existing type in backpack_tmp.js<br>
+
{{token|name}} {{rarr}} Name of the item, see [[Script:Backpack#name|name]]<br>
{{token|sybtype}} {{rarr}} Existing subtype defined in the [[Script:Backpack#Asset_Database|asset database]]<br><br>
+
{{token|type}} {{rarr}} Existing type in backpack_tmp.js, see [[Script:Backpack#type|type]]<br>
 +
{{token|sybtype}} {{rarr}} Existing subtype defined in the [[Script:Backpack#Asset_Database|asset database]], see [[Script:Backpack#subtype|subtype]]<br><br>
 
{{token|quantity}} {{rarr}} ''Optional'' quantity of the item, see [[Script:Backpack#quantity|quantity]]<br>
 
{{token|quantity}} {{rarr}} ''Optional'' quantity of the item, see [[Script:Backpack#quantity|quantity]]<br>
 
{{token|weight}} {{rarr}} ''Optional'' weight of the item in lbs, see [[Script:Backpack#weight|weight]]<br>
 
{{token|weight}} {{rarr}} ''Optional'' weight of the item in lbs, see [[Script:Backpack#weight|weight]]<br>

Revision as of 01:36, 26 June 2015

API Script Author: Ken L.
Version: 1.25
Last Modified: 2015-6-24
Code: NA
Dependencies: None
Conflicts: Unknown

Contents

Backpack is a journal based inventory system that updates the 'bio' section of a journal to represent a graphic inventory interface. This allows GMs whom implement this script to allow players to manage a graphic representation of their inventory. Once setup, you can move, give, drop, and pickup items through the use of the API button interface as well as buy and sell from shops and stores should they be prepared.

To use this script requires quite a bit of setup on the part of the GM preparing the asset and item databases. The asset database is simply a list of available item types/subtypes and their associated images. The item database is a list of parsable item signatures which can be short hand written to loot drop handouts or any backpack compatible journal entry.


Getting Started

Once you load the backpack.js and backpack_tmp.js scripts into your campaign, you'll need to at least create an asset database.

After creating an asset database, you're ready to populate backpack compatible journal entries as inventories, stores, or loot cache drops.

General Use

TODO

Item Definitions

Item definitions are the format in which entries of items are parsed into the script. They consist of several parts.

[quantity] <name>;<type> [weight] [value] [description] [use] [maxcharge] [enigma]
Formally:

[quantity] name

type
[optionals] 

[quantity] name

type
subtype
[optionals] 


name

→ Name of the item, see name

type

→ Existing type in backpack_tmp.js, see type

sybtype

→ Existing subtype defined in the asset database, see subtype

quantity

Optional quantity of the item, see quantity

weight

Optional weight of the item in lbs, see weight

value

Optional value of the item, see value

description

Optional description of the item, see description

use

Optional use argument to be executed, see use

maxcharge

Optional max charges of the item, see charges

enigma

Optional the enigma arguments, see enigmas

name

type

subtype

quantity

weight

value

description

use

charges

enigmas

Asset Database

The asset database is a journal entry that contains within its gmnotes section the library of images to be used for item definitions

The asset database has a simple format where each line is a single asset entry (blank lines between groups of entries are fine).

Each asset entry is in either of the following formats:

Type:Link
Type:Subtype:Link
Formally:

type

subtype
link


type

link



type

→ Existing type in backpack_tmp.js

sybtype

→ Anything except ε

link

→ HTML link to the image source, must start with 'http' case insensitive

Item Database

TODO

Customizing

TODO

Changelog

TODO