-
Notifications
You must be signed in to change notification settings - Fork 177
T2 Tutorial
DISCLAIMER: This is an advanced feature meant for people that have experience with not only DragonRealms but also Lich and the dr-scripts suite. You can really mess up your character if you do not know what you are doing! With great flexibility comes additional complexity. You have been warned.
T2 is the more advanced (see DISCLAIMER above), alternative training script to Training Manager (training-manager). T2 was originally used by two people for years, and eventually released to the public upon request. It's designed to give the user more freedom and control than training-manager; with it you can essentially control every single action of your character.
At the core, T2 is a list of skills that train in order from top to bottom based on skill mindstate for said skill(s). Each entry in this list can be one skill, or can be a group of skills. If the skill (or any of the skills for a list) is under OR EQUAL TO the configured mindstate, it will execute a list of configured scripts. When paired with scripts that execute a single experience-generating action or a timed set of actions, this system can be very modular and granular for the individual who has a solid grasp of DragonRealms as well as Lich and the dr-scripts suite.
T2 does NOT remember it's place and only check the next skill(s) after the section it was in just finished it's scripts. T2 starts from the top of the training list after finishing every script in the scripts
entry it was on.
The anatomy of T2 configuration is mainly completed with the tag 'training_list'. This tag contains every skill or skill group and their settings within.
Each skill is listed underneath the 'training_list' tag in a sequence, along with mandatory options 'start' and 'script'. Each skill is handled in order from top to bottom. Meaning, the things you want to train first, your highest priority, should be at the top. The last things will be executed only if the prior skills in the list are at or above the mindstate configured with "start".
The skill tag is the first tag in the mapping for the sequence of skills listed. This should be set to the appropriate full skill name (Athletics, Targeted Magic, etc).
Skill can be a single skill name or a sequence of them, creating a skill "group".
The mindstate number for the skill or skill group at which you wish to start the next skill or skill group in the list. If your mindstate is equal to or greater than this value, the scripts will not be called, and T2 will move on to the next skill in the list.
If a skill group, and any skill is below this threshold, this group will execute the given scripts.
The scripts that you wish to run to train the skill or skill group. This is a sequence of scripts. Arguments can be passed to each script.
You need to know what scripts you are calling, and what they do. T2 will not guess what you wish to do, it will do what you tell it to do.
For example, if a script you are calling needs you to move to a certain place first and remove certain armor, you need to handle that yourself. If the script you are calling handles it, and you are configured for that to work, you are probably okay. If this understanding of the dr-scripts script library is currently beyond you, so too is T2, and you will need to stick with other training managers for now.
This single string can be set to a name besides the skill's full name for output / log purposes if you wish.
This boolean can be set to indicate the skill or skill group should not be trained if there are no moons out.
Technically, this can be set to anything, and the current version (20220912) of T2 will act appropriately, but it should be set to true.
This can be set to a sequence of avoid types (such as crime, drag, hold, etc) to be turned on prior to t2 starting.
By turned on, we mean: avoid !
This is specified once outside of training_list.
This tag may contain any number of tags. These tags or keys should be named according to a full skill name, and have a value equal to the number of seconds of "cooldown" you wish to implement for a given skill.
This only works with single skill sections, not skill groups!
The exp_timers setting is specified outside of training_list, and also used in (only) crossing-training and t2, as of 20220912. This could change in the future.
Tag Name | Type | Purpose |
---|---|---|
training_list | header | The header tag for most T2 settings. |
skill | single or array | The single skill or sequence of skills (skill group). |
start | single | The threshold for kicking off scripts for this skill / skill group; mindstate must be lower than this for this to run. |
scripts | array | The sequence of scripts with arguments if any to run in order if the skill(s) is/are of appropriate mindstate to run. |
name | single | Set to alternate skill name for output / logs. |
moons | single | Set to true if you wish the skill or skill group to not execute if no moons are out. |
t2_avoids | sequence | Set of avoid types to turn on prior to starting T2. |
exp_timers | map | Set of timer values related to skills, with the full skill name being the key. |
Everything needs to be accounted for!
- Did hunting-buddy just finish!? If you didn't add a go2 to your list, and now you are locksmithing, you are likely sitting in your hunting room...
- Did you just sell all your loot and now you wanted to practice your magic, but you didn't go2 a new room? You're sitting in the bank window constantly trying to spam spells endlessly, because you didn't tell T2 to do anything but start running a magic script!
- Did you remember to go2 a room to practice your magic, and that room is in a town / justice zone while you are practicing sorcery? Now you're a heretic necromancer with SO! Good job! This is your fault, not T2's.
This script does not hold your hand! It is truly a manager only, with added flexibility. You CAN royally mess up everything about your character with it, if you do not know what you are doing! Use at your own risk! You have been warned.
I want to train Theurgy when it is below 12/34, and then Locksmithing when it is below 12/34. I need to be in a certain room to practice Theurgy, and when done, I want to go to a different room. I want to be in a certain room to practice Locksmithing / open my boxes, and when done, I want to make sure I'm in a certain room.
PRO TIP: Always go2 a known room after a script finishes. Do not trust the other script to do it for you, or you to remember if it might go to other rooms during script execution. Unless you wrote it and are 100% sure, use caution.
training_list:
- skill: Theurgy # Train Theurgy first.
start: 12 # If it is less than 12/34.
scripts:
- go2 792 # If so, first go to room number 792.
- theurgy # Then, run the theurgy script until it exits.
- go2 851 # Finally, go to room number 851.
- skill: Locksmithing # Train Locksmithing after Theurgy finishes running all its scripts.
start: 12 # If it is less than 12/34.
scripts:
- go2 984 # If so, first go to room number 984.
- locksmithing # Then, run the locksmthing script until it exits.
- go2 792 # Finally, go to room number 792.
training_list:
- skill:
- Small Edged # Train Small Edged and Targeted Magic together!
- Targeted Magic
start: 12 # If Small Edged _OR_ Targeted Magic are below 12/34, run the scripts below!
scripts:
- go2 851 # First, go to room number 851.
- buff prebuff # Then, buff yourself. Execute the buff script using the waggle_set "prebuff" as an argument.
- hunting-buddy main # Next, hunt with the "main" yaml hunt for this character. (YourName-main.yaml) It'll move me there.
- sell-loot # After that script exits, run the sell-loot script. It'll take me where I need to go.
- safe-room # Now, run the safe-room script.
- go2 792 # And finally, go to room number 792.
training_list:
- skill: Forging # I want to train Forging!
start: 34 # If Forging is < 34, run this!
scripts:
- go2 792 # Go to room number 792.
- workorders forging # Run the workorders script, training "forging".
- sell-loot # Run the sell-loot script.
- go2 984 # Go to room number 984.
At the end of your list of skills and skill groups you will want a catch-all.
What do you want to do when all your skills in your list are 'done' training? If you do not have a section like this T2 will spam you continuously (every 5 seconds) with the message:
Ran out of things to do - please read the T2 tutorial if you see this message.
https://github.com/rpherbig/dr-scripts/wiki/T2-Tutorial
Sleeping 5 seconds.
This below sample works because the max a skill mindstate can be is 34. So if you're checking that a skill's mindstate is below 35, it always will be. Since it is the last thing in the training_list
, it won't be attempted unless everything above it is above their threshold or cannot be run for some reason (moons, on timer cooldown, etc.)
training_list:
- skill: Forging # I want to train Forging!
start: 34 # If Forging is < 34, run this!
scripts:
- go2 792 # Go to room number 792.
- workorders forging # Run the workorders script, training "forging".
- sell-loot # Run the sell-loot script.
- go2 984 # Go to room number 984.
- skill: Forging # T2 has locked all the things! No endless loop for me!
start: 35 # If Forging is < 35, run this! So... run it!
scripts:
- checkfavors
- weararmor
- crossing-repair shard
- safe-room
- wait 300
In this case, output and logs will show the 'name' value instead of the skill full name.
training_list:
- skill: Stealth
name: Sneaky Sneaky
start: 34
scripts:
- go2 XXX
- myCustomStealthScript myArgument
- go2 YYY
- skill:
- Augmentation
- Warding
- Utility
- Arcana
- Attunement
name: Bippity Boppity Boo
start: 34
scripts:
- safe-room
- myMagicScript
training_list:
- skill: Astrology
moons: true
start: 18
scripts:
- go2 XXX
- astrology
- go2 YYY
t2_avoids:
- crime
- drag
- hold
- join
training_list:
- skill:
- Small Edged
- Targeted Magic
- Chain Armor
- Parry Ability
start: 20
scripts:
- go2 851
- buff prebuff
- hunting-buddy main
- sell-loot
- safe-room
- go2 792
Exp Timers ONLY apply to sections with a single skill entry in them. If you have a list of skills, even a list of 1 skill, it will not apply. In the below example, the timer will be properly checked for First Aid, and t2 will not train First Aid for 11 minutes regardless of mindstate once it reaches that section, but will continue to train forging again, if it's mind state is below the listed start value.
exp_timers:
First Aid: 660
Forging: 600
training_list:
- skill: First Aid
start: 18
scripts:
- go2 851
- buff prebuff
- hunting-buddy fa_skin
- sell-loot
- safe-room
- skill:
- Forging # I want to train Forging!
start: 18 # If Forging is < 34, run this!
scripts:
- go2 792 # Go to room number 792.
- workorders forging # Run the workorders script, training "forging".
- sell-loot # Run the sell-loot script.
- go2 984 # Go to room number 984.
As you can see, you need a working understanding of all the scripts, what they do when they start, run, and complete, and how to control what your character needs.
When listing a skill in the skill tag it does not need to be an actual skill that exists. Using non-existent skills combined with the exp_timers functionality lets you bake into t2 only doing certain things every so many minutes. Some examples for this are
- Only repairing every so often, without incurring the time overhead of
crossing-repair.lic
- Making use of items that have a cooldown, that aren't covered by other scripts (for example: Paladins and pilgrim badges) or you want to use them outside of the script that handles them (for example: Cleric's using pilgrim badges outside of theurgy.lic).
- Things you want to try to do often so they are at the start of your list, but don't want to get stuck in a loop doing over and over and over.
These are just examples to illustrate what can be done, and give some idea of their uses.
exp_timers:
Burglary: 300 # Only run burgle check every 5 minutes
# Badge: 1860 # Paladin badge timer is 31 minutes
Badge: 4800 # Cleric badge timer is 80 minutes
Repair: 7200 # Repair every 2 hours
training_list:
- skill: Burglary # burgle often!
start: 35
scripts:
# Check burgle often, and be sure to check for healing needs after
- burgle start
- safe-room
- skill: Badge # raise devotion using a pilgrim badge
start: 35
scripts:
- pilgrim-badge # custom script to use a badge
# [...] more training list here
- skill: Repair
start: 35
scripts:
- crossing-repair force
# [...] rest of training list here
Most classes can train the same basic way, and there are many styles to choose from. Simple single loop YAMLs like Chuno and Shagium, or more complex ones like Leustyin and Sseng.
Barbarian: Chuno, Mozof
Thief: Moza, Shagium, Foedari
Warrior Mage: Leustyin, Zamecki, Qetu
Moon Mage: Jardani
Empath: Rizzoli, Ssarek
Paladin: Vuulag, Valkiss
Ranger: Paven
Bards: Erendel
Necromancer: Raistan
Trader: Azad
https://docs.google.com/document/d/1QxTbhQrhuf-o1Vn_WpV29o6DOeYFhIDXlW5yLkITOUY