THIS MODULES IS DEPRECATED ON V11 IN FAVOR OF Rideable
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
It's always better and easier to install modules through in in app browser. Just search for "Mount Up!"
To install this module manually:
- Inside the Foundry "Configuration and Setup" screen, click "Add-on Modules"
- Click "Install Module"
- In the "Manifest URL" field, paste the following url:
https://raw.githubusercontent.com/p4535992/foundryvtt-mountup/master/src/module.json
- Click 'Install' and wait for installation to complete
- Don't forget to enable the module in game using the "Manage Module" button
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.
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.
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.
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.
- The multi rider functionality on the same mount work partially, but it should be enough for most use cases...
-
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 separately 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
-
Enable drag and drop token for mountup: If Enabled when dragging and dropped a token it will try to mount the below token if present and if you have owner permissions on that token
-
Disable the HUD integration for the 'Mount' action: Make sense only with 'Enable drag and drop token for mountup' enabled. It will hide the hud integration of the hud module for mountup, but it will appear for the dismount
-
Enable show dialog on drop Mount Up: Make sense only with 'Enable drag and drop token for mountup' enabled. If enabled when you drop a token (rider) on a token (mount) if will pop out a dialog for confirmation
To mount a token:
- Select the "rider" and the "mount" tokens.
- Right click on the "mount" icon to bring up the token HUD.
- Click on the horse icon (you can change this in your game).
The rider will now be linked to the mount. Anywhere the mount moves, the rider follows.
To dismount a token from a token:
- Right click on the "mount" to bring up the token HUD.
- Click on the dismount icon.
The rider will now be un-linked from the mount, and is free to move on their own.
Kneel before the genius of KayelGee author of Token Attacher and thank discord for this amazing feature.
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
Now when you mount some flying mount with the active effect ATMU.flying = true
a beauty shadow effect is applied with the module Token Magic.
NOTE: You must enable the active effect management for this to work.
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
Every active effect data of this is module use any changes with the prefix ATMU
acronym 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 = true , ATMU.toMountOnMount = false |
ATMU.toMountOnDismount |
boolean | Transfer this active effect from the rider to the mount when "Dismount Up" | ATMU.toMountOnDismount = true , ATMU.toMountOnDismount = false |
ATMU.toRiderOnMount |
boolean | Transfer this active effect from the mount to the rider when "Mount Up" | ATMU.toRiderOnMount = true , ATMU.toRiderOnMount = false |
ATMU.toRiderOnDismount |
boolean | Transfer this active effect from the mount to the rider when "Dismount Up" | ATMU.toRiderOnDismount = true , ATMU.toRiderOnDismount = false |
ATMU.flying |
boolean | Check is the mount is a flying one. If tru we apply the token magic effect "flying" | ATMU.flying = true , ATMU.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.
Some functionality is exposed to macros for repeatable usage. All macros will either accept a token ID or name (case insensitive).
NOTE: It's advisable to use the game.modules.get('mountup').api.
insrtead MountUp.
for best practices
You can mount a rider to a mount using the following syntax:
MountUp.mount('RiderNameOrId', 'MountNameOrId')
async game.modules.get('mountup').api.mount('RiderNameOrId', 'MountNameOrId')
or you can use the module 'token-attacher'
You can have a rider dismount by passing it's token name or id:
MountUp.dismount('RiderNameOrId)
async game.modules.get('mountup').api.mount('RiderNameOrId', 'MountNameOrId')
or you can use the module 'token-attacher'
You can have a mount drop its rider by passing the mount's name or id:
MountUp.dropRider('MountNameOrId')
async game.modules.get('mountup').api.dropRider('MountNameOrId')
You can have a mount drop its rider by passing the mount's name or id:
MountUp.toggleMount('RiderNameOrId', 'MountNameOrId')
async game.modules.get('mountup').api.toggleMount('RiderNameOrId', 'MountNameOrId')
Select some tokens on the canvas and run the following macro.
async game.modules.get('mountup').api.cleanUpTokenSelected()
Select some tokens on the canvas and run the following macro.
async game.modules.get('mountup').api.cleanUpToken(token: Token)
npm install
will build the code and copy all necessary assets into the dist folder and make a symlink to install the result into your foundry data; create a
foundryconfig.json
file with your Foundry Data path.
{
"dataPath": "~/.local/share/FoundryVTT/"
}
build
will build and set up a symlink between dist
and your dataPath
.
npm run-script build
You don't need to build the foundryconfig.json
file you can just copy the content of the dist
folder on the module folder under modules
of Foundry
build:watch
will build and watch for changes, rebuilding automatically.
npm run-script build:watch
clean
will remove all contents in the dist folder (but keeps the link from build:install).
npm run-script clean
lint
launch the eslint process based on the configuration here
npm run-script lint
lintfix
launch the eslint process with the fix argument
npm run-script lintfix
prettier-format
launch the prettier plugin based on the configuration here
npm run-script prettier-format
package
generates a zip file containing the contents of the dist folder generated previously with the build
command. Useful for those who want to manually load the module or want to create their own release
npm run-script package
Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.
This package is under an MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development.
- A little part of code is inspired from kandashi and the module Condition Management
- This project is powered by injectConfig library by @theripper93
Bootstrapped with League of Extraordinary FoundryVTT Developers foundry-vtt-types.
Mad props to the 'League of Extraordinary FoundryVTT Developers' community which helped me figure out a lot.