Register

Alignment Tracker

An Add-on Module for Foundry Virtual Tabletop

Author: Programming Dragon Project Source: Project URL Versions 10+ (Verified 12) Last Updated 3 months, 1 week ago

Alignment Tracker

This tool was written to cover a need I had, while running a roleplaying game with my players. Many players would declare that their character was one alignment, but during game play, I noticed that their actions were more chaotic, when they declared to be lawful, or they played their character more evil, when they stated their character was good.  It's not the players fault, generally character alignments are not really considered during character creation, and seldom are they even selected for the character.

This tool allows the gamemaster to keep track of the character's actions, and tweak the character's alignment based on these actions.  Then be able to have it presented in a graph format, to then do what you wish in your game setting/story.

In the end, it doesn't change anything with the gameplay, but could be used by gamemasters that want to incorporate the characters actions into the storyline: Maybe your "lawful good" paladin actually tends to play more as "lawful evil" and they come across a cursed weapon that only evil characters can handle without having damage inflicted upon them.  Looking at the graph will show this.   Truly the applications are endless.

This is all wrapped up in an easy to use UI interface, so the gamemaster is not burdened with any of the details.

 

But this module also has an API exposed for developers that wish to interface with the alignment tracker for their needs.

API Reference

Get all the alignment trackers for the game mapped by userrId

trackers(actorId) = AlignmentTracker.getAllTrackers();

Get an array of all the alignment trackers for a specific user, keyed by actorId

trackers[] = AlignmentTracker.getTrackersForUser(userId);

Parameter Type Description
userId string Required: UUID assigned by Foundry

Get an alignment tracker for a specific tracker id

tracker = AlignmentTracker.getByTrackerId(trackerId);

Parameter Type Description
trackerId string Required: Tracker UUID assigned by Foundry

Get an alignment tracker for a specific actor id

tracker = AlignmentTracker.getByActorId(actorId);

Parameter Type Description
actorId string Required: Actor UUID assigned by Foundry

Create a new alignment tracker

tracker = AlignmentTracker.create(userId, actorId);

Parameter Type Description
userId string Required: UUID assigned by Foundry
actorId string Required: Actor UUID assigned by Foundry

Update an alignment tracker for a specific tracker id

tracker = AlignmentTracker.updateByTrackerId(trackerId, alignmentObject);

Parameter Type Description
trackerId string Required: Tracker UUID assigned by Foundry
alignmentObject object Required: Allows the caller to update either (or both of) the chaosLevel or evilLevel for an actor.  The range of values is 0: (good/lawful) - maxValue (evil/chaotic,) whereas maxValue will be defined in the tracker.  This allows for gradients in alignment.

Object Structure:

{
    chaosLevel: {value},
    evilLevel: {value}
}

Update an alignment tracker for a specific actor id

tracker = AlignmentTracker.updateByActorId(actorId, alignmentObject);

Parameter Type Description
actorId string Required: Actor UUID assigned by Foundry
alignmentObject object Required: Allows the caller to update either (or both of) the chaosLevel or evilLevel for an actor.  The range of values is 0: (good/lawful) - maxValue (evil/chaotic,) whereas maxValue will be defined in the tracker.  This allows for gradients in alignment.

Object Structure:

{
    chaosLevel: {value},
    evilLevel: {value}
}

Adjust the Lawful/Chaotic level of an alignment tracker for a specific tracker id

tracker = AlignmentTracker.adjustChaoticByTrackerId(trackerId, adjustment);

Parameter Type Description
trackerId string Required: Tracker UUID assigned by Foundry
adjustment integer Required: Negative numbers move towards lawful, positive towards chaotic

Adjust the Lawful/Chaotic level of an alignment tracker for a specific actor id

tracker = AlignmentTracker.adjustChaoticByActorId(actorId, adjustment);

Parameter Type Description
actorId string Required: Actor UUID assigned by Foundry
adjustment integer Required: Negative numbers move towards lawful, positive towards chaotic

Adjust the Good/Evil level of an alignment tracker for a specific tracker id

tracker = AlignmentTracker.adjustEvilByTrackerId(trackerId, adjustment);

Parameter Type Description
trackerId string Required: Tracker UUID assigned by Foundry
adjustment integer Required: Negative numbers move towards good, positive towards evil

Adjust the Good/Evil level of an alignment tracker for a specific actor id

tracker = AlignmentTracker.adjustEvilByActorId(actorId, adjustment);

Parameter Type Description
actorId string Required: Actor UUID assigned by Foundry
adjustment integer Required: Negative numbers move towards good, positive towards evil

Delete alignment tracker for a specific tracker id

AlignmentTracker.deleteByTrackerId(trackerId);

Parameter Type Description
trackerId string Required: Tracker UUID assigned by Foundry

Delete alignment tracker for a specific actor id

AlignmentTracker.deleteByActorId(actorId);

Parameter Type Description
actorId string Required: Actor UUID assigned by Foundry

Delete all the alignment trackers for a specific user id

AlignmentTracker.deleteAllByUserId(userId);

Parameter Type Description
userId string Required: UUID assigned by Foundry

Delete all the alignment trackers for all users

AlignmentTracker.deleteAll();

Delete the orphaned alignment trackers

AlignmentTracker.removeOrphans();

Categories

Available Versions

  1. Version v1.0.3

    3 months, 1 week ago
    Foundry Version 10+ (Verified 12) Manifest URL
  2. Version v1.0.2

    3 months, 2 weeks ago
    Foundry Version 10+ (Verified 12) Manifest URL
  3. Version v1.0.1

    3 months, 2 weeks ago
    Foundry Version 10+ (Verified 12) Manifest URL
  4. Version V1.0.0

    3 months, 2 weeks ago
    Foundry Version 10+ (Verified 12) Manifest URL