Allows GM to make simple transitions to show players before navigating to new screen. Can be used for narrative effect. Can now be used with macros to create transitionless Transitions. And journal entries can now be used to generate a Transition.
It's always easiest to install modules from the in game add-on browser.
To install this module manually:
https://raw.githubusercontent.com/p4535992/foundryvtt-scene-transitions/master/src/module.json
This module uses the socketLib library like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
Use the context menu on the navigator or directory to 'Create Transition'
Add background image, text, and configure to your liking and save. When you want to play it, bring up context menu and press 'Play Transition'
Transition will play and begin preloading scene. Scene will activate underneath transition.
Use the textbox sourcecode editor to add custom html and override default css.
NOTE: From fvtt 9 to fvtt 10 the old macro Transition.macro(options, showMe)
is been replaced with game.modules.get('scene-transitions').api.macro(options, showMe)
game.modules.get('scene-transitions').api.macro({
sceneID: false, // To play a transition without a scene activation, simple pass `false` as the sceneID in the data object or use the string id of the scene.
content:"TEST MACRO",
fontColor:'#ffffff',
fontSize: 28,
bgImg:'', // pass any relative or absolute image or video url here.
bgPos:'center center',
bgLoop: true, // Only for VIDEO, if true will loop the video
bgMuted: true, // Only for VIDEO, if true will play the video muted
bgSize:'cover',
bgColor:'#333333',
bgOpacity:0.7,
fadeIn: 400, //how long to fade in
delay:5000, //how long for transition to stay up
fadeOut: 400, //how long to fade out
audio: "", //path to audio file, NOTE: is not advisable to use this with a video and the property 'bgMuted = false'
allowPlayersToEnd:true, //Allows players to skip transition with a click before delay runs out.
audioLoop: true, //Loop the audio file ?
gmHide: true, // hide the transition on other windows logged in as a GM
gmEndAll: true, // when the GM clicks to end the transition - end for everyone
showUI: false, // Show the User Interface elements to all players allowing them to interact with character sheets etc
activateScene: false, // Activate the scene when play the transation ?
fromSocket: false, // This is usually a application variable for manage socket calls YOU DIDN'T NEED TO TOUCH THIS, MUST BE ALWAYS FALSE.
users: [], // show the transaction to this list of users ids, NOTE: if 'showMe' is true the current user id is add to the list
}, true ); // show to the triggering user (the one who click to the macro usually the GM)
NOTE: To play a transition without a scene activation, simple pass false
as the sceneID in the data object.
npm install
dev
will let you develop you own code with hot reloading on the browser
npm run dev
build
will build and set up a symlink between dist
and your dataPath
.
npm run build
build:watch
will build and watch for changes, rebuilding automatically.
npm run build:watch
prettier-format
launch the prettier plugin based on the configuration here
npm run-script prettier-format
lint
launch the eslint process based on the configuration here
npm run-script lint
lint:fix
launch the eslint process with the fix argument
npm run-script lint:fix
build:json
unpack LevelDB pack on src/packs
to the json db sources in src/packs/_source
very useful for backup your items and manually fix some hard issue with some text editor
npm run-script build:json
build:clean
clean packs json sources in src/packs/_source
. NOTE: usually this command is launched after the command build:json
and after make some modifications on the json source files with some text editor, but before the build:db
npm run-script build:clean
build:db
packs the json db sources in src/packs/_source
to LevelDB pack on src/packs
with the new jsons. NOTE: usually this command is launched after the command build:json
and after make some modifications on the json source files with some text editor
npm run-script build:db
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.
Thanks to anyone who helps me with this code! I appreciate the user community's feedback on this project!