EasyExperience (Gist updated 5/2/16 1611 CST):
This is an experience tracker and updater. The script will keep track of party experience gains throughout the session and then apportion them out to the party when you tell it the session is over. It will also alert the table when someone levels up. Thanks to The Aaron for lots of help over the last couple weeks as I've been wading through it.
Version 1.04:
Actual fix for the state corruption is put in along with logic that will hopefully automatically clean it up when it happens.
Version 1.03:
Some users experienced a difficulty with the state that was only fixable by a complete wipe of the state. A new command has been added to the script: !xp reset. This command will wipe all user settings from the state and will restore the default values, and will re-lookup player characters. This should fix this error if you encounter it.
Version 1.02:
Applying XP now rounds down to the nearest whole number rather than having huge decimals.
Version 1.01:
Numerous bug fixes from Version 1.0. Also added the ability to set what name the script uses when looking for the experience attribute.
Version 1.0:
Can now directly add xp to a specific character(s).
Can now set what experience progression the script uses. options are Pathfinder: slow, medium, fast, and pfs; and D&D5e.
Version 0.0.5:
Discovered a problem with !xp session. This has now been fixed.
Version 0.0.4:
Version 0.0.2:
Fixed an issue where if a character's level was changed from a positive value (1+) to 0, the script would throw a Reference Error and shut down all scripts. The gist in the link is updated.
Can't replicate issues with 5e OGL sheet. Please let me know if they are still occuring.
Issue with the 5e sheet described by Loren is actually a problem with the code where it incorrectly handles experience|max being 0 or undefined. I will work on getting the script to handle this correctly (setting max to the proper value for the character's current level, but in the meantime the work-a-round is to change the character's current level back and forth to trigger the scripts built in function for handling a level change.
Note about a possible TypeError: It is possible for the script to throw a TypeError if there is a PC that has never had any experience added to it. This is because the character sheets do not generate these attributes until they have some value in them. Please make sure to enter a value in the experience field of every PC (even if it is just a zero) to get the character sheet to generate the experience attribute. You only need to do this for PC's (characters with something in the player-name attribute).
Version 0.0.1:
EDIT: Designed with Pathfinder sheet in mind, known issues with 5e sheet.
Easy Experience Script:
This script will create a character called ExperienceThresholds that it uses for most of its functionality. If there is already an
ExperienceThresholds character present, it will not make one; please make sure that you do not have a self-made ExperienceThresholds character. (highly unlikely I would think ;) )
ExperienceThresholds is created with the following attributes:
Session XP: current value is updated whenever a challenge is completed. The max value stores the xp earned in the previous session in case you need it for something else.
2, 3, 4,...: these attributes' current values are the thresholds at which characters level up to this level. The default values are from the Pathfinder medium progression path. If your game uses a different XP progression, simply change the values as needed; the script only looks at these values, it does not change them.
----------------------------------------------------------------------------------------
Use the following chat commands to utilize this script:
!xp challenge @{token_id/character_id}: Adds a character's npc-xp attribute value to the Session XP tally in the ExperienceThresholds character.
!xp miscXP ###: Adds a manually entered XP value to the Session XP tally in ExperienceThresholds.
!xp session: Divides the Session XP by the number of PCs (defined as characters that have a player-name entry), adds that xp to each PC's
current experience, and then sets the Session XP max field to the current field before resetting the current field to 0. Will also send
a chat message congratulating the character on leveling up if this causes that character's current
experience to be above or equal to the experience|max value.
When a character's level changes, the script will automatically set the experience|max value to the next level's threshold based on the values in ExperienceThresholds.
----------------------------------------------------------------------------------------
Planned features/fixes:
√Fix the incorrect handling of unpopulated experience|max values
√Add the ability to enter a number after !xp challenge @{token_id/characterid} to specify how many of the targeted challenge were completed
√Add gm whispers on each trigger so that you know the script is doing something
Add handling for player specific XP gains
Any other requests?
This is an experience tracker and updater. The script will keep track of party experience gains throughout the session and then apportion them out to the party when you tell it the session is over. It will also alert the table when someone levels up. Thanks to The Aaron for lots of help over the last couple weeks as I've been wading through it.
Version 1.04:
Actual fix for the state corruption is put in along with logic that will hopefully automatically clean it up when it happens.
Version 1.03:
Some users experienced a difficulty with the state that was only fixable by a complete wipe of the state. A new command has been added to the script: !xp reset. This command will wipe all user settings from the state and will restore the default values, and will re-lookup player characters. This should fix this error if you encounter it.
Version 1.02:
Applying XP now rounds down to the nearest whole number rather than having huge decimals.
Version 1.01:
Numerous bug fixes from Version 1.0. Also added the ability to set what name the script uses when looking for the experience attribute.
Version 1.0:
Can now directly add xp to a specific character(s).
Can now set what experience progression the script uses. options are Pathfinder: slow, medium, fast, and pfs; and D&D5e.
Version 0.0.5:
Discovered a problem with !xp session. This has now been fixed.
Version 0.0.4:
- Fixed the error that was being thrown by undefined experience|max values. If the script can't handle your experience attribute for some reason, it should generate an error message in a gm whisper instead of crashing the API.
- You can now specify how many times to record an entered xp amount. No more having to click the macro 15 times for that big fight where a bunch of mooks were knocked about, now you just enter !xp challenge @{target/selected|token_id} 15 or !xp miscXP 200 15 if it was some sort of challenge that you don't have a npc-xp value for.
- The script should now generate gm whispers when xp is recorded in Session XP. There is also a global chat message when !xp session is triggered notifying all players of their xp gains in addition to any level up notices they may have received.
Version 0.0.2:
Fixed an issue where if a character's level was changed from a positive value (1+) to 0, the script would throw a Reference Error and shut down all scripts. The gist in the link is updated.
Note about a possible TypeError: It is possible for the script to throw a TypeError if there is a PC that has never had any experience added to it. This is because the character sheets do not generate these attributes until they have some value in them. Please make sure to enter a value in the experience field of every PC (even if it is just a zero) to get the character sheet to generate the experience attribute. You only need to do this for PC's (characters with something in the player-name attribute).
Version 0.0.1:
EDIT: Designed with Pathfinder sheet in mind, known issues with 5e sheet.
Easy Experience Script:
This script will create a character called ExperienceThresholds that it uses for most of its functionality. If there is already an
ExperienceThresholds character present, it will not make one; please make sure that you do not have a self-made ExperienceThresholds character. (highly unlikely I would think ;) )
ExperienceThresholds is created with the following attributes:
Session XP: current value is updated whenever a challenge is completed. The max value stores the xp earned in the previous session in case you need it for something else.
2, 3, 4,...: these attributes' current values are the thresholds at which characters level up to this level. The default values are from the Pathfinder medium progression path. If your game uses a different XP progression, simply change the values as needed; the script only looks at these values, it does not change them.
----------------------------------------------------------------------------------------
Use the following chat commands to utilize this script:
!xp challenge @{token_id/character_id}: Adds a character's npc-xp attribute value to the Session XP tally in the ExperienceThresholds character.
!xp miscXP ###: Adds a manually entered XP value to the Session XP tally in ExperienceThresholds.
!xp session: Divides the Session XP by the number of PCs (defined as characters that have a player-name entry), adds that xp to each PC's
current experience, and then sets the Session XP max field to the current field before resetting the current field to 0. Will also send
a chat message congratulating the character on leveling up if this causes that character's current
experience to be above or equal to the experience|max value.
When a character's level changes, the script will automatically set the experience|max value to the next level's threshold based on the values in ExperienceThresholds.
----------------------------------------------------------------------------------------
Planned features/fixes:
√Fix the incorrect handling of unpopulated experience|max values
√Add the ability to enter a number after !xp challenge @{token_id/characterid} to specify how many of the targeted challenge were completed
√Add gm whispers on each trigger so that you know the script is doing something
Add handling for player specific XP gains
Any other requests?