module

Mount Up!

Endorsements
1
Installs
3.26%
Comments
0
Latest version3.2.25
Minimum Core9
Compatible Core9
Last updated1 year ago
Created3 years ago
Authors
Languages 日本語
English
Systems All systems
Dependencies libWrapper
Token Attacher
Token Z
Library: Active Effect Manager
Project source Project URL
Report bugs Bug tracker URL
Read-me Readme URL
Changelog Changelog URL

Mount Up!

Mount Up! is a module for Foundry VTT that allows tokens to carry or be carried by other tokens. This is completely system agnostic, and fully customizable to fit right into your game.

NOTE: If you are a javascript developer and not a typescript developer, you can just use the javascript files under the dist folder

Installation

It's always better and easier to install modules through in in app browser. Just search for "Mount Up!"

To install this module manually:

  1. Inside the Foundry "Configuration and Setup" screen, click "Add-on Modules"
  2. Click "Install Module"
  3. In the "Manifest URL" field, paste the following url: https://raw.githubusercontent.com/p4535992/MountUp/master/src/module.json
  4. Click 'Install' and wait for installation to complete
  5. Don't forget to enable the module in game using the "Manage Module" button

libWrapper

This module uses the libWrapper library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

token-attacher

This module uses the token-attacher library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

token-z

This module uses the token-z library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

active-effect-manager-lib

This module uses the active-effect-manager-lib library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

Known IssueLimitation

  • This module can be a lot better with this feature asked to the token-attacher developer i invite you to support the request of this feature [Feature Request] Allow the rider token to be moved as long as it does not leave the area of mount token, sorry not smart enough for understand how can i do that by myself...
  • If you scale the token mount the rider position can be a little out of coordinates... i can ignore this if a solve the first point
  • The multi rider functionality on the same mount work partially, but it should be enough for most use cases... i can ignore this if a solve the first point

Settings

  • Icon: The icon to show in the HUD
  • HUD Column: Which HUD column to place the button in
  • HUD Top/Bottom: Where to place the button in the column
  • Should riders be locked to mounts?: [No need anymore] If enabled, riders will be unable to move seperately from their mount until dismounted. NOTE: with the new 'can Move Constrained' from Token Attacher you don't need to touch this anymore, but i leave if anyone find useful for set a initial position of the rider on the mount.
  • Should riders rotate with mounts?: [No need anymore] If enabled, rider rotation will be updated to match mount rotation. NOTE: with the new 'can Move Constrained' from Token Attacher you don't need to touch this anymore, but i leave if anyone find useful for set a initial position of the rider on the mount."
  • Rider Horizontal Alignment: [No need anymore] By default is center. NOTE: with the new 'can Move Constrained' from Token Attacher you don't need to touch this anymore, but i leave if anyone find useful for set a initial position of the rider on the mount.
  • Rider Vertical Alignment: [No need anymore] By default is center. NOTE: with the new 'can Move Constrained' from Token Attacher you don't need to touch this anymore, but i leave if anyone find useful for set a initial position of the rider on the mount.
  • Send messages to chat: Should chat messages about mounting/carrying and dismounting/dropping be sent to chat?
  • Mount Message Format: How mounting chat messages should be formatted if enabled. (use {rider} and {mount} for name substitution)
  • Dismount Message Format: How dismounting chat messages should be formatted if enabled. (use {rider} and {mount} for name substitution)
  • Rider Position: [No need anymore] Set the position for the rider by default is center. NOTE: with the new 'can Move Constrained' from Token Attacher you don't need to touch this anymore, but i leave if anyone find useful for set a initial position of the rider on the mount.
  • Enable active token mount up management: Every time you mount up or dismount on the mount token and/or rider token some active effect can be added or removed based on the changes configuration on both rider and mount
  • Enable auto update elevation: If enabled thi setting will make sure to always sync the riders elevation with the mount elevation
  • Enable 'can move constrained': Enable the the new 'Can Move Constrained' feature from Token Attacher

Usage

Mounting

To mount a token:

  1. Select the "rider" and the "mount" tokens.
  2. Right click on the "mount" icon to bring up the token HUD.
  3. Click on the horse icon (you can change this in your game).
    mount example
    The rider will now be linked to the mount. Anywhere the mount moves, the rider follows.

Dismounting

To dismount a token from a token:

  1. Right click on the "mount" to bring up the token HUD.
  2. Click on the dismount icon.
    dismount example
    The rider will now be un-linked from the mount, and is free to move on their own.

Partial multi mounting is supported

img

Can Move Constrained

Kneel before the genius of KayelGee author of Token Attacher and thank discord for this amazing feature.

img

Auto Elevation [EXPERIMENTAL]

If enabled thi setting will make sure to always sync the riders elevation with the mount elevation, it can be useful for scene with the levels module

img

Flying away !!!!

Now when you mount some flying mount with the active effect ATMU.flying = true a beauty shadow effect is apllie dwith the module Token Magic.

img

img

NOTE: You must enable the active effect management for this to work.

Active Effect of Mount Up and Dismount up

Every time you mount up or dismount on the mount token and/or rider token some active effect can be added or removed based on the changes configuration on both rider and mount

img

How the active effect name is checked on the module ?

You can use any active effect where the name is founded from the following code of the module:

const effectNameToCheck = <EFFECT NAME>;
// For each active effects on the token/actor
let result = false;
for(const effect of effects){
    // regex expression to match all non-alphanumeric characters in string
    const regex = /[^A-Za-z0-9]/g;
    // use replace() method to match and remove all the non-alphanumeric characters
    result  = effectNameToCheck.replace(regex, "").toLowerCase().startsWith(effectIdOfTheModule.replace(regex, "").toLowerCase());
    if(result)break;
}
return result;

What active effect data changes are used from this module ?

Every active effect data of this is module use any changes with the prefix ATMU acronim for Active Token Mount Up .

There three type of these AE used and supported from this module:

Key Syntax Type Description Examples Active Effect Data [Key = value]
ATMU.toMountOnMount boolean Transfer this active effect from the rider to the mount when "Mount Up" ATMU.toMountOnMount = trueATMU.toMountOnMount = false
ATMU.toMountOnDismount boolean Transfer this active effect from the rider to the mount when "Dismount Up" ATMU.toMountOnDismount = trueATMU.toMountOnDismount = false
ATMU.toRiderOnMount boolean Transfer this active effect from the mount to the rider when "Mount Up" ATMU.toRiderOnMount = trueATMU.toRiderOnMount = false
ATMU.toRiderOnDismount boolean Transfer this active effect from the mount to the rider when "Dismount Up" ATMU.toRiderOnDismount = trueATMU.toRiderOnDismount = false
ATMU.flying true Check is the mount is a flying one. If tru we apply the token magic effect "flying" ATMU.flying = trueATMU.flying = false

For now no automatic UI is prepared (and don't think we need one) just created a active effect and add this changes on it.

NOTE: by default all effect from this module are temporary, but you can customize like you want.

API

Some functionality is exposed to macros for repeatable usage. All macros will either accept a token ID or name (case insensitive).

Macro to Mounting

You can mount a rider to a mount using the following syntax:

MountUp.mount('RiderNameOrId', 'MountNameOrId')

or you can use the module 'token-attacher'

Macro to Dismounting

You can have a rider dismount by passing it's token name or id:

MountUp.dismount('RiderNameOrId)

or you can use the module 'token-attacher'

Macro to Drop a rider from a mount

You can have a mount drop its rider by passing the mount's name or id:

MountUp.dropRider('MountNameOrId')

Macro function to toggle a rider mount pair

You can have a mount drop its rider by passing the mount's name or id:

MountUp.toggleMount('RiderNameOrId', 'MountNameOrId')

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x