Closed Melthemia closed 1 year ago
I am curious why are you registering the entries?
I am curious why are you registering the entries?
It's my first time reporting an issue like this, so I was unsure whether to include them or not. Since it doesn't provide the specific error I'm reporting without entries to actually cache, I kept them in. Although in hindsight I simply could have provided a sample test entry instead of the ones I practically use on my own. Regardless, the error is thrown regardless of what entries are contained as long as something is contained there, even if it can't find what the entry is referring to. (I also accidentally closed the issue, my bad. Sorry about that.)
Could you just try to do:
Hooks.on("preloadfiles", async () => {
let allFiles = [];
// Everything in this list will be preloaded
const ookData = {
_template: { // Grid size, start point, end point
"default": [100, 0, 0],
"ranged": [100, 100, 100]
},
preload: [
//
// Weapon Animations
//
"jb2a.melee_generic.bludgeoning.two_handed",
"jb2a.throwable.throw.grenade",
"jb2a.throwable.launch.missile",
"jb2a.bullet",
"jb2a.flurry_of_blows.physical.orange",
"jb2a.flurry_of_blows.physical.pinkpurple",
//
// Grenade Explosions
//
"jb2a.explosion.01.orange",
"jb2a.explosion.green.3",
"jb2a.explosion.02.blue",
"jb2a.explosion.blueyellow.0",
"jb2a.fireball.explosion.orange",
"jb2a.explosion.green.3",
"jb2a.explosion.blue.3",
"jb2a.explosion.orange.3",
"jb2a.fog_cloud.2.white",
//
// Misc
//
"jb2a.ui.miss.red", // Miss Animation
"jb2a.melee_generic.bludgeoning.two_handed", // Hit Animation
]
};
await Sequencer.Preloader.preloadForClients(ook.preload, true);
});
// AFTER all clients are connected, run a second macro (or enter directly in the console: Hooks.call("preloadfiles");
You can't add entries the database without giving it files to register, it would be like writing a recipe without providing the ingredients list, it just doesn't make sense
The fact that it worked before was a bug, and the error you now get seems to be more in line what is expected, though probably should have better error handling
Unfortunately the macro suggestion didn't appear to work, upon execution of the second macro following the suggested one it throws this error: I also tried the suggested macro with a few direct references to files as opposed to referring to the database entries generated by JB2A, and there seemed to be no difference. Additionally, I feel it's important to note that I am not the author of the original macro, so I'm not fully familiar with how it functions.
Ah apologies, change the ook.preload
to ookData.preload
, I sent my macro on mobile.
In the future, however, do please post in the Foundry discord channels for help :)
Ah apologies, change the
ook.preload
toookData.preload
, I sent my macro on mobile.
This solved it! Thank you very much!
In the future, however, do please post in the Foundry discord channels for help :)
Will do, I posted here since I figured it was a bug. I'll post on Discord in the future if something similar occurs again.
Describe the bug Upon using a macro intended to preload assets, an error occurs and nothing happens. The macro works as intended and the error does not occur on version 2.412 of Sequencer.
To Reproduce Use the following macro, can replace JB2A asset references if need be:
Followed by this macro:
Expected behavior Assets would be pre-loaded upon execution of the second macro, evident by a loading bar appearing.
Screenshots
Setup: