Code Monkey home page Code Monkey logo

foundryvtt-scene-transitions's Introduction

Scene Transitions

Latest Release Download Count

Forge Installs

Foundry Core Compatible Version

Latest Version

Foundry Hub Endorsements

GitHub all releases

Translation status

If you want to buy me a coffee alt-text

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.

img1

img4

img2

img3

NOTE: This module is under maintenance, I have no plans to update or add features. However, I will try to fix any bugs as possible. Any contribution is welcome.

NOTE: IF YOU NEED THE FOUNDRYVTT 9 PROJECT you can install the last verified release for 9 here: https://raw.githubusercontent.com/DM-miX/scene-transitions/master/module.json

Installation

It's always easiest to install modules from the in game add-on browser.

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/foundryvtt-scene-transitions/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 like a dependency. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.

socketLib

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.

Known Issue\Limitation

Feature

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.

Api

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:'28px',
	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'
	skippable: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.

Build

Install all packages

npm install

dev

dev will let you develop you own code with hot reloading on the browser

npm run dev

build

build will build and set up a symlink between dist and your dataPath.

npm run build

build:watch

build:watch will build and watch for changes, rebuilding automatically.

npm run build:watch

prettier-format

prettier-format launch the prettier plugin based on the configuration here

npm run-script prettier-format

lint

lint launch the eslint process based on the configuration here

npm run-script lint

lint:fix

lint:fix launch the eslint process with the fix argument

npm run-script lint:fix

Issues

Any issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker, or using the Bug Reporter Module.

License

This package is under an MIT license and the Foundry Virtual Tabletop Limited License Agreement for module development.

Credit

Thanks to anyone who helps me with this code! I appreciate the user community's feedback on this project!

foundryvtt-scene-transitions's People

Contributors

chewey57 avatar dm-mix avatar larkinabout avatar mickcrozier avatar orcnog avatar p4535992 avatar pchouzenoux avatar tdhsmith avatar terabyterex avatar wsaunders1014 avatar

Stargazers

 avatar

Watchers

 avatar

foundryvtt-scene-transitions's Issues

[BUG] Playing transitions doesn't work, some file types aren't recognized

Module Version: v0.4.12

Describe the bug
WEBP and other file types fail to be used after being imported. They show up as a completely black background when previewing or playing the transition. Opacity was up. Other file types show up in the preview, but when playing the transition, only the loading bar shows up followed by nothing. It seems to pick which files work and which don't very randomly.

Turned off browser extensions. Re-installed modules. Messed around with different settings enabled. Didn't help, sadly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'edit transition'
  2. Import image
  3. Save transition
  4. Play Transition

Screenshots
scene transition bug

Browser:

  • Google Chrome

Foundry Version: Version 10, Build 291

Game System: Pathfinder 2e, 4.10.1

Option for the sound to not loop

Hi! thanks for the module, has been using if forever!

If I can ask, may you add an option for the audio to not loop, sometimes I want a transition to take more time than the audio, and it loops....

and if possible a delay for the Audio to start, fade changes the volume, but do not hold the start.. I use a lot your module with animated png to make mini intros!

by the way, what are the code for fade options for audio in macros?

sorry.. too much alredy!

tks for the amazing module!

[Feature Request] Add an example macro to the compendium

I found the example macro in your github readme, but it would have been great it if was already in the compendium for users who don't dabble in code to the github level but don't mind experimenting with macros. If you have any additional macro functionality, adding those macro examples would be much appreciated as well.

Specifically, I'm looking for the ability to run several transitions, with text overlaid, in sequence... like 4 or 5 in a row, as kind of a graphic novel cut scene without loading multiple separate maps to accomplish this. Any help with that would be greatly appreciated :) ...but not what this feature request is really about.

Can't get the macro to work

I just copied and pasted it, added the image, and when I click run, nothing.

Macro:

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:"Fewmaster Gholcag...",
fontColor:'#ffffff',
fontSize:'28px',
bgImg:'ddb-images/adventures/Dragonlance__Shadow_of_the_Dragon_Queen/assets/03-010.fewmaster-gholcag.png', // 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'
skippable: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)

[BUG] Unable to install module on Foundry v11 Build 299 local instance

Module Version: v0.3.0

Before open any issue

  1. Enable the module setting "Enable debugging"
  2. Click F12 go to the console tab
  3. make the test you want and replicate the error
  4. Go to the tab console open on point 2) and just right click and click 'Save as' and 'Save' or send a screenshot of the exception on the console.
  5. Attach the text file on the github issue with all the logs related tot he module, or send a screenshot of the messages on the console.

Describe the bug
Unable to install module to Foundry Version 11 Build 299. The following error appears: Error: Unable to load valid module from "https://raw.githubusercontent.com/DM-miX/scen-transitions/master/module.json" Module validations errors: authors: 0: name: may not be undefined

To Reproduce
Steps to reproduce the behavior:

  1. Open Foundry v11 build 299 on your desktop/server
  2. Click on "Add on Modules"
  3. Click on "Install Module"
  4. Search for "Scene Transitions"
  5. Click on "Install"
  6. See error

Expected behavior
The Module was installed

Screenshots
image
Browser:

**Foundry Version: 11 Build 299

**Game System: N/A

Additional context
N/A

Transition do not play[BUG]

I used to love this mod and I was really happy to see it resurrected and updated to V 11.
Unfortunately after having set up a few transitions I tried them and found out none of the do play. What could be the issue? Are there other known modules conflicting with this one?

[BUG] Video does not play first time

Module Version: v0.5.0

Sadly this is a bug where the module believes it is functioning correctly, so there are no logs to attach. There will be a few screenshots of what I believe to be the culprit however, and I've recorded a quick video showing my exact issue in action.

Background
I understand this isn't exactly the intended usage of this module, but I've been using this module for its fullscreen video to show cutscenes to my players. The campaign is based on another game, so prerendered recordings of it help communicate ideas in a way my tabletop representation can't. Being able to show these videos in a timely manner without major glitches would be really nice.

Describe the bug
I'm having an issue where videos will not play the first time the transition is triggered. The audio, which is set to the same video (I've found it's increased the consistency in which the video will work properly) plays just fine on the first load, but the video is simply nowhere to be seen. On the second load of the video, everything seems to work fine, at least. After extensive testing between myself and one of my players, I believe this is caused by div style blocks suddenly being populated only on the second load. As you can see down in the Screenshots section, the first playthrough lacks the style portions of the relevant divs. Once the transition begins the second time, these are filled properly with all the options I filled out in the macro.

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to show video transition
  2. Audio plays, but the screen overlay does not
  3. Try again
  4. ???
  5. Profit

Expected behavior
I've already built in a 10 second wait, so I'd really like the video to play the first time if possible.

Screenshots
During the first playthrough:
image
During the second playthrough:
image

Browser:
This has occurred both in the Foundry client itself and every Chromium based browser I've tried it in. If it's believed the exact browser is the issue, I can reach out to each of my testers and ask for their browser of choice.

Foundry Version:
11, Build 315

Game System:
Custom System Builder

Additional context
I've recorded the issue and uploaded it in an unlisted video here. I will warn you to brace your ears before watching, as my computer is not a quiet one and it is sadly picked up by the microphone and OBS very well.

[BUG] - Cannot save or preview transitions

Module Version: v0.4.6

Describe the bug
When attempting to create a new transition, an error is thrown, the form will not close, and nothing is saved.

To Reproduce
Steps to reproduce the behavior:
Right click map
Create Transition
Save

Expected behavior
Form closes and transition saves

Screenshots
image.

Browser:
Chrome

Foundry Version:
v10 Build 291
Game System:
DND5e 2.0.3

What are the accepted parameters for bgSize?

I am trying to make the transition images not 'cover' the entire screen as they are being stretched and cut off. Is there an alternative value for bgSize that would be accepted? I have tried just setting a number (eg: 1000) and dimensions (eg: 1920x1080), but it has not changed the result. Not sure if I am missing something or right now this functionality does not exist.

[BUG] Upgrading module for v12

Module Version: v0.5.3

Foundry Version
v12

Ther have been changes to the manifest for v12. I will make the changes like I did for v11. There are a few more changes so I want to take time to read through and assess the impact. creating this bug to help me track.

[BUG] V11 Error

Module Version: v0.4.12

Describe the bug

module "scene-transitions" uses pack.private which has been replaced with pack.ownership

Foundry Version: 11

Typo in `src/templates/transition-form.html`

Hello! There is a slight typo in src/templates/transition-form.html. The current text reads:

<p class="notes">Allow players to interact woth character sheets etc</p>

which should be:

<p class="notes">Allow players to interact with character sheets etc.</p>

on line 128.

Great module by the way!

Text editing still an issue with 0.4.6 [BUG]

After updating from The Forge to 0.4.6 discovered that when I tried to edit existing text, as soon as I clicked into the text block all the pre-existing text disappeared. Started over, replaced the text, tried to save and close, but it wouldn't close the edit window. Manually closed the window and opened it back up under the edit function. Text was there but once again, as soon as I clicked into the text block the text disappeared.

Play Transition doesn't work with "Don't show in other GM windows" checked [BUG]

Module Version: v0.4.5

Describe the bug
Cannot play transitions, but I can edit/delete them with "Don't show in other GM windows" checked

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Browser:
Any

Foundry Version:

Game System:
Blade Runner RPG 10.0.2
Additional context
"Play transition" loads the scene but doesn't play the transition or view/activate the scene

Are there still builds available for v9?

Hello there,

Long story short - I'm looking for mod builds for v9 of Foundry, since I haven't updated to v10 yet (and am not planning on updating for a while). Is there still a way to download and install the v9 builds for this mod?

Can't edit transition text on Foundry 10.291 - module 0.4.4

I can't add/edit transition text anymore, worked with the previous foundry version

Immagine 2022-12-03 110055

Foundry VTT | Rendering TransitionForm
commons.js:1703 Error: The content option for the editor handlebars helper has been deprecated. Please pass the content in as the first option to the helper and ensure it has already been enriched by TextEditor.enrichHTML if necessary
Deprecated since Version 10
Backwards-compatible support will be removed in Version 12
    at Object.logCompatibilityWarning (commons.js:1692:19)
    at Object.editor (foundry.js:7080:21)
    at Object.c (handlebars.min.js:27:19853)
    at Object.eval [as main] (eval at createFunctionContext (handlebars.min.js:29:1808), <anonymous>:37:145)
    at c (handlebars.min.js:27:15429)
    at d (handlebars.min.js:27:15744)
    at e (handlebars.min.js:28:22748)
    at renderTemplate (foundry.js:6948:10)
    at async TransitionForm._renderInner (foundry.js:5271:16)
    at async TransitionForm._renderInner (foundry.js:5833:18)
    at async TransitionForm._render (foundry.js:5114:19)
    at async TransitionForm._render (foundry.js:5822:5)

logCompatibilityWarning | @ | commons.js:1703
-- | -- | --
  | editor | @ | foundry.js:7080
  | c | @ | handlebars.min.js:27
  | eval | @ | VM582:37
  | c | @ | handlebars.min.js:27
  | d | @ | handlebars.min.js:27
  | e | @ | handlebars.min.js:28
  | renderTemplate | @ | foundry.js:6948
  | await in renderTemplate (async) |   |  
  | _renderInner | @ | foundry.js:5271
  | _renderInner | @ | foundry.js:5833
  | _render | @ | foundry.js:5114
  | await in _render (async) |   |  
  | _render | @ | foundry.js:5822
  | render | @ | foundry.js:5067
  | callback | @ | scene-transitions.js:148
  | #onClickItem | @ | foundry.js:56177
  | dispatch | @ | jquery.min.js:2
  | y.handle | @ | jquery.min.js:2


[Feature request] Full module integration with Foundry

Hi!

Before this module switched developers I created this request, which I would still like to see implemented. But I believe that my problem would be solved through this idea.

In summary, implementing the functionality of using this module's scene transition by default, whenever the function of activating the scene from Foundry itself is performed, respecting the transition created for the scene, or even better, a default transition created in the settings of the module.

Would it be possible to implement this? Thank you!

Transitions not working in v10

After setting up a transition, it just doesn't work.

  • I'm testing the module in v10.291 in the most recent version of the Electron app.
  • I'm testing in a new world (D&D 5e 2.1.5) with no other modules enabled other than the support modules (libWrapper and socketlib).
  • I can set up a transition with no apparent issues.
  • After setting up a transition, I click "Play Transition" and see the "Loading" notification at the top, but nothing happens.

Randomized text

It would be cool if I could designate a few different text, like short blurbs, or short lore dumps that would randomly be displayed on the transition scene. This would allow me to passively inform my players about the world they are playing in and remind them of some more obscure rules.

Video or gif do not start at the beginning

Hello and thank you for this great module. I want to use it to play a video or gif when my players move from scene to scene on the landing page. However, the video does not always start at the beginning. Is there a command I can use to fix this? Thank you very much.

When Activation Scene change through Transitions it does not load. [BUG]

Module Version: v0.0.0

Before open any issue

  1. Enable the module setting "Enable debugging"
  2. Click F12 go to the console tab
  3. make the test you want and replicate the error
  4. Go to the tab console open on point 2) and just right click and click 'Save as' and 'Save' or send a screenshot of the exception on the console.
  5. Attach the text file on the github issue with all the logs related tot he module, or send a screenshot of the messages on the console.

Describe the bug
Inconsistency with scene transitions using this mod. When attempting to change scenes players are prompted by permission problems. If a playlist is set to play on the scene they are arriving on they get "lacks permission to update playlist" or even with that removed they get "lacks permission to update scene." Now I've created a scene today and the scene transition works, but these scenes that are having issues are all of the scenes I created prior to installing this mod. I even tested duplicating the problematic scenes and seeing if their duplicate had the same issue, which it does.

To Reproduce
Steps to reproduce the behavior:

  1. Install.
  2. Create a transition and select "Activate Scene for Everyone" at the bottom of the settings.
  3. Activate Scene
  4. See error from player's side.

Expected behavior
No where in the instructions did it mention anything about permissions and even watched a video on the setup of this, but I would have expected the transition to play and the players to transition to the new scene since I selected "Activate Scene for everyone" but when I do players get the prompt "Cannot edit the scene" permissions error. I do not know why.

Screenshots
image
image

Browser: Any

Foundry Version: v10.291

Game System: DnD5e = Fifth Edition System v2.2.2

Additional context
Add any other context (like other modules installed) about the problem here.

[Feature Request] Unlimited duration and Fadeout on click to end

I use scene transitions to provide my players with a copy of the text I'm reading for introductions to the session and some specific planned scenes. I have players who retain information better if they can read along with what's being said, and this module is great for that.

I do have the issue that I have to set a really high timer if I want to be able to read through all the text without the transition fading before I'm done. Yet, if I don't set a timer for the exact amount of time it takes me to read the text, then clicking to end for everyone results in a sharp cut to the background scene, rather than the hoped for fade out.

I also sometimes split introduction texts into two separate transitions across two scenes; in part for different background music, in part because I move onto another section talking about something else, and in part because the text can get really long.

What would make this module perfect for me would be:

  • to be able to set transitions without time limit (must be clicked away to continue);
  • having "click to continue" options also trigger the fade out rather than a sharp cut;
  • starting another transition to fade in over the top of the previous one, and then ending the previous one in the background.

Are these possible at all?

[BUG] Grey screen on player side when try to show a video

Module Version: v0.0.0

Before open any issue

  1. Enable the module setting "Enable debugging"
  2. Click F12 go to the console tab
  3. make the test you want and replicate the error
  4. Go to the tab console open on point 2) and just right click and click 'Save as' and 'Save' or send a screenshot of the exception on the console.
  5. Attach the text file on the github issue with all the logs related tot he module, or send a screenshot of the messages on the console.

Describe the bug
Created a scene transition that plays a short video.
Saved the transition as a macro.
game.modules.get('scene-transitions').api.macro({
sceneID: false,
content:"",
fontColor:'#ffffff',
fontSize:'28px',
bgImg:'Video/PaBtSO%20Intro.mp4',
bgPos:'center center',
bgLoop: true,
bgMuted: true,
bgSize:'cover',
bgColor:'#333333',
bgOpacity:1,
fadeIn: 400,
delay:115000,
fadeOut: 400,
audio: "",
skippable:true,
audioLoop: false,
gmHide: false,
gmEndAll: true,
showUI: false,
activateScene: false,
fromSocket: false,
users: []
}, true );

Placed the macro in the toolbar.
Plays perfectly as GM.
Only shows as a grey screen on the players screen.
This is true where the macro is clicked by the GM or the player.
The console is reporting no issue.
If play place the video in a token, both the player and gm can see and hear the video.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
I expected the video to start in both the GM and players screens when I clicked on the macro in the tool bar.

Screenshots
If applicable, add screenshots to help explain your problem.

GM Screen
image

image

Player screen
image

Browser:

Foundry Version:

Build 315Vrsion 11 Stable

Game System:

D&D 3.1.2

Additional context
Add any other context (like other modules installed) about the problem here.

[BUG] Text behind background image (not visible)

Module Version: v2.3.20

Describe the bug
I have an issue when creating a scene transition with a background image and text. The text seems to be behind the background image meaning the text won't show when the image is at 1 opacity. This occurs with only the Scene Transitions module active as well.

Expected behavior
Could the text be placed on top of the image so it is visible with an image behind it?

FVTT 10.288
DnD5e

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.