Automated Animations
This is a forum post to track discussion on Automated Animations. When TRL
0.2.0
is released I plan to update AA to the latest.
In the meantime this post also is for discussing AA and an attempt to provide feedback for those that are trying to add new system support to it.V
Vauxs!•88d ago
AutoAnimations? You mean the Automated Animations module? Or something else?
TM
TyphonJS (Michael)•88d ago
Yep Automated Animations. It's stuck back on TRL
0.0.23
, so quite a bit outdated, so I plan to update it to TRL 0.2.0
when it drops to try and keep it alive a bit longer.V
Vauxs!•88d ago
I see. Following this thread then given I want to make a PF2e specific offshoot.
Someday.
Eventually.
If happenstance allows.
TM
TyphonJS (Michael)•88d ago
Yeah.. It's definitely a beast of a module. Only Otigon has some grasp of all the intricate parts and it looks like there are many that could drift into disrepair. I know just a bit on how TRL is used with it. I can only update the TRL / UI parts and not really help w/ the rest of the codebase.
V
Vauxs!•88d ago
I think it would definitely benefit from an UI update as it becomes incredibly slow at times
Probably by having it render thousands of foldable elements across multiple pages.
TM
TyphonJS (Michael)•88d ago
There have been improvements to TJSSvgFolder to not render elements inside closed folders. I'm not sure which TRL version introduced that, but AA is on a much older version. AA also is a bit of a beast for data as it is storing everything in a single huge array of objects in a world game setting. This is not so bad if there are 10-20 animation definitions, but growing into the hundreds or thousands is potentially problematic.
V
Vauxs!•88d ago
And before that it was an object with property names being numbers!
{ "0": {...}, "1": {...}, ... }
A
AquaRex•87d ago
I'm getting stuck at this lol, In attempting to add System Support to Auto Animations for Coriolis Game System, the output of this is ( as far as we can tell ) identical to for example alienRpg game system, which is already implemented as a game system supported for autoanimations.
I've attempted to copy the code directly from the aa-alienrpg.js along with modifying the index.js inside autoanimations\src\system-support ( i assumed this file was the one telling which game system to use which file.. ) But it doesn't seem to even load that aa-yzecoriolis.js file at all when that gamesystem is loaded. I know it loads the aa-alienrpg.js file, but confusingly, it will do that even if the entry is removed from the index.js.
So it appears the index.js is not being used to tell which gamesystem which file it should use, so what does? lol. I believe this would work with Coriolis, if I could just get aa-alienrpg.js ( or a duplicate ) to load in that game system.
Any ideas?
TM
TyphonJS (Michael)•87d ago
I can certainly help w/ the framework aspects, but not as much with specifics to implementing new system support. Have you run
npm run build
after you made the changes. TRL / Svelte framework is a compile time framework, so you must build it on changes.V
Vauxs!•87d ago
You can alternatively use
npm run dev
to get a live experience, but yeah TJS beat me to the punch here lolA
AquaRex•87d ago
Yes, I've built on changes. It loads fine, just doesn't seem to load the file I need. I've tested and made sure the aa-alienrpg.js file loads if the AlienRPG game system is started. And if making modifications to this file and then building, i can see the changes when the file gets loaded in the game system. I just can't seem to get coriolis to load the file.
TM
TyphonJS (Michael)•87d ago
I'd stay away from using the dev server for now due to the complexity of AA. The dev server is a great feature of VIte and TRL that allows HMR / hot module reloading and changes to code in Svelte components dynamically without reloads to Foundry, but this is only really for Svelte components which is not the code that you are modifying, so running
npm run build
to do a full production build is recommended.V
Vauxs!•87d ago
Having already delved in this,
npm run dev
will simply refresh the page if you are editing the system js files.
So I wouldn't worry.
Just makes it faster.TM
TyphonJS (Michael)•87d ago
Yes it will, but to be precisely sure changes are propagating it's best in general in that case for a production build. Less variables that can go wrong in this particular situation of getting the new code to take affect. The dev server is great when things are all situated correctly.
Do you have a public repo for your changes?
The next thing is to make sure the game system ID matches the system ID in whatever lookup code AA has implemented.
A
AquaRex•87d ago
I have no idea what or where the lookup code is 🫣
V
Vauxs!•87d ago
in the index?
probably, let me see
A
AquaRex•87d ago
Only change Im really trying to make it get AA to load aa-alienrpg.js
I assumed the index.js was what was loading which file. It looks like this
However, if I remove the line
From this, it still works fine after building and starting AlienRPG game system..
A
AquaRex•87d ago
What am I looking at? 🫣
V
Vauxs!•87d ago
There is a default that in an event the system doesn't exist, is triggered.
And AlienRPG could just happen to work with
TM
TyphonJS (Michael)•87d ago
Heh heh... Discord tip is to always put links between
<>
to not show the large breadcrumb image. 😄A
AquaRex•87d ago
Hmm, maybe
V
Vauxs!•87d ago
At the function that actually registers the system hooks in AA
V
Vauxs!•87d ago
V
Vauxs!•87d ago
so your ex.
export * as wrathandglory from "./aa-wrath-and-glory.js";
has to be exported exactly as the id of the system
Its a matrioshka of objectsA
AquaRex•87d ago
I've tried creating an aa-yzecoriolis.js file and then add
to the index.js, to no avail lol
V
Vauxs!•87d ago
is the
game.system.id
yzecoriolis?A
AquaRex•87d ago
How can I check to make sure? It's what it shows up as in game, and the folder name in systems
V
Vauxs!•87d ago
by putting what I put in code into console
game.system
for all data about the systemTM
TyphonJS (Michael)•87d ago
Check
system.json
for the id
A
AquaRex•87d ago
V
Vauxs!•87d ago
but either way I found the github page for it and that's the ID, so something else must be afoot
A
AquaRex•87d ago
I assume it's the "name" part?
V
Vauxs!•87d ago
yes
You can always put a
console.log("Look me up", systemIdClean, systemSupport)
right above that line in src/index.js
and then build
If you see no console log then you are building it wrong somehowTM
TyphonJS (Michael)•87d ago
Yeah..
name
is old, but id
is the new field, so the manifest is out of date, but that probably still works.V
Vauxs!•87d ago
AA uses
game.system.id
which is a getter iirc
so should be compatibleTM
TyphonJS (Michael)•87d ago
Yeah.. just that the manifest might stop working; maybe on v12 as that was deprecated on v10 I believe; other problem for the future.
V
Vauxs!•87d ago
funny, given its updated last week
https://github.com/winks-vtt/yze-coriolis
A
AquaRex•87d ago
It printed yzecoriolis
V
Vauxs!•87d ago
Look at the
Module
object then
and see if yzecoriolis is there or some other idA
AquaRex•87d ago
A
AquaRex•87d ago
it's there on the bottom
V
Vauxs!•87d ago
alright, then it should work and register as such 🤔
then the issue is with the
aa-yzecoriolis
file itself
not how you turn it onTM
TyphonJS (Michael)•87d ago
Might be helpful to post the repo to your current fork.
A
AquaRex•87d ago
Thats good to know if thats the case
V
Vauxs!•87d ago
Then now just fix the hooks to actually match the system and not that of alienrpg 😄
A
AquaRex•87d ago
Sorry, I feel so useless at this lol.
Afaik, this code gets the chat message from the console whenever you use an item in order to trigger the correct animations for that item..
This is the code from the aa-yzecoriolis.js file ( identical to aa-AlienRPG.js )
And this is the console output log for both alienRPG and Coriolis.
Maybe the issue is glaringly obvious to you lol, I kinda hope so in this case lol
V
Vauxs!•87d ago
// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED
?TM
TyphonJS (Michael)•87d ago
Posting your repo fork link will help in taking a look.. Heh heh... 3rd time mentioned... 😉 I suppose also commit everything that you have currently.
V
Vauxs!•87d ago
But yeah by this point just please commit and show us the work
A
AquaRex•87d ago
Yea, I don't have a fork currently. Only locally edited files lol
V
Vauxs!•87d ago
Welp.
I will tell you that the output log is not useful at all.
You want to see the message data, which you can get using
game.messages.contents.at(-1)
(for the latest one)
There you can see what the message is comprised of, and with that, run the proper functions.TM
TyphonJS (Michael)•87d ago
Yeah.. it should be ~20 minutes to make a fork and update it with what you have so far. It's the best way to get help as AA is not trivial. Also of course once you get it working that allows you to make a PR for adding support for the system.
A
AquaRex•87d ago
Yea, I'll have a look at it
https://github.com/AquaRex/aa-yzecoriolis
TM
TyphonJS (Michael)•87d ago
Time to put some log statements here: https://github.com/AquaRex/aa-yzecoriolis/blob/main/src/index.js#L175 and in the
aa-yzecoriolis.js
file.A
AquaRex•87d ago
Doing this, I found that alienRPG is including the data-item-id into the _source - content of the chat message.contents. That coriolis doesn't seem to add.
Here is Alienrpg:
And here is Coriolis:
V
Vauxs!•87d ago
That would explain nothing working lol.
Well, you gotta look into how Coriolis provides the item to the message.
If it does at all.
A
AquaRex•87d ago
Yea..
V
Vauxs!•87d ago
If you cannot find anything under
message.item
, or message.flags
pertaining to the item ID, then you are simply screwed.
(Or any other property)TM
TyphonJS (Michael)•87d ago
Except it's a friends system right? I can't recall, so it might be system modding time too if not accessible.
A
AquaRex•87d ago
Could it be any of these? ( sorry for this lol )
V
Vauxs!•87d ago
no
you are looking at the ID of the message
A
AquaRex•87d ago
Right, makes sense I guess
V
Vauxs!•87d ago
and the token ID of the speaker
you want the item that "spawned" the chat message
if you cast a Fireball in D&D5e, the message contains the data that its this tokens fireball
look at the flags
TM
TyphonJS (Michael)•87d ago
There is a
yzecoriolis
flag you can't see from that previous post.V
Vauxs!•87d ago
there is an yzecoriolis flag in there
O
Otigon•87d ago
This is something I really wish Foundry would standardize (somehow, someway) in what data is made available as default in systems
A
AquaRex•87d ago
I assume you mean this one
A
AquaRex•87d ago
It's correct to the item that triggered the event. But no Id in sight
I guess it might be part of the reason this system isn't already supported? lol
O
Otigon•87d ago
I mean, you could get fancy in the system handler and grab the Item from the Token using it
If they at least give you the token or actor ID
V
Vauxs!•87d ago
There's the
speaker
dataO
Otigon•87d ago
not all systems utilize that
V
Vauxs!•87d ago
but it was shown its there in the previous screenshot
alas
it looks like you would never get an accurate item ID from this
You could go around the issue by going token -> actor -> search for an item that matches the
rollTitle
but this sounds painfully ripe for bugs as it pertains to storing the animation data on the item itself
what if someone has two daggers?
is rollTitle
even accurate to the item name?A
AquaRex•87d ago
Im gonna look through the other supported systems, in case another one is doing something similar to this already
V
Vauxs!•87d ago
idk
You are way better off asking the system devs to implement the item to the chat message
I doubt Otigon went out of his way to try to support such systems with such issues
A
AquaRex•87d ago
Hm, yea you're probably right
TM
TyphonJS (Michael)•87d ago
Two potential PRs now... Welcome to the deep end of Foundry dev.. ;P
V
Vauxs!•87d ago
I am glad I just want to play PF2e and nothing else lol
O
Otigon•87d ago
lmk when you get around to that PR. I'll help out as best I can
a little rusty on the JS after 6 months lol
TM
TyphonJS (Michael)•87d ago
Also Otigon... When I get the next TRL release out
0.2.0
I'll get AA updated and tuned up and submit a PR. It's a bit out of date.A
AquaRex•87d ago
Anyway, thank you all so much for the help!
I would have wasted a bunch of time, if it wasn't for you guys! 😂
293Members
View on DiscordWant results from more Discord servers?
More PostssetPosition in SvelteApplicationThe `SvelteApplication` class has a function called `setPosition` that is there to support core behaTJSDocument delete actionWhen emitting this event, TJSDocument passes "undefined" as the first argument instead of the documeQuest Log Permissions / InfoHI @larsvonawesome. You asked:
> Trying to find more info on Forien's Quest Log; I'm having an issueCreating a derived reducer for a DynMapReducerDo you have an example of how to make a derived reducer for a reducer that's not part of a TJSDcoumeQuest Log objective counts not displayingHi there. the Quest Log objectives (done/total) don't seem to change when I mark quests as completeItem Piles: AuctioneerA few people in the League & some that I know personally have commissioned an Item Piles powered aucSvelecte AlternativesI'm looking to implement a searchable list of sorts, and I found Svelecte:
<https://mskocik.github.iSetting up TRL / contributing to existing module (Item Piles)Hi @Paith. I have started this forum post where we can continue to discuss setting up TRL and gettinReactivty and prepareDerivedDataFrom @Wasp
> So I'm using prepareDerivedData to, well, derive some data for my items; some of them aLocal Development w/ NPM LinkFrom @Gerark:
> Hello! this is probably a base webdev question but I can't find a good reference forIssues Configuring TyphonJS in TSI'm receiving this message in my TS Files:
`Cannot find module '#runtime/svelte/application' or its TRL / Svelte based game systemsThis post is a list of repos for game systems built with TRL / Svelte for Foundry. Please DM me if yList of TjsdocumentsLink to original response:
https://discord.com/channels/737953117999726592/1067337319041998869/11562Is there a way to export the quest log?I'm trying to setup a world for the PF2E Beginner Box but right now I working in a beta testing worFabricate@MisterPotts. Just starting a forum post to keep track of the conversation.
> Fabricate doesn't maSvelte 5 TJSDocument PrototypeGreets @FVTT ▹ Developer.
As some of you might have seen there is a bit of paradigm shift that is Funky interaction with fokus managementTJS's Focus Management is creating fun issues for me again. focusKeep = true causes my drag and dropHow to get rid of funky Prosemirror overlapHi. I'm getting some overlap with Prosemirror (see image) any ideas how to avoid that?
```
"@tyFQL / TextEditor enrichment issueFrom @ooblekie:
> can anyone give me a hand as to why the text keeps coming up as object promise inTJSDocument not working properly with Module Sub-Types (Data Models)In Foundry, modules can define a [Sub-Types](<https://foundryvtt.com/article/module-sub-types/>) usi