Code Monkey home page Code Monkey logo

foundryvtt-sequencer's Introduction

Sequencer

Latest Release Download Count Forge Installs Foundry Compatible VersionFoundry Verified Version Latest Version

Animation showing the Sequencer


Fantasy Computerworks Logo

A module made by Fantasy Computerworks.

Other works by us:

  • Fantasy Calendar - The best calendar creator and management app on the internet
  • Item Piles - Drag & drop items into the scene to drop item piles that you can then easily pick up
  • Tagger - Tag objects in the scene and retrieve them with a powerful API
  • Token Ease - Make your tokens feel good to move around on the board
  • Rest Recovery - Automate most D&D 5e long and short rest mechanics

Like what we've done? Buy us a coffee!

Buy Me a Coffee at ko-fi.com


Powered by Typhon JS ❤️Svelte


What is Sequencer?

Sequencer is a powerful module that lets you play visual effects in your scenes, attaching them to tokens or other elements, animating them, quickly and easily removing them, play sounds for all or specific players, run macros one after another in a controlled way, and so much more.

Effects shown on this wiki

Installation

You can install it through the Foundry module installer, or by copy-pasting this link into the module installer:

https://github.com/FantasyCalendar/FoundryVTT-Sequencer/releases/latest/download/module.json

If you want to test the beta track, you can install it from this link - NOT RECOMMENDED FOR NOVICE USERS: https://raw.githubusercontent.com/fantasycalendar/FoundryVTT-Sequencer/next/module.json

Contributing

Sequencer operates under the MIT license, so feel free to contribute, fork, redistribute any part of the module.

Developing Locally

To start running this module locally and developing for it, you will need to run the following commands in your terminal while in the directory of the module; npm install -> npm run build -> npm run dev

Credits

Feedback and amazing help

  • U-man over at FXMaster for his implementation of layers - Copyright © 2020 Emmanuel Ruaud
  • Otigon with his Automated Animations for his work on handling standardized effects - Copyright © 2020 Otigon
  • ghost (ghost#2000 on discord) for his fixes to the audio sections
  • Kandashi (Kandashi#6698 on discord) for the inspiration and code of persistent effects
  • Naito (Naito#1235 on discord) for his assistance with improving the Database Viewer's speed
  • League of Extraordinary FoundryVTT Developers for their ongoing support and suggestions
  • Foundry VTT Core code for heaps of inspiration

Other Attributions

foundryvtt-sequencer's People

Contributors

brothersharper avatar ghost91- avatar git-gor avatar haxxer avatar laquasicinque avatar lukeabby avatar mrvauxs avatar txm3278 avatar v13axel avatar zotydev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

foundryvtt-sequencer's Issues

Sound control features extesion

Preface and context:
Sequencer is already the best way to tinker with animations, but what if we tinker with sounds further?!
this feature request is largely driven by a use case focused on getting visual and auditory feedback for "landing page, navigation menu buttons" but i foresee the full scope of the features to extend past it.

Objective:
Full control in macros over what sounds are played and how.

Description:
Ability to loop a sound forever with a simple flag.
Play sound just for the client triggering as opposed to all clients.
Ability to stop all sounds playing locally to a client. (optionally, being able to end all local looping sounds could possibly be better if otherwise would stop a non looping sound midway)

Problem with addOverride

I think that the method that overrides the effect data is not working correctly, and it seems to me that the problem is that the code override treatment is being executed before the generation of some data (I think), for example the "scale" which is what I'm trying to override...

for example in the effects.js file the override treatment is in this part of the code:
(line 539)

for(let override of this._overrides) {
    data = await override(this, data);
}

But then later in the code you do this (among other things)
(line 562)

data = await this._calculateHitVector(data);

and inside that calculateHitVector method you calculate the "scale" and set it to data object, so my override function that try to overrride the "scale" is also being overwritten.

I´m not sure if the solution is to move the overriden part of the code to the end of the method sanitizeEffectData that will fix my problem, but I´m not sure if doing that can break something else.

And yes, I know is weird that I want to overwrite something that is calculated, but I have a special case when I want to overwrite only the "Y" in the scale and let the "X" calculated.

Thanks.

The method reachTowards in non JB2A effects have problems with the start and end points

Hi, with the change that you did in the 0.57 version, removing this line of code in the _determineJB2A() method

if (!this._JB2A) return [100,0,0];

With this change the effects that are not JB2A now start with starPoint and endPoint of 200 and not in 0, so the animations don´t start and end in the points that are provided by the inLocation and/or reachTowards.

Thanks.

[Request] Let us provide multiple objects as sources or targets

Ok new suggestion. If I've got an effect chain (that's what I've been calling .effect().method1().method2().etc() in my head), and a method in that chain takes an object/token as a parameter, what if we could give it an array and it would apply that effect chain to every object in that method?

So something like new Sequence().effect().file(boom).atLocation([token1, token2, token3]).play() and it would play the boom on each of those tokens.

Or something like new Sequence().effect().file(arrowTrap).atLocation([trapTile1, trapTile2]).reachTowards([token1, token2]).play() and it would cause both trap tiles to shoot at both tokens (for a total of 4 animations).

I realize it could quickly get out of hand if someone was irresponsible with how many tokens they passed into multiple places.

Error when trying to preload files

Getting this error when trying to preload a few a files
image

The preloader is being called in a world script using

game.AnimFunctions.tollTheDead(args[0]);

here is the full function being run

    function tollTheDead(rollData) {
        let caster = canvas.tokens.controlled[0];

        let audioFile = "EffectAudioDB.TollTheDead";
        let animFile = "AnimDB.TollTheDead";
        let animFilePath = SequencerDatabase.getEntry(animFile).file;
        let audioFilePath = SequencerDatabase.getEntry(audioFile).file;
        console.log("animFilePath", animFilePath);
        console.log("audioFilePath", audioFilePath);
        let target = rollData.failedSaves[0];
        if (target != undefined) {
            let targetCurrentHP = target._actor.data.data.attributes.hp.value;
            let targetMaxHP = target._actor.data.data.attributes.hp.max;
            let damageDie = "1d8";
            let animScale = 0.3;
            let volume = 0.2;
            if (targetCurrentHP < targetMaxHP) {
                damageDie = "1d12";
                animScale = 0.6;
                volume = 0.3;
            }
            let damageRoll = new Roll(`${damageDie}`).roll();

            executeBell();

            async function executeBell(){
                await game.dice3d?.showForRoll(damageRoll);
                new MidiQOL.DamageOnlyWorkflow(rollData.actor, rollData.tokenId, damageRoll.total, "necrotic", [target], damageRoll, { flavor: `Toll the Dead - Damage Roll (${damageDie} Necrotic)`, itemCardId: rollData.itemCardId });
                await SequencerPreloader.preloadForClients([animFilePath, audioFilePath], true);
                let sequence = new Sequence()
                    .effect()
                    .file(animFile)
                    .atLocation(target)
                    .scale(animScale)
                    .belowTokens(false)
                    .sound()
                    .file(audioFile)
                    .volume(volume)
                    .fadeInAudio(100)
                    .fadeOutAudio(1500)
                sequence.play();
            }
        }
    }
    ```

Core V9.9.238 Throwing Error: 'isPrivate is not defined' with AutoAnimations module lodaded.

Describe the bug
On screen load I get an error, I think the problem is with Autoanimations module, but thought I'd post it here in case I'm incorrect (I only understand the console enough to be dangerous). :

Console Error info:
foundry.js:316 ReferenceError: isPrivate is not defined
[Detected 2 packages: autoanimations, sequencer]
at autoAnimations.js:88:75
at Function._call (foundry.js:294:14)
at Function.call (foundry.js:279:33)
at module.js:35:15

AutoAnimations js that is producing the error:
// Registers Database with Sequencer
Hooks.on("sequencerReady", () => {
let obj01 = moduleIncludes("jb2a_patreon") === true ? JB2APATREONDB : JB2AFREEDB;

Sequencer.Database.registerEntries("autoanimations", obj01, isPrivate = true);
if (game.settings.get("autoanimations", "killAllAnim") === "off") {
    console.log("ANIMATIONS ARE OFF")
    socket.off('module.sequencer')//
    killAllAnimations = true;
}

});

To Reproduce
Steps to reproduce the behavior:

  1. log into game
  2. check console for errors

Expected behavior

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version 97.0.4692.71 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

Add options param to `attachTo` for an align option

It would be useful to be able to do something like this .attachTo(token, { align: 'top-right' }) (with options for each of the 8 directions (top/left/bottom/right and the combination of each two adjacent)).

I see this with working in tandem with offset so attachTo(token, { align: 'top-right' }).offset({x: 50}) would align it to the top right and then push it 50 to the right.

Tool buttons visible to users below permission setting

Describe the bug
When the settings in Sequencer are set to "Assistant GM," particularly the toolbar options for the database and manager, the buttons are visible to a user with Trusted Player permission on my server. Users with Player status cannot see these tools.

Expected behavior
Would expect the tools to not be present in the user's toolbar.

Screenshots
See attached screenshots of my Sequencer settings as GM, and the toolbar view of my Trusted Player.
Capture2
Capture

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 96.0.1054.53

Map graphic effects to the template shape

Describe the solution you'd like
would love to be able to cram non-cone shaped animations from JB2A and elsewhere into a cone template, e.g., prismatic spray. Or have the template outline "crop" the animation.

Describe alternatives you've considered
TMFX can do this.

Thanks!
C

startTime no longer allowed to exceed 1000ms

Create any macro that uses the ".startTime()" function. Set the start time to any delay less than 1000ms and the macro will execute normally, playing at the indicated start time.
Now reset the start time to anything equal to or greater than 1000ms and the macro will no longer play that portion. Console will return the following error.

'TimeRanges': The index provided (1) is greater than or equal to the maximum bound (1).
at CanvasEffect.set video [as video]

Misty Step Sample Macro arrival animation not playing

So I'm trying to set up some animations with your module, but the sample one for misty step is throwing errors in the console. It is playing the first animation properly, but there is no animation on arrival. This is the console output when casting misting step (with the macro as ItemMacro):

image

I really need help...Chain Lightning

Alright.... I just can't figure out how Chain lightning works. There are three different macros of chain lightning.
What should I do?
the animation only targets one target, not the others. Should my players do the saving throws first or what? I am really confused .
Pls help....

[Request] Register effects

I'd like to be able to register commonly used sequences that I can then call later - generally this would be more useful for mods (but in those cases a mod could basically create a file that houses those sequences), or it could be useful for someone who just has a lot of macros that manually (or via World Scripter or something similar) registers some sequences when they load the browser.

Example use, I run basically the following on every spell, swapping out the animation for the proper school and the color for whatever color I feel best matches the given spell.

        seq.effect()
            .file('jb2a.impact.004.dark_purple')
            .atLocation(casterToken)
            .fadeIn(500);
        seq.effect()
            .file('jb2a.extras.tmfx.runes.circle.simple.illusion')
            .atLocation(casterToken)
            .duration(2000)
            .fadeIn(500)
            .fadeOut(500)
            .scale(0.5)
            .filter("Glow", {
                color: 0x3c1361
            })
            .scaleIn(0, 500, {
                ease: "easeOutCubic"
            })
            .waitUntilFinished(-1000);

So what if I could do something like this

Sequencer.registerEffect('spellSchoolAnimation')
    .file('jb2a.extras.tmfx.runes.circle.simple.{{school}}')
    .duration(2000)
    .fadeIn(500)
    .fadeOut(500)
    .scale(0.5)
    .scaleIn(0, 500, {
        ease: "easeOutCubic"
    })
    .waitUntilFinished(-1000);

So that would register that effect as 'spellSchoolAnimation' and I could pull it out later to play it as is or add-on/modify to it.

seq.effect()
    .file('jb2a.impact.004.dark_purple')
    .atLocation(casterToken)
    .fadeIn(500);
seq.registeredEffect('spellSchoolAnimation')
    .setMustache({ school: 'illusion' })
    .atLocation(casterToken)
    .filter("Glow", {
        color: 0x3c1361
    });

An alternative I also thought about was instead of doing something like Sequencer.registerEffect('name')... you could do something like Sequencer.register('name').effect()... which would probably make it easier to register sounds, animations, etc. But with this it might also be less clear about what's being pulled out of the registry if the "get" method was just registered(name) instead of something like registeredEffect(name).

[Request] Retrieve the resulting position of a missed effect

Would be cool to have a way of getting the resulting position of a missed effect. The use for this? I'm trying to make a macro that create a ItemPile at the missed position, so that daggers/arrows that are fired agains't a token can be "dropped" at the ground.

I'm by no means a expert, but It may be possible to implement a return to play(). Something like this:
let Position = Effect.play()

Error in 0.5.5 with offset method

Just updated to 0.5.5 (from 0.5.1 i think) and get this error when calling the "offset" method

effect.js:216 Uncaught (in promise) ReferenceError: mergeFunc is not defined
at EffectSection.offset (effect.js:216)

the line code of the error is:

inOffset = mergeFunc(inOffset, options);

And checking older versions of the module I saw that you define that mergeFunc a couple of lines earlier in the code but now in the 0.5.5 that function is not declared.

[Suggestion] Add option to hide and show each tool in the sidebar

The Controls being in Token Controls as well as having the sidebar for Sequencer tools feels redundant to me and the option to remove them from the sidebar removes all of them.

The use case here is when you have a lot of modules that utilize the side bar it tends to expand it quite far.

image

I could just remove sequencer tools entirely but the convenience of having the Sequencer Layer in the sidebar is nice to have.

.moveTowards() and .teleportTo() not ending at the same position given the same coordinates

Using .moveTowards() and .teleportTo() with the same coordinates does not result with the effect at the same location.
This is the sequence in question:

let caster = canvas.tokens.controlled[0]
let casterImg = "Tokens/Custom/Zoris.png"
let jumpRange = caster.document._actor.data.data.abilities.str.value;
console.log(caster)
let range = MeasuredTemplate.create({
    t: "circle",
    user: game.user.id,
    x: caster.x + canvas.grid.size / 2,
    y: caster.y + canvas.grid.size / 2,
    direction: 0,
    distance: jumpRange,
    borderColor: "#FF0000",
    flags: {
        world: {
            Jump: {
                CasterId: caster.id
            }
        }
    }
});
let pos;
canvas.app.stage.addListener('pointerdown', event => {
    if (event.data.button !== 0) { return }
    pos = event.data.getLocalPosition(canvas.app.stage);
    let ray = new Ray(caster.center, pos)
    if (ray.distance > ((canvas.grid.size * (jumpRange / canvas.dimensions.distance)) + (canvas.grid.size / 2))) {
        ui.notifications.error(game.i18n.format("AUTOANIM.teleport"))
    } else {
        deleteTemplatesAndMove();
        canvas.app.stage.removeListener('pointerdown');
    }
});
async function deleteTemplatesAndMove() {

    let gridPos = canvas.grid.getTopLeft(pos.x, pos.y);

    let removeTemplates = canvas.templates.placeables.filter(i => i.data.flags.world?.Jump?.CasterId === caster.id);
    removeTemplates = removeTemplates.map(template => template.id);
    if (removeTemplates) await canvas.scene.deleteEmbeddedDocuments("MeasuredTemplate", removeTemplates);

    let jumpSeq = new Sequence()
        .animation()
        .on(caster)
        .opacity(0)
        .effect()
        .file(casterImg)
        .atLocation(caster)
        .moveTowards({ x: gridPos[0] + 50, y: gridPos[1]+ 50 }, { ease: "easeInOutElastic" })
        .scale(0.25)
        .moveSpeed(175)
        .rotate(90)
        .waitUntilFinished()
        .animation()
        .on(caster)
        .teleportTo({ x: gridPos[0]+ 50, y: gridPos[1]+ 50 })
        .waitUntilFinished()
        .animation()
        .on(caster)
        .opacity(1)
    jumpSeq.play()

}

Unsure if its intentional or not - its easy enough to get around by just subtracting 50 from the teleportTo x and y

7c3a50db60dff16bb799859c23ba090c.mp4

Macro sounds broken

It seems that after the latest update all of the macros I created with audio no longer work.
This is the coding I am using, can you tell if I am doing something wrong or if the update truly broke the module? I am only using Sequencer and Socketlib

let target = Array.from(game.user.targets)[0];

let sequence = new Sequence()

.effect()
    .file("Music/videos/shotgun_blast_01.webm")

    .atLocation(token)
    .reachTowards(target)       
.play();

new Sequence()
.effect()
.file("Music/videos/gunMuzzleFlash.webm")
.atLocation(token)
.rotateTowards(target)
.scale(0.2)
.endTimePerc(0.1)
.play();

new Sequence()
.sound()
.file("Music/sounds/shotgun.ogg")
.fadeInAudio(100)
.fadeOutAudio(100)
.play()

Possible Bug with attachTo()

Issue was first reported on the A-A list at https://github.com/otigon/automated-jb2a-animations/issues/276 .

When using .attachTo() and setting a token as the object, if the Token has any scaling effect applied ( Scale(ratio) }, the effect does not properly center.
To replicate, you can use:

let tactor = canvas.tokens.controlled[0];

new Sequence()
.effect()
.file("modules/jb2a_patreon/Library/2nd_Level/Darkness/Darkness_01_Black_600x600.webm")
.attachTo(tactor)
.scale(.5)
.play()

For the Token, if you edit it on the Image tab, and change the Scale(ratio) higher or lower than 1, the effect starts to be placed off center. I can't see in the token info where this would effect the placement, but I'm assuming it has something to do with Pixi, but that's like reading japanese for me lol.

PF2E Reach error

Hello, i'm using this module on the Pathfinder 2e system, and when an actor is out of reach of another actor, a red error just popout to warn me that the module can't reproduce the animation. The thing is that sometimes when a player or an npc provoke AoO, they first move the token, and then i/they roll the attack, so obviously the token is out of reach of the animation.
Is there a way to remove the error from my game, or even removing the warning completely?

Error thrown during registerEntries

Whenever I register my data I'm getting this in the console. It does NOT appear to be a fatal error - my DB get registered and is very useable. I've tried structuring my data both with and without a _template section but makes no difference. As it doesn't really seem to be a problem (for me) I haven't spent any time doing any deeper dive, so this is more of an FYI/FWIW since I haven't done the work for a "proper" bug report. Sequencer 0.6.9 on FVTT 0.8.9, DND5E 1.4.2.

[Detected 3 packages: sequencer, advanced-macros, lib-wrapper]
    at Object._recurseFiles (sequencer-database.js:123)
    at Object._recurseFiles (sequencer-database.js:134)
    at Object._recurseFiles (sequencer-database.js:148)
    at Object._processFiles (sequencer-database.js:118)
    at Object.registerEntries (sequencer-database.js:18)
    at eval (eval at callScriptMacroFunction (Macros.js:176), <anonymous>:173:20)
    at Function._call (eval at <anonymous> (lib-wrapper.js:1), <anonymous>:4:14)
    at Function.call (foundry.js:179)
    at Macro.eval (eval at callScriptMacroFunction (Macros.js:176), <anonymous>:5:11)
    at Macro.callScriptMacroFunction [as callScriptFunction] (Macros.js:179)
    at Macro.renderMacro [as renderContent] (Macros.js:197)
    at Macro.executeMacro (Macros.js:218)
    at Hotbar._onClickMacro (foundry.js:28392)
    at HTMLLIElement.dispatch (jquery.min.js:2)
    at HTMLLIElement.v.handle (jquery.min.js:2)```
	
For me, the minimum setup to repro:
```Hooks.on("preloadfiles", async () => {

    let allFiles = [];
    
	// Everything in this list will be preloaded
	const ookData = {
		// I don't need _template...originally did not have it...added it while doing initial troubleshooting
		_template: { // Grid size, start point, end point
			"default": [200, 0, 0],
			"ranged": [200, 200, 200]
		},		
		preload: [
			// Session-specific stuff
			"soundtracks/SoundBoard/Monsters/Harpy Song.mp3"
	}

	// Register the database of entries to preload - THIS IS THE STATEMENT THAT GENERATES THE ERROR IN THE CONSOLE
	SequencerDatabase.registerEntries("ook", ookData);

	// Now ready for execution of the preload
	SequencerDatabase.getAllFileEntries("ook").forEach((filePath) => allFiles.push(filePath))
	//console.log("allFiles: ", allFiles);
	await SequencerPreloader.preloadForClients(allFiles, true);
})```

'Could not find " " in database' errors.

I have been using Automated Animations for a while now in conjunction with JB2A. Recently, they were updated to use this module by default. Since then, I've been getting a 'Could not find " " in database' error on a regular basis. This happened when a player used a javelin, but it also happened when a skeleton from the monster manual fired an arrow. These are attacks that previously worked with no issue.

I'm on the latest 0.8.8 build of Foundry, 1.4.1 DnD5e, and the most recent versions of all three modules.

image

Sequencer manager empty

Having cast Spirit guardians which through the Automated Animations addon applies a sequencer effect, the effect appears fine (as seen in the screenshot) however nothing ever appears in my sequencer manager tab.

image

In-fact neither of the buttons (How-To or Manager) do anything when clicked.
I have to stop the sequence/animation via the console currently which is not ideal at-all.

image

Add .hide() method to animations for toggling hidden state of tokens.

Is your feature request related to a problem? Please describe.
I have a room with a bunch of skeleton tiles, and after the players examine the painting in the room I'm going to trigger a macro that I wrote that fades the tiles out, and fades the skeleton's tokens in, starting the fight.
The problem is that while the skeleton tokens have their opacity turned down, the players will still be able to see the red square around the tokens when putting their cursor in the room.
I can separately toggle their hidden state within the macro before fading them in, but I think a .hide() method would really simplify this.

Describe the solution you'd like
Add a .hide() method to animations to toggle the hidden status of tokens (and probably tiles too, though those don't exactly suffer from the same issue as above).

Describe alternatives you've considered
Writing a line into my macro to unhide the token before fading it in.

Additional context
Wasp told me they could add a .hide() method on the #macro-polo channel of the Foundry VTT discord server. I'm simply filing this issue request for tracking and posterity.
Thanks for this great module and support :)

Missing some JB2A animations (of white melee attacks) @ Sequencer Database Viewer

I am Using Sequencer in Version 2.0.14 / FoundryVTT in Version 9 Build 249

Some animations (of white melee attacks) are no longer displayed in the JB2A database at Sequencer Database Viewerbut the animations exist!?
I don't know if the Sequencer module creates this DB or the JB2A module (I am a Patreon user and use the JB2A Complete Collection in Version 0.3.6).
Currently I miss the entries e.g. for GreatSword01_01_Regular_White_800x600 & HandAxe02_01_Regular_White_800x600

Errormessage old Macro usage
Example_Missing_JB2A-Entrys

Missing the entry at Sequencer Database Viewer
Missing_JB2A-Entrys

But the files exists in the folder
Example_Missing_JB2A-Entrys_2

Or is this a bug in the JB2A module?

Error when trying to preload files

Getting this error when trying to preload some animation - this is the hook being registered

 Hooks.on("preloadfiles", async () => {
      console.log('connecting user...', game.user);
      console.log('starting preload of resources...');

      let allFiles = [];
      SequencerDatabase.getAllFileEntries("EffectAudioDB").forEach((filePath) => allFiles.push(filePath));
      SequencerDatabase.getAllFileEntries("AnimDB").forEach((filePath) => allFiles.push(filePath));
      console.log('Files about to be preloaded...',allFiles);
      await SequencerPreloader.preloadForClients(allFiles, true);
    });

This is the error --
image

0.5.0 update and issues with the .name() call

Using .name("namehere") in the first sequence, followed by atLocation("namehere") in the following sequence no longer works correctly after the 0.5.0 update. It seems to log the stored position a x: 0, y: 0. Using this sequence as a go-by (worked prior to update)

new Sequence()
.effect()
.atLocation(canvas.tokens.controlled[0])
.reachTowards(canvas.tokens.controlled[1])
.JB2A()
.repeats(5, 500)
.missed(true)
.name("animation")
.addOverride(
async (effect, data) => {
switch (true) {
case data._distance <= 1400:
data.file = "modules/jb2a_patreon/Library/Cantrip/Fire_Bolt/FireBolt_01_Dark_Red_30ft_1600x400.webm"
break;
case data._distance > 2600:
data.file = "modules/jb2a_patreon/Library/Cantrip/Fire_Bolt/FireBolt_01_Dark_Red_90ft_4000x400.webm"
break;
default:
data.file = "modules/jb2a_patreon/Library/Cantrip/Fire_Bolt/FireBolt_01_Dark_Red_60ft_2800x400.webm"
}
console.log(data)
return data
}
)
.effect()
.atLocation("animation")
.file("modules/jb2a_patreon/Library/Generic/Template/Circle/OutPulse/OutPulse_01_Regular_PurplePink_Burst_600x600.webm")
.scale({x: .33, y: .33})
.delay(1700)
.repeats(5, 500)
.belowTokens(true)
.play()

Sequencer Breaks /stream view, which prevents other modules from working

Describe the bug
When a user is using foundry's /stream page, versus the game page, while using PF2e then Sequencer throws errors in the console log. This stops other modules (like dice so nice in combination from Stream Utils) from rendering the dice properly.

Foundry throws this error:
Uncaught TypeError: Cannot read properties of undefined (reading 'activeTool')
[Detected 1 package: sequencer]
at Game.get activeTool [as activeTool] (foundry.js:4892)
at SequencerEffectPlayer.get playActive [as playActive] (sequencer-effect-player.js:26)
at BelowTokensEffectsLayer.get playActive [as playActive] (effects-layer.js:73)
at BelowTokensEffectsLayer.drawPoint (effects-layer.js:122)
at BelowTokensEffectsLayer.render (effects-layer.js:83)
at e.render (display.min.js:8)
at r.render (core.min.js:8)
at t.render (app.min.js:8)
at t.emit (ticker.min.js:8)
at e.update (ticker.min.js:8)
at _tick (ticker.min.js:8)

To Reproduce
Steps to reproduce the behavior:

  1. Launch your Foundry world, using PF2E, Dice so Nice, Stream Utils, Automated Animations and Sequencer all enabled.
  2. Now, open a second window with the /stream URL instead of the /game url, to access the stream screen
  3. Once loaded, roll a d20 in the /game window.
  4. watch in the /stream window, as the error is throw in console when the dice starts rolling ,and freezes the roll from happening
  5. Above error is printed in console log

Expected behavior
Sequencer should be able to recognize the "stream" view, and not throw errors when trying to access undefined variables in this view.

Screenshots
See https://i.imgur.com/0FevcWz.png

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 96.0.4664.110

Additional context
The "stream" view isn't heavily used, but some streamers rely on it to overlay information. It doens't render any of the game views, just specific things configured to be shown. Might need more null checks to make sure you're accessing variables set, or to ignore the "stream" view entirely by checking the "game.view" variable is the proper view.

Error related to Dice so Nice animations

I keep getting this error. I used to have animations set up for when I rolled a natural 1 or natural 20 in Dice so Nice. I reset to defaults and that doesn't seem to help. This error ONLY comes up when I roll a 1 or 20. There are currently no animations or sounds set in Dice so Nice.

image

add persist option to player menu

It would be great if the persist option could be added to the player menu so that an effect could be created on the fly and remain on screen - e.g a forcefield / wall effect.

Suspected Memory Leak

Describe the bug
I am not 100% certain it's a memory leak and I'm not 100% certain your module is the culprit, as socketlib is a prerequisite of using this module. All I can say with certainty is that when I use this module in conjunction with JB2A animations and then either Warpgate or Automated Animations (or both), there is a persistent FPS drop that builds up over time, and seems to persist even after the animations end.

For instance, using the Fireball macro packaged in the JB2A compendium, which requires this module and Warpgate to use, during the first use, my FPS will dip from 60 to 57 while the animation plays, but then it recovers to 60. I will then manually end the effect, as it lets a still frame linger persistently, so I end all effects after each use for the sake of the test.

After the second use, the initial FPS drop will be larger, and the lingering FPS drop will be around 5 FPS per use of the macro. Within ten uses of it my FPS is permanently below 30 FPS.

If I disable Warpgate and use the effects from the Automated Animations module, I see similar effects, although the specific FPS drop changes depending on what effect I'm using.

Now, I will say, when I only use the Sequencer Effects player, to manually drop in one effect at a time, I never see any persistent slowdown. Any FPS drop recovers when the animation finishes playing. Because of this, I cannot say with certainty that Sequencer is the culprit. But it feels like the likelihood is higher than it is with the other two modules, since I can reproduce the effect even if I disable Automated Animations and only use Warpgate with Sequencer, or vice versa turn off Warpgate and only use Automated Animations with Sequencer.

Hopefully this is helpful and can lead to rooting out this problem. Thanks.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Foundry App
  • Version: v9 build 249; sequencer 2.0.14

Disarm traps?

How would you disarm or disable the trap as GM if players are able to detect and disarm?
Nice future features might be:
Set DC and range for passive perception to then show trap tile(s)
Setup up way for players to interact disarm.

Suggestion: add an effect method to change the speed of a webm effect

I have no idea whether it is easy/possible or not, but a method to change the speed at which a webm effect is played could be very useful, e.g. :

.file("...")
.speed(0.8)

to play the webm file at 80% of its normal speed (and .speed(1.5) to speed up the video).

Alternatively:

.file("...")
.duration(x)

to play the web file at such a speed that it lasts for x milliseconds.

(Thank you for your module!)

'Preload' check box in Player

I am unsure what this option does.

Without the check box ticked one selects the desired animation, drags a line and it plays. With the check box ticked same behaviour doesn't play anything. Hence my question as it isn't immediately obvious what this check box does, and likewise why it seems to prevent animations playing when checked.

Thanks in advance :)

.anchor() and .center() having no effect on a tile/tileDocument

.anchor() and .center() seem to be not effecting the location of the effect at all when given a tile or tile Document

 let boltSeq = new Sequence()
                .effect()
                    .file("jb2a.chain_lightning.primary.blue")
                    .JB2A()
                    .atLocation(cloudTile)
                    .reachTowards(template)
                    .center()
                boltSeq.play();

Possibility to hide the tools for the GM ?

Is your feature request related to a problem? Please describe.
Using a lot of modules, the selection of tools on the left start to get really long, I would like to know if it is possible to hide the Sequencer ones, even for the GM, when they are not needed ?

Describe the solution you'd like
Well, that in the settings we have the possibility to hide the tools for the GM, as we can do for the players.

Describe alternatives you've considered
I don't know. A checkbox to manage the appearance of tools globally ... ?

Additional context
I don't know what else to say, except to say thank you for the work done, and even if this request should not see the light of day ! :)

Sequencer Data Base Issue

When I go to save my module setting, I get this message from FVTT.

Sequencer

I am using the latest Sequencer module, version 2.0.1 and this is in the PF2E system. I believe it is preventing my Automated Animations Module from working.

.rotateTowards() in an animation section being given a template is throwing an error

This effect is throwing an error only when given a template to rotateTowards() in the animation section

async function finalTeleport(caster, location){
            let distance = Math.sqrt(Math.pow((location.x - caster.x), 2) + Math.pow((location.y - caster.y), 2));
            let steelWindSequence = new Sequence()
                    .effect()
                    .atLocation(caster)
                    .JB2A()
                    .file(gustAnim)
                    .reachTowards(location)
                    .opacity(0.8)
                    .fadeOut(250)
                    .belowTokens()
                    .animation()
                    .on(caster)
                    .rotateTowards(location)
                    .animation()
                    .on(caster)
                    .moveTowards(location, { ease: "easeOutElasticCustom" })
                    .moveSpeed(distance / 60)
                    .duration(800)
                await steelWindSequence.play();
        }

image

Suggestion: In-Game Example Compendium

For the coding illiterate like me, I cannot get your examples to work.
As you build the examples, are you able to include them in an in-game macro compendium?

That way those that learn by ripping apart other people's functional code will have fully end-to-end complete macros to work with :)

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.