AquaRex
AquaRex
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
I would have wasted a bunch of time, if it wasn't for you guys! 😂
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Anyway, thank you all so much for the help!
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Hm, yea you're probably right
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Im gonna look through the other supported systems, in case another one is doing something similar to this already
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
I guess it might be part of the reason this system isn't already supported? lol
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
It's correct to the item that triggered the event. But no Id in sight
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
No description
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Right, makes sense I guess
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
No description
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Yea..
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
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:
"<div class=\"chatBG\" data-item-id=\"kUHFOLT0bs5ocmNw\" data-actor-id=\"fq93YdznHhe1GLeM\">
"<div class=\"chatBG\" data-item-id=\"kUHFOLT0bs5ocmNw\" data-actor-id=\"fq93YdznHhe1GLeM\">
And here is Coriolis:
"<div class=\"dice-roll yzecoriolis\">\n <div>
"<div class=\"dice-roll yzecoriolis\">\n <div>
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Yea, I'll have a look at it
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Yea, I don't have a fork currently. Only locally edited files lol
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
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 )
import { trafficCop } from "../router/traffic-cop.js"
import AAHandler from "../system-handlers/workflow-data.js";
import { getRequiredData } from "./getRequiredData.js";
// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED
export function systemHooks() {
Hooks.on("createChatMessage", async (msg) => {
if (msg.user.id !== game.user.id) { return };

function extractItemId(content) {
try {
return $(content).attr("data-item-id");
} catch (exception) {
console.log("COULD NOT GET ITEM ID")
return null;
}
}

let compiledData = await getRequiredData({
itemId: extractItemId(msg.content),
actorId: msg.speaker?.actor,
tokenId: msg.speaker?.token,
workflow: msg,
})
if (!compiledData.item) { return; }
runAlienRPG(compiledData)
});
}

async function runAlienRPG(input) {
const handler = await AAHandler.make(input)
trafficCop(handler);
}
import { trafficCop } from "../router/traffic-cop.js"
import AAHandler from "../system-handlers/workflow-data.js";
import { getRequiredData } from "./getRequiredData.js";
// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED
export function systemHooks() {
Hooks.on("createChatMessage", async (msg) => {
if (msg.user.id !== game.user.id) { return };

function extractItemId(content) {
try {
return $(content).attr("data-item-id");
} catch (exception) {
console.log("COULD NOT GET ITEM ID")
return null;
}
}

let compiledData = await getRequiredData({
itemId: extractItemId(msg.content),
actorId: msg.speaker?.actor,
tokenId: msg.speaker?.token,
workflow: msg,
})
if (!compiledData.item) { return; }
runAlienRPG(compiledData)
});
}

async function runAlienRPG(input) {
const handler = await AAHandler.make(input)
trafficCop(handler);
}
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
Foundry VTT | Created ChatMessage with id [nLhWcvUdeg2mYC63]
Foundry VTT | Created ChatMessage with id [nLhWcvUdeg2mYC63]
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
Thats good to know if thats the case
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
it's there on the bottom
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
No description
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
No description
125 replies
TTyphonJS
Created by TyphonJS (Michael) on 1/30/2024 in #typhonjs-runtime
Automated Animations
I assume it's the "name" part?
125 replies