===== Table of Contents =======
This 'tt5' package contains features to manage connections, character configs, modules, and a helpful dev script feature

 1. Installation
 2. Connection
    2a. Character Management
    2b. Group Management
    2c. Offline Information Display
 3. Character Configuration
 4. Modules
    4a. Global
    4b. Logging
    4c. Speedwalks
    4d. Custom
 5. Development Script



============================================= 1. INSTALLATION ========================================
-Download the whole tt5 folder
  wget -r -nH -np -R "index.html*" http://dyrdex.com/tt5/

-Run your tt++ with the path to my init script: 
 tt++ tt5/scripts/init.tin



That should be it. If you wanna re-name/move "tt5" you'll need to update the $home var at the top of this file:
 tt5/scripts/init.tin

-All the scripts are commented so refer to scripts directly for more information.
-All commands should display their syntax if typed with no argument. 


=============================================== 2. CONNECTION ========================================
-Type 'go character' and enter your password. That info will be saved for future logins. 

 Once logged in, use 'nickname FOO' so you can log in via nickname later (go foo)

-The system also supports login by nickname, creating login groups, aliases for dc/rc, and offline character status, class search, and buffer display. 

Full commands list: 
 (Typing a command with no argument should display its syntax information.)

2a. CHARACTER MANAGEMENT:
   go                      Display Full Character List;
   go CHARACTER            Log in (foreground);
   go NICKNAME             Log in (foreground)
   go GROUP                Log entire group in.
   bg CHARACTER            Log in (background) (also works with nicknames);
   nickname FOO            Set -current- char's nickname to FOO (must be logged in);
   dc                      Disconnect;
   relog                   Disconnect & Reconnect;
   delchar CHARACTER;      Remove all configs for char;


2b. GROUP MANAGEMENT:
   addgroup GROUPNAME Guy1 Guy2 Guy3 Guy4   (up to 8 supported);
   remgroup GROUPNAME Guy1;                 Removes Guy1 from GROUPNAME;
   delgroop GROUPNAME                       Deletes entire group;


2c. OFFLINE INFORMATION:
   show <character-full-name>
   show <mag|cle|thi|war|vam|dru|ran|aug|pal|nep|fat|bar|dre|har|kni|hun|inf|buc>
   tail  (display last 200 buffer lines)



========= 3. CHARACTER CONFIGURATION ===============

Full commands list:

   flags             Display All Current Flags;
   flag NAME FILE    Add a new flag of "NAME" to read "FILENAME" from associated directory;
   unflag NAME       Remove the NAME flag;


This system requires explanation.

Each character gets 'flags' to denote which config files it should read in.
 These are for: character/class/group/org/run/bot and 'misc'

(Upon initial log in, some of these will be auto-discovered by running 'score' and saved: character, class, organization.)


********NOTE: These are for scripts you only want implement on a character/class/org/group/run/bot basis.********
      If you want ALL chars to have a script, you may actually want to load a global MODULE (see modules section below)


Upon login, your character's flags and loaded configs are displayed. 
 Type 'flags' to see the syntax and current configuration information.

Example: Dyrdex has 3 flags currently configured, for his character, class, and organization:

        Loaded File Flags:
        Flag Name: character Value: dyrdex       From tt5/characters/dyrdex.tin
        Flag Name: class     Value: Thief        From tt5/classes/Thief.tin
        Flag Name: org       Value: Ascendere    From tt5/orgs/Ascendere.tin


There are 6 default flag names which correspond to data directories for their files:
 Flag Name: character    will read files from /tt5/characters/   (*Auto-added to all characters)
 Flag Name: class        will read files from tt5/class/         (*Auto-added to all characters)
 Flag Name: group        will read files from tt5/group/         (*Auto-added to all login group members)
 Flag Name: bot          will read files from tt5/bot/                                    
 Flag Name: org          will read files from tt5/org/
 Flag Name: run          will read files from tt5/run/

There is 1 'catch-all' directory for all other flag names:
 Flag Name: ANYTHING  will read files from tt5/misc/

To set a flag, you specify a flag NAME and then your FILENAME: 
	Syntax:   flag <name> <filename>

So, if you want to flag your character with a seth run script: 
 1. Place your script into tt5/runs/ 
 2. flag run seth           (will read tt4/runs/seth.tin at login)
 
To flag yourself with a spellbot type script:
 1. Place your script into tt5/bot/
 2. flag bot spellbot

If you want to assign yourself a flag named 'butthead' thats reads in a file named 'fart.tin':
 1. Place your script into tt5/misc/
 2. flag butthead fart      (will read tt5/misc/fart.tin at login)

To remove a flag, just use 'unflag FLAGNAME'
	Syntax: unflag <name>

Remember that's the flag NAME (not filename):
 unflag run
 unflag bot
 unflag butthead


The goal of this system was to both easily sort out common groups (character/class/org/group/run/bot) into folders while also providing full customization for flags and files via the 'misc' folder. 




============= 4. MODULES ==========================

For things you want ALL character to have, you can create a module. 

Module scripts are stored in /tt5/modules/

Modules are loaded by being listed in /tt5/modules/modules.conf
 Just add your new modules to that file, exactly like the others in there already. 

I included the following modules by default: 
 global     (a shared file all characters can read/write from)
 logging    (a basic full log file)
 speedwalk  (my list of speedwalks)

You can list/delist any modules you'd like from modules.conf. 

Modules cannot be loaded/killed on the fly (That is what the 'flags' system is for!)
 To add/remove a module you must modify modules.conf and reconnect. 
 (or manually #class read/kill those files in exactly like modules.conf does)

Here's a bit more detail on the 3 included modules: 

=== 4a. Global Module===
The 'global' module is quite useful for sharing data between sessions. 

One feature of this that is built-in is session name aliasing: 
 Each character name, AND nickname, is saved as a global alias to control that session. 

Thus: 
 1. To switch between active sessions simply type 'character' or 'nickname' to go to that session.
   Example: if we have character 'guy1' with nickname 'g1' connected, and 'guy2' with nickname 'g2':
     Typing 'guy1' or 'g1' will switch you to that session, and typing 'guy2' or 'g2' will switch you to that session.

 2. You can send commands to any session by simply prefixing your command with 'character' or 'nickname' prefix.
   Example: guy1 smile ; g2 nod ; g3 say you are stupid; g1 beam

 3. The keyword 'all' is a global alias to all sessions:
   Example: all smile; all rend; all drink;


For your own scripting purposes, there are built-in aliases to save/load  'global' class:
 loadglobal   (reads in tt5/data/global.tin)
 saveglobal   (writes out tt5/data/global.tin)

To create new global stuff, it will be handy to do things like this in your code:
 loadglobal;                                     (picks up any recent changes written to the global class from other sessions)
 #CLASS global assign #VAR {example_var} {123};  (sets your new global var)
 saveglobal;                                     (saves it all back to file for other chars to now see when they 'loadglobal')

Always have code loadglobal before saving global so it picks up most recent version of the file and things set by other ssions.



==== 4b. Logging Module====
You'll want to set this up however you want, by default it just logs EVERYTHING, in plain-text format, to tt5/logging/full_log.txt

The log type can be changed from plain to RAW or HTML inside the tintin config section at the bottom of tt5/scripts/init.tin




==== 4c. Speedwalks Module====
This is my own list, and I use my own short-codes like 'goFOO' that you obviously may or may not like. 

To search for a speedwalk and its short-code, use the 'finddir' alias!

 Example: finddir shire  

          #NOP The Shire = shire
          #ALIAS {goshire} {#9 w;nw;w;w;nw}

  So, the short-code = 'shire' and the alias is 'goshire'

All speedwalks start from dh[]

There's a lot of weird and somewhat specific mobs/room set up in there, and many I don't even use, so, the whole thing probably needs audited really. 

(There's also some that require additional area modules being loaded, those won't work for you sorry)




==== 4d. Custom Modules =====
Just add new lines into /tt5/modules/modules.conf

Other modules I use, to give you some ideas or if you wanna ask me questions about them:

 repop tracking
 inventory tracking (restocking)
 equipment damage tracking
 mob database
 world map
 specific area modules
 a general 'useful gameplay stuff' module
 gui/display module




========= 5. DEVELOPMENT SCRIPT CONTROLS ===========
The file at tt5/test_script.tin can be easily read/killed for development using these aliases;

 teston     Reads in tt5/test_script.tin into 'testing' class;
 testoff    Kills the 'testing' class;
 rtest      Does testoff then teston to re-test;     

My advice is to have an editor open editing/saving that file, while you have tintin open alongside doing teston/testoff/rtest