TT5 documentation: Difference between revisions

From Dyrdex.com
Jump to navigation Jump to search
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is my 5th generation of a tintin++ suite for realms, so it's named tt5.  
This is my 5th generation of a tintin++ suite for realms, so it's named tt5.  
This is pretty much in constant beta, so if you use it and find a bug let me know.
The intention here is to provide a very basic yet versatile character configuration system. I have a much more robust version that I actually use to play that includes much more functionality, many modules, etc, but it's a mess of my own insanity. This release is an attempt to strip down to a basic framework for public usage that gives anybody the ability to get connected and build up your own scripts and modules as you see fit. This should be seen as an empty framework for you to develop within. It does not provide any "in-game" functionality, it is merely a character connection and configuration program.


=Installation=
=Installation=
*Download the whole tt5 folder from your shell:
*You'll first need to install tintin. Min Version 2.02.12. See https://tintin.mudhalla.net/install.php
  wget -r -nH -np -R "index.html*" http://dyrdex.com/tt5/


*Run your tt++ with the path to my init script:  
*Download the whole tt5 folder. In your shell:
  wget -r -np -nH -e robots=off -R "index.html*" http://dyrdex.com/tt5/
 
*Run your tt++ executable with the path to my init script:  
  tt++ tt5/scripts/init.tin
  tt++ tt5/scripts/init.tin


Line 16: Line 23:
**All the scripts are commented so refer to scripts directly for more information.
**All the scripts are commented so refer to scripts directly for more information.
**All commands should display their syntax if typed with no argument.
**All commands should display their syntax if typed with no argument.


=Connection=
=Connection=


*Type 'go character' and enter your password. That info will be saved for future logins.  
*Type 'go character' and enter your password normally when prompted. That info will be saved for future logins.  
**Once logged in, use 'nickname FOO' so you can log in via nickname later (go foo)
**Once logged in, use 'nickname FOO' so you can log in via nickname later (go foo)


Line 42: Line 43:
   dc                      Disconnect;
   dc                      Disconnect;
   relog                  Disconnect & Reconnect (note this is dc/rc and not QUIT->login)
   relog                  Disconnect & Reconnect (note this is dc/rc and not QUIT->login)
   delchar CHARACTER;      Remove all configs for char;
   delchar CHARACTER;      Remove login for char (note does not delete character data file)


==Group Management==
==Group Management==
   addgroup GROUPNAME Guy1 Guy2 Guy3 Guy4  (up to 8 supported);
   addgroup GROUPNAME Guy1 Guy2 Guy3 Guy4  (up to 8 supported);
   remgroup GROUPNAME Guy1;                Removes Guy1 from GROUPNAME;
   remgroup GROUPNAME Guy1;                Removes Guy1 from GROUPNAME;
   delgroop GROUPNAME                      Deletes entire group;
   delgroup GROUPNAME                      Deletes entire group;


Groups allow you to log multiple characters at once. Like Barb Armies.  
Groups allow you to log multiple characters at once. Like Barb Armies.  
Line 62: Line 63:




The show alias can be used to show full offline information about a character, including configurations and affects list.
The 'show' alias can be used to show full offline information about a character, including configurations and affects list.


The show alias can also be used just list your characters by class. Looking for a listing of all your mages? "show mag"
The 'show' alias can also be used just list your characters by class. Looking for a listing of all your mages? "show mag"


The 'tail' alias displays the last 200 lines of your buffer. Useful for quitting then looking at backscroll.
The 'tail' alias displays the last 200 lines of your buffer. Useful for quitting then looking at backscroll.


=Character Configuration=
=Character Configuration=
Line 83: Line 74:




'''The Flags System:''' A highly customizable script configuration and sorting system.
'''The Flags System:''' A highly customizable character configuration and script sorting system.


*Each character can be 'flagged' to read multiple config files, on the fly at any time.
*Each character can be 'flagged' to read multiple config files, on the fly at any time.
**'''Example:''' Load a personal file, a class file, a guild file, and a run file. Switch on the fly.
**'''Example:''' Load a personal file, a class file, a guild file, and a run file. Toggle on/off, change on the fly.
*Each flags file can be sorted into a corresponding directory for those flag names inside the /tt5/ directory:
*Each flags file is stored into a corresponding directory for those flag names inside the /tt5/ directory:
**'''Example:''' /tt5/characters/, /tt5/runs/, /tt5/class/, etc.
**'''Example:''' /tt5/characters/, /tt5/runs/, /tt5/class/, etc.


Line 104: Line 95:


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


Line 150: Line 141:
  Flag Name: class    Value: Mage        From tt4/classes/Mage.tin
  Flag Name: class    Value: Mage        From tt4/classes/Mage.tin
  Flag Name: sect      Value: Forestmen    From tt4/misc/Forestmen.tin
  Flag Name: sect      Value: Forestmen    From tt4/misc/Forestmen.tin
  Flag Name: group    Value: lspellers    From tt4/groups/lspellers.tin
  Flag Name: group    Value: spellsbots  From tt4/groups/lspellers.tin
  Flag Name: bot      Value: spell        From tt4/bots/spell.tin
  Flag Name: bot      Value: spell        From tt4/bots/spell.tin
  Flag Name: run      Value: edo          From tt4/bots/edo.tin
  Flag Name: run      Value: edo          From tt4/bots/edo.tin
Line 160: Line 151:
*If you want to flag your character with a seth run script:  
*If you want to flag your character with a seth run script:  
  1. Place your script into tt5/runs/  
  1. Place your script into tt5/runs/  
  2. flag run seth          (will read tt4/runs/seth.tin at login)
  2. flag run seth          (will read tt5/runs/seth.tin at login)
*To flag yourself with a spellbot type script:
*To flag yourself with a spellbot type script:
  1. Place your script into tt5/bots/
  1. Place your script into tt5/bots/
  2. flag bot spellbot
  2. flag bot spellbot       (will read tt5/runs/spellbot.tin at login)
*If you want to assign yourself a flag named 'butthead' thats reads in a file named 'fart.tin':
*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/
  1. Place your script into tt5/misc/
Line 174: Line 165:


Again note that for more permanent and shared configs, you may want to load a '''module''' instead. See below.
Again note that for more permanent and shared configs, you may want to load a '''module''' instead. See below.


=Modules=
=Modules=
Line 228: Line 209:


===Session Aliases===
===Session Aliases===
Globally accessible aliases to access/control any active session:
I've provided automatically configured globally accessible aliases to access/control any active session:
  Each character name (AND nickname) is an alias to control that session
  Each character name (AND nickname) is an alias to control that session


Line 249: Line 230:


===Scripting Aliases===
===Scripting Aliases===
For your own scripting purposes, there are built-in aliases to save/load this 'global' file:
For your own scripting purposes, I've provided you with aliases to save/load this 'global' file:
  loadglobal  (reads in tt5/data/global.tin)
  loadglobal  (reads in tt5/data/global.tin)
  saveglobal  (writes out tt5/data/global.tin)
  saveglobal  (writes out tt5/data/global.tin)
Line 258: Line 239:
  saveglobal;                                    (saves it all back to the global file)
  saveglobal;                                    (saves it all back to the global file)


Remember to always have code 'loadglobal' before setting new global 'stuff' so it picks up most recent contributions from other sesions.
Remember to always have your code do 'loadglobal' before setting new global 'stuff' so it picks up most recent contributions from other sessions.
 
 
 
 
 
 
 
 
 


==Logging Module==
==Logging Module==
  '''Logging Config:''' /tt5/modules/logging.tin
  '''Logging Config:''' /tt5/modules/logging.tin
*You'll want to set that up however you want, by default it just logs EVERYTHING, in plain-text format, to:  
*You'll want to set that config up however you want, by default it just logs EVERYTHING, in plain-text format, to:  
  tt5/logging/full_log.txt
  tt5/logging/full_log.txt


Line 311: Line 283:
  finddir shat   
  finddir shat   
   
   
  #NOP Shattered Temple of Nae'Trelle
  #NOP Shattered Temple of Nae'Trelle = nat
  #ALIAS {gonat} {#8 e;#2 se;s;#4 se;#2 s;sw;w;sw;#2 s;#3 se;sw;#2 w;sw;#6 w;s;ne}
  #ALIAS {gonat} {#8 e;#2 se;s;#4 se;#2 s;sw;w;sw;#2 s;#3 se;sw;#2 w;sw;#6 w;s;ne}
  --
  --
Line 331: Line 303:
1. All speedwalks start from dh[]
1. All speedwalks start from dh[]


2. 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. Including it to get you started.
2. 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.


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




Line 359: Line 330:


Modules should be globally used 'always on' type things. If you want to turn something on/off, use a flag file instead.
Modules should be globally used 'always on' type things. If you want to turn something on/off, use a flag file instead.
=Development Script=
I provide a file at tt5/test_script.tin can be easily read/killed for development using these provided 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
=MSDP=
MSDP is enabled by default and stores vars under $msdp_info, see #var msdp_info
Call individual vars in your code like:
$msdp_info[CHARACTER_NAME]
$msdp_info[AFFECTS][sanctuary]
That's it. Contact me via email or discord or in game with questions or troubleshooting.

Latest revision as of 14:41, 16 November 2022

This is my 5th generation of a tintin++ suite for realms, so it's named tt5.

This is pretty much in constant beta, so if you use it and find a bug let me know.

The intention here is to provide a very basic yet versatile character configuration system. I have a much more robust version that I actually use to play that includes much more functionality, many modules, etc, but it's a mess of my own insanity. This release is an attempt to strip down to a basic framework for public usage that gives anybody the ability to get connected and build up your own scripts and modules as you see fit. This should be seen as an empty framework for you to develop within. It does not provide any "in-game" functionality, it is merely a character connection and configuration program.


Installation

  • Download the whole tt5 folder. In your shell:
 wget -r -np -nH -e robots=off -R "index.html*" http://dyrdex.com/tt5/
  • Run your tt++ executable 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


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

Connection

  • Type 'go character' and enter your password normally when prompted. 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.


Character Management

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

  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 (note this is dc/rc and not QUIT->login)
  delchar CHARACTER;      Remove login for char (note does not delete character data file)

Group Management

  addgroup GROUPNAME Guy1 Guy2 Guy3 Guy4   (up to 8 supported);
  remgroup GROUPNAME Guy1;                 Removes Guy1 from GROUPNAME;
  delgroup GROUPNAME                       Deletes entire group;

Groups allow you to log multiple characters at once. Like Barb Armies.

Group members are also all flagged to load a shared group config file. So, your Barmy all load a shared army config file too.

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  (will display last 200 buffer lines)


Upon 'quit' I am saving things like your logoff room and area, full affects list and spell durations, to an offline accessible file.


The 'show' alias can be used to show full offline information about a character, including configurations and affects list.

The 'show' alias can also be used just list your characters by class. Looking for a listing of all your mages? "show mag"

The 'tail' alias displays the last 200 lines of your buffer. Useful for quitting then looking at backscroll.

Character Configuration

This system requires some explanation. Please read closely.


The Flags System: A highly customizable character configuration and script sorting system.

  • Each character can be 'flagged' to read multiple config files, on the fly at any time.
    • Example: Load a personal file, a class file, a guild file, and a run file. Toggle on/off, change on the fly.
  • Each flags file is stored into a corresponding directory for those flag names inside the /tt5/ directory:
    • Example: /tt5/characters/, /tt5/runs/, /tt5/class/, etc.


Notes:

1. Upon FIRST login, your character will 'auto-configure' your name, class, and organization flags from 'score' output.

2. These are for scripts you only want implement on a per character basis or toggle on/off or change.

  • If you want ALL chars to have a permanent script loaded, you probably want to load a global MODULE instead. (see Modules)


Commands

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


Flag

  • The flag NAME itself determines which directory it looks for the FILENAME within
    • There are 6 special flag NAMES which map to specific data directories:
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/bots/                                    
Flag Name: org          will read files from tt5/orgs/
Flag Name: run          will read files from tt5/runs/

Example: flag run seth (Character is configured to always read tt5/run/seth.tin at login)

Example: flag bot spell (Character is configured to always read tt5/bots/spell.tin at login)


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

Example: flag sect horsemen (would read tt5/misc/horsemen.tin)


Unflag

  • To remove a flag, specify the flag NAME to remove:

Example: unflag run; unflag bot; unflag org;

Examples

Example Flag Configurations:

Dyrdex has 3 flags currently configured, for his character, class, org:

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


Lyrdex has an entirely different flag configuration:

Flag Name: character Value: Lyrdex       From tt4/characters/lyrdex.tin
Flag Name: class     Value: Mage         From tt4/classes/Mage.tin
Flag Name: sect      Value: Forestmen    From tt4/misc/Forestmen.tin
Flag Name: group     Value: spellsbots   From tt4/groups/lspellers.tin
Flag Name: bot       Value: spell        From tt4/bots/spell.tin
Flag Name: run       Value: edo          From tt4/bots/edo.tin

So, he still gets the standard character/class flags, but is also set up as a spellbot, and part of a group (with a cleric) that I can write a group script for, he's in a sect and gets a file for that, and he is currently out in Edo assisting with a run and has a specific file for that. All of these can be toggled off, or changed to other values, on the fly at any time.


Example Usage:

  • 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 tt5/runs/seth.tin at login)
  • To flag yourself with a spellbot type script:
1. Place your script into tt5/bots/
2. flag bot spellbot       (will read tt5/runs/spellbot.tin at login)
  • 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)
  • If you want to remove your 'run' and 'group' flags:
1. unflag run
2. unflag group

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 each character. You can have lots, or just a few flags, its up to you.

Again note that for more permanent and shared configs, you may want to load a module instead. See below.

Modules

For scripts you want ALL character to have all the time, you can create a module.

  • Module scripts are stored in /tt5/modules/
    • Modules are loaded by being listed in /tt5/modules/modules.conf
  • All modules are loaded at login for all characters.

To add new modules, just add lines to modules.conf, exactly like the others in there already.


Included Modules

I included 3 modules for you in this basic package:

global     (a shared file all characters can read/write from)
logging    (a basic full log file)
speedwalk  (my list of speedwalks)

Details on each below.


Notes:

1. 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.




Global Module

  • The 'global' module is quite useful for sharing data between sessions.
    • Saves data at tt5/data/global.tin
  • Examples:
    • save maze directions to a shared file all characters have access to
    • save repop times to a shared file...
    • save session aliases to a shared file...


Session Aliases

I've provided automatically configured globally accessible aliases to access/control any active session:

Each character name (AND nickname) is an alias to control that session
  • To switch between active sessions simply type 'character' or 'nickname' to go to that session.
  • To send commands to any session simply prefix your command with 'character' or 'nickname' prefix.
  • The keyword 'all' is a global alias to all sessions:
Example: dyrdex, lyrdex, and myerdex are all connected. (Nicknames dyr, lyr, and myer)

dyr                      (switch to dyrdex session)
lyr smile                (lyrdex smiles)
myer give 1 coin dyr     (myerdex gives 1 gold coin to dyrdex)
myer                     (switch to myerdex session)
smile                    (myerdex smiles)
all smile                (dyrdex, lyrdex, and myerdex smile)
dyrdex                   (switch to dyrdex session)
lyr dance                (lyrdex dances)
myer dance               (myerdex dances)
all say you get the point

Scripting Aliases

For your own scripting purposes, I've provided you with aliases to save/load this 'global' file:

loadglobal   (reads in tt5/data/global.tin)
saveglobal   (writes out tt5/data/global.tin)

To create new global stuff: reload globals, put stuff in the 'global' class, then save it:

loadglobal                                      (picks up any recent changes from other sessions)
#CLASS global assign #VAR {example_var} {123};  (sets your new global var)
saveglobal;                                     (saves it all back to the global file)

Remember to always have your code do 'loadglobal' before setting new global 'stuff' so it picks up most recent contributions from other sessions.

Logging Module

Logging Config: /tt5/modules/logging.tin
  • You'll want to set that config 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 between PLAIN/RAW/HTML inside the tintin config section at the bottom of:
tt5/scripts/init.tin
(This line) 
#CONFIG           {LOG MODE}  {PLAIN}






Speedwalks Module

Speedwalk Config: /tt5/modules/speedwalk.tin

This is my own list of speedwalks, and I use my own short-codes like 'goFOO' that you obviously may or may not like.

Just replace /tt5/modules/speedwalk.tin with your own file and go nuts with your own conventions if you prefer.


Speedwalk Search: My script includes its own search functionality to find speedwalks by searching for any text:

  • To search for a speedwalk and its alias, use the 'finddir' alias!
  • Syntax: finddir FOO
    • Supports partial matching of any text


Example:

finddir shat  

#NOP Shattered Temple of Nae'Trelle = nat
#ALIAS {gonat} {#8 e;#2 se;s;#4 se;#2 s;sw;w;sw;#2 s;#3 se;sw;#2 w;sw;#6 w;s;ne}
--
 
#NOP Hobgoblins in Shattered Refuge = hob
#ALIAS {gohob} {goshat;s;s;u;n;give 500 coin troll;#map go e;s;d;e;ne;u;e;e;se;d;w;sw;s;sw}

--
#NOP Shattered Refuge = shat
#ALIAS {goshat} {#9 s;w;#3 s;w};

So, the search for 'shat' returned 3 matches. Use 'gonat' or 'gohob' or 'goshat' to run them.



Notes:

1. All speedwalks start from dh[]

2. 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.

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





Custom Modules

To add new modules just add new lines into /tt5/modules/modules.conf exactly like the existing lines in that file.

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
custom gui/display

Modules should be globally used 'always on' type things. If you want to turn something on/off, use a flag file instead.




Development Script

I provide a file at tt5/test_script.tin can be easily read/killed for development using these provided 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

MSDP

MSDP is enabled by default and stores vars under $msdp_info, see #var msdp_info

Call individual vars in your code like:

$msdp_info[CHARACTER_NAME]
$msdp_info[AFFECTS][sanctuary]



That's it. Contact me via email or discord or in game with questions or troubleshooting.