#Automated Animations for SWADE
1 messages · Page 1 of 1 (latest)
@frozen river , If there is only a Trait roll on the item or power (such as a power that doesn't have a damage), it Animates on the Trait. If it has both, (like most weapons), it Animates on the Damage. If you want to change that, I found the easiest way is to remove the base Damage, and add an Action for the damage amount (just like you would do if you wanted multiple damage options for a power). If there is an easier way (ie. a checkbox somewhere), I haven't found it.
Hi guys. I think I found a solution to the AA problem regarding traits and damage rolls. However, I have no idea how to create a valid pull request on the github repo.... The file and code structure on the repo is somewhat too confusing for me 😄
I've added a new setting item (just copy&pasted the previous entry and changed the system to "swade"):
case "swade":
settings.push({
namespace,
key: "playtrigger",
folder: game.system.title || game.system.name,
options: {
name: "autoanimations.settings.playAnimations",
scope: scope.world,
type: String,
choices: {
onAttack: "autoanimations.settings.attack",
onDamage: "autoanimations.settings.damage"
},
default: "onAttack",
config: true
}
});
break;
Then i changed and edited the "Hooks.on" functions for swade (as you can see, I've also added an entry for consumables ("swadeConsumeItem")):
Hooks.on("swadeAction", async (SwadeTokenOrActor, SwadeItem, SwadeAction) => {
const playtrigger = game.settings.get("autoanimations", "playtrigger");
if ((SwadeAction !== "damage" && playtrigger === "onAttack") || (SwadeAction === "damage" && playtrigger === "onDamage")) {
const controlledTokens = canvas.tokens.controlled;
let token;
if (controlledTokens.length > 0) {
token = controlledTokens.find(token2 => token2.document.actorId === SwadeTokenOrActor.id);
}
if (token) {
SwadeTokenOrActor = token;
}
runSwade(SwadeTokenOrActor, SwadeTokenOrActor, SwadeItem);
}
});
Hooks.on("swadeConsumeItem", async (SwadeItem) => {
const controlledTokens = canvas.tokens.controlled;
let token;
let SwadeTokenOrActor = SwadeItem.parent
if (controlledTokens.length > 0) {
token = controlledTokens.find(token2 => token2.document.actorId === SwadeTokenOrActor.id);
}
if (token) {
SwadeTokenOrActor = token;
}
runSwade(SwadeTokenOrActor, SwadeTokenOrActor, SwadeItem);
}
);
Maybe someone with more github experience can create a valid PR with that 🙂
Hey @rain sphinx I'm sorry for pinging you. But would you consider including these suggestions to the code? I don't really know how... Basically just add the settings entry and change the hook condition.
I'll be separating out the system support into a separate module sometime soon, so you can more easily do a PR then. I'm taking a small break from all things javascript for the next week or two
I've added these to a PR.
Differences:
- Play Trigger setting's defaul is Damage Roll (completely opinionated) and its "Attack Roll" option is labeled "Trait Roll"
- swadeAction's IF conditional is still limited to "formula" type instead of
!== "damage"(as it is in the current version), since the current choices either don't call the hook or aren't well defined. I'd rather have limited behavior than undefined one.
Also, sorry for the necropost
Yeah the !=="damage" was intended for additional actions from the item's action tab (or anything else but damage and trait). Instead of "damage" or "formula" the action provides the action key. Maybe that's why you got a strange number/id on a trait roll?
So we're pretty close to having all the important things covered in AA? I mean animations for damage/trait, consumables and templates. Still to be added are reloads and bennies (I think there was an issue in the swade repo to add a hook for them). Then I think we have all in it?
Bennies have their hooks already: swadeGetBenny and swadeSpendBenny, not sure what you'd animate with that, though
For instance, when someone throws a benny, an explosion could be played around his token?
I don't know, it was just a crazy idea.
@subtle ermine Sorry to bother you, but it seems that you know how to trigger an Animation. I opened a ticket for Swade Tools, but it didn’t seem so easy to solve, do you know, how to trigger the animation on the action roll?
https://github.com/lipefl/swade-tools/issues/229
Not sure what you're doing wrong, I am getting the animations while using Swade Tools
I get them as well, but with v11 and Swade 3 only at the damage and not the skill roll (I thought it was different in the past, but not super sure about it). Do you use v11 and get them on the action roll? In that case, I have to check, what I’m doing wrong. But no idea, what that could be…
I thought, you changed something for the system, that might be missing in Swade Tools. I’m referring to (but since I’m not a Developer, I might be completely wrong):
https://gitlab.com/peginc/swade/-/issues/796
Have you gone into the settings and changed the setting?
Which setting?
AA Settings > Launch Menu > Settings > Savage Worlds Adventure Edition > When to play animations
I'm just not sure why Swade Tools would affect that, though
Thanks, didn't know that that option existed (I didn't see it the first time I installed AA). It solved it, which is strange, since I got the animations without SWADE Tools on the action and not the damage roll... Anyway, problem solved!
Two Question regarding AA and templates: when I’m placing the MBT of the blast power from the system card on the map, it starts the fireball animation.
- Is it possible to delay the AA to the (successful) skill roll, like with non template powers (I configured AA to show the AA on the action and not the damage roll)?
- Swade Tools adds also an MBT to the blast power on the character sheet. But when I place this, I didn’t get the AA (neither with the template nor with the action or damage roll). What does Swade Tools have to trigger to get the AA like with the core system? Is this what’s issue #796 for Swade was about?
@lime belfry
Thanks! Yes it works like a charm. Just on a reroll with SWADE Tools (Free Reroll or when spending a benny), it didn't work and I#M trying to find out why...
Does it need to fire the animation on a reroll though? I set up the BRSW hooks initially and I think I turned that off to prevent a bunch of SFX and VFX from playing just from rerolling. So I'd call it a feature.
Actually I would prefer it on the reroll as well. I don't have too many animations in my game and my players love them. And sometimes there's a bit of time between the roll and the reroll. Therefore, yes, I prefer to have the animation on both the roll and the reroll.
https://foundryvtt.com/packages/deadlands-gun-enchantments
I really wish someone would have picked up the development of this module. It was smaller, with less customizations, but easier to maintain than this monster of AA. 😄
Okay, but that's you. I think overall it'd be rather annoying.