ShakPack.System

## What is ShakPack.System?

The System package is used by most other ShakPack packages and many will not run without it. It contains many toolbox type functions to do common scripting tasks and also some informational scripts that contain data about the Avalon world.

## Requirements

Some functions in the Text section can print to the Chat window, which obviously requires ShakPack.Chat.

## Functionality

### Misc

Where I keep random little bits that aren't currently big enough to warrant a separate folder.

### Character Stuff

Currently mostly functions and variables related to tracking hp/mana and conditions.

### Queue Functions

Is what it sounds like, functions and variables for a rather complex queue system. Has its own page to explain further.

### Table Stuff

Various functions related to handling tables.

#### Save and Load

Functions that handle saving and loading of tables for persistent data. Note that you will need to use these functions inside event driven scripts to save and load automatically, lest you do it manually.

#### Reverse Indexed Table

Small function with the purpose of reversing the index of a table, where the first item will become the last etc. Note: will only work on a numerically indexed table without missing indexes.

#### Table Search

Self explanatory, currently contains a recursive function to search for a non table value within a table structure, i.e. it will search the table and all inner tables.

#### To String

A function to convert a table into a string, simple as that. Useful for displaying a table in a debugging message.

### Text Stuff

#### Debug Echo

The much used way of displaying messages and debug info. Contains functions to display a message, set default display output, display debug message, set debug mode, display debug mode(s).

#### Displaying

A complete little set of functions that allow you to easily display a table of data with custom headings, row display and borders. All done with 3 simple commands; new display, add line for each line of data, and display with a given format string to control look of the lines. e.g. displaying potions.

#### Formatting

A few little functions that handle capitalisation etc of text.

### Item Stuff

#### Item Text Stuff

Currently contains a function to retrieve the name+number from a possibly hyphenated ID, such that "black-potion123123" gets turned into "potion123123".

#### Name Conversions

Currently contains name conversions for potions, i.e. common names into mixing required names.

#### Herbs and Poisons

Contains info and functions about herbs and poisons, including their biome type and function to display what grows in what biome.

### Map Related Stuff

Functions to return full direction name and reverse direction, unlock and enter doors, and a list of biomes(partial).

### Number Stuff

Contains a rounding function that rounds up or down to a specified amount.

## Changelog

### v2.2

Added support for exporting to csv file for using in Excel etc.

### v1.8

Better support for different prompts.

Standardised package naming.

### v1.02

Just lots of stuff, mostly to do with the Queue and text stuff.

## To-do:

https://trello.com/b/J0JoytPy/shakpack-system