Skip to content

Commit

Permalink
Add Nuclear Explosion Macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Z3nner committed Nov 25, 2023
1 parent 616973e commit 849164d
Show file tree
Hide file tree
Showing 20 changed files with 225 additions and 8 deletions.
Binary file added icons/explosion-rays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/mushroom-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
"url": "https://github.com/Z3nner/lancer-weapon-fx",
"manifest": "https://github.com/Z3nner/lancer-weapon-fx/releases/latest/download/module.json",
"download": "https://github.com/Z3nner/lancer-weapon-fx/releases/download/1.6.0/module.zip",

"relationships": {
"requires": [
{
"requires": {
"id": "sequencer",
"type": "module",
"manifest": "https://github.com/fantasycalendar/FoundryVTT-Sequencer/releases/latest/download/module.json",
"compatibility": {
"minimum": "2.3.7"
}
},
]
"compatibility": {"minimum": "2.3.7"}
}
},
"languages": [
{
Expand Down
4 changes: 4 additions & 0 deletions packs/weaponfx.db

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions packs_source/weaponfx.db/JetLancerExplosion.WjxNFb3JQBla9BBC.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const {targetsMissed, targetTokens, sourceToken} = game.modules.get("lancer-weapon-fx").api.getMacroVariables(typeof messageId === "undefined" ? null : messageId, actor);

let sequence = new Sequence();

new Sequence()
.sound("modules/lancer-weapon-fx/soundfx/dramaticSparkles.ogg")
.fadeInAudio(4000)
.volume(0.3)
.duration(5000)
.effect("jb2a.static_electricity.03.blue")
.atLocation(sourceToken)
.scaleToObject(1)
.duration(5000)
.canvasPan()
.atLocation(sourceToken)
.duration(5000)
.scale(1)
.waitUntilFinished()
.canvasPan()
.atLocation(sourceToken)
.duration(100)
.scale(2)
.sound("modules/lancer-weapon-fx/soundfx/jetlancerSound.ogg")
.effect("modules/lancer-weapon-fx/video/jetlancer_explosion_1000.webm")
.aboveInterface()
.atLocation(sourceToken)
.scale(1)
.canvasPan()
.shake({duration: 5000, strength: 10, rotation: false, fadeOutDuration: 500})
.thenDo(remainsAftermath)
.waitUntilFinished()
.effect("modules/lancer-weapon-fx/sprites/jetlancer_explosion_white_bg.png")
.delay(3600)
.aboveInterface()
.atLocation(sourceToken)
.duration(1700)
.fadeOut(300)
.play()

function remainsAftermath() {
console.log("AFTERMATH");
console.log(sourceToken);
console.log(canvas)
token.document.update({hidden: true});
canvas.scene.createEmbeddedDocuments("Tile", [{
texture: { src: "modules/lancer-weapon-fx/sprites/RETROGRADE-crater.png" },
x: token.document.x - canvas.dimensions.size,
y: token.document.y - (canvas.dimensions.size + (canvas.dimensions.size / 2)),
height: canvas.dimensions.size * (token.document.width + 2),
width: canvas.dimensions.size * (token.document.width + 2),
tint: "#464646"
}]);
}



sequence.play();
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"_id": "WjxNFb3JQBla9BBC",
"name": "JetLancerExplosion",
"img": "modules/lancer-weapon-fx/icons/explosion-rays.png",
"type": "script",
"scope": "global",
"author": "fpthefluffypawed"
}
78 changes: 78 additions & 0 deletions packs_source/weaponfx.db/NuclearExplosionSFC.Nsmpx88frJTCU0Ax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
new Sequence()
.effect("modules/lancer-weapon-fx/sprites/jetlancer_explosion_white_bg.png")
.fadeIn(100)
.duration(6000)
.fadeOut(3000)
.screenSpace()
.effect("modules/lancer-weapon-fx/sprites/shockwave.png")
.atLocation(token)
.duration(7000)
.scale(0.2)
.scaleOut(12, 7000)
.fadeOut(7000)
.delay(3000)
.sound("modules/lancer-weapon-fx/soundfx/pw_nuke.ogg")
.startTime(800)
.delay(1000)
.effect("modules/lancer-weapon-fx/video/pw_nuke_effect.webm")
.delay(1000)
.atLocation(token)
.aboveLighting()
.xray()
.scale(1)
.zIndex(100)
.thenDo(remainsAftermath)
/*
CRATER EFFECT PERSISTENT AFTERWARDS:
- Both following effects are entirely for the crater, remove
- or comment it out as needed. Light included.
*/
.effect("jb2a.ground_cracks.01.orange")
.persist()
.belowTokens()
.aboveLighting()
.zIndex(1)
.xray()
.randomRotation()
.atLocation(token)
.scale(2)
.thenDo(createLight)
.effect("modules/lancer-weapon-fx/sprites/scorch_mark_hires.png")
.atLocation(token)
.scale(2.2)
.persist()
.belowTokens()
.zIndex(0)
.randomRotation()
.xray()
.canvasPan()
.delay(1000)
.atLocation(token)
.scale(0.5)
.shake({
duration: 20000,
strength: 15,
fadeOutDuration: 10000,
rotation: true
})
.play()

async function remainsAftermath() {
console.log("AFTERMATH");
token.document.update({hidden: true});
}

async function createLight() {
await canvas.scene.createEmbeddedDocuments("AmbientLight", [{
x: token.document.x + (canvas.dimensions.size / 2),
y: token.document.y + (canvas.dimensions.size / 2),
config: {
color: "#ff9117",
dim: 10,
bright: 5,
animation: {
type: "pulse",
},
}
}]);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"_id": "Nsmpx88frJTCU0Ax",
"name": "NuclearExplosionSFC",
"img": "modules/lancer-weapon-fx/icons/mushroom-cloud.png",
"type": "script",
"scope": "global",
"author": "LancerWeaponFX00"
}
55 changes: 55 additions & 0 deletions packs_source/weaponfx.db/NuclearExplosionSpace.tzS44LYDm9vRB0HP.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
new Sequence()
.effect("modules/lancer-weapon-fx/sprites/jetlancer_explosion_white_bg.png")
.fadeIn(100)
.duration(6000)
.fadeOut(3000)
.screenSpace()
.effect("modules/lancer-weapon-fx/sprites/shockwave.png")
.atLocation(token)
.duration(7000)
.scale(0.2)
.scaleOut(12, 7000)
.fadeOut(7000)
.delay(3000)
.sound("modules/lancer-weapon-fx/soundfx/pw_nuke.ogg")
.startTime(800)
.delay(1000)
.effect("modules/lancer-weapon-fx/video/pw_nuke_effect.webm")
.delay(1000)
.atLocation(token)
.aboveLighting()
.xray()
.scale(1)
.zIndex(100)
.thenDo(remainsAftermath)
.canvasPan()
.delay(1000)
.atLocation(token)
.scale(0.5)
.shake({
duration: 20000,
strength: 15,
fadeOutDuration: 10000,
rotation: true
})
.play()

async function remainsAftermath() {
console.log("AFTERMATH");
token.document.update({hidden: true});
}

async function createLight() {
await canvas.scene.createEmbeddedDocuments("AmbientLight", [{
x: token.document.x + (canvas.dimensions.size / 2),
y: token.document.y + (canvas.dimensions.size / 2),
config: {
color: "#ff9117",
dim: 10,
bright: 5,
animation: {
type: "pulse",
},
}
}]);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"_id": "tzS44LYDm9vRB0HP",
"name": "NuclearExplosionSpace",
"img": "modules/lancer-weapon-fx/icons/mushroom-cloud.png",
"type": "script",
"scope": "global",
"author": "LancerWeaponFX00"
}
4 changes: 3 additions & 1 deletion scripts/WeaponFX.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ Hooks.once("sequencer.ready", async function () {
"jb2a.warhammer.melee.01.white.4",
"jb2a.zoning.inward.square.loop.bluegreen.01.01",
"jb2a.zoning.inward.circle.loop",
"modules/lancer-weapon-fx/icons/LatchDrone.png"
"modules/lancer-weapon-fx/icons/LatchDrone.png",
"modules/lancer-weapon-fx/video/jetlancer_explosion_1000.webm",
"modules/lancer-weapon-fx/video/pw_nuke_effect.webm"
], true);
console.log('Lancer Weapon FX | Effects preloaded');
});
Expand Down
Binary file added soundfx/dramaticSparkles.ogg
Binary file not shown.
Binary file added soundfx/jetlancerSound.ogg
Binary file not shown.
Binary file added soundfx/pw_nuke.ogg
Binary file not shown.
Binary file added sprites/RETROGRADE-crater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sprites/jetlancer_explosion_white_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sprites/scorch_mark_hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sprites/shockwave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added video/jetlancer_explosion_1000.webm
Binary file not shown.
Binary file added video/pw_nuke_effect.webm
Binary file not shown.

0 comments on commit 849164d

Please sign in to comment.