Skip to content

Commit

Permalink
Fix mod not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicFrog committed Jul 1, 2022
1 parent 216f270 commit 862b540
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 38 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.5.2

- Fix: mod didn't actually load due to some last-minute changes.

# 0.5.1

- Fix: build system cleanup. No gameplay changes.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION="0.5"
VERSION="0.5.2"
PK3=release/Laevis-${VERSION}.pk3
LUMPS=MAPINFO CVARINFO KEYCONF MENUDEF LANGUAGE.* sprites/
ZSCRIPT=$(patsubst %.zs,%.zsc,$(shell find . -name "*.zs"))
Expand Down
31 changes: 0 additions & 31 deletions NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -180,31 +180,6 @@ Idea for per-weapon limitations:
- acid+poison:
- lightning+poison:

FIRE:
- for use against really durable enemies, or enemies with healing/regen
- does 50% HP in damage
- reignites on heal
- stacks: damage happens faster
- level: apply more stacks/stack softcap increased
- upgrade: min health to ignite reduced
- AoE capstone: fire spreads between enemies
- Single-target capstone: sufficiently on-fire enemies rocket into the sky and explode like fireworks

FIXME: single-target for fire and poison are variations on the same idea -- "get enough stacks on this enemy and it dies instantly". Rework ideas:
- poison needs more stacks, say 2x the "eventually kill the target" threshold
- fire does a comparison of burn rate vs. target mass and lifts off when the TWR is sufficiently high, so number of stacks needed scales with enemy mass, not HP, and it's easier when the target has more HP, not less; or if that's too punishing, perhaps the burn rate is the amount of stacks that *isn't* dealing damage?
- alternately, completely rework one or both of them; say, max poison makes enemies fight for you or flee in terror until they die, rather than killing them instantly.
- I like the first one. Poison capstone: HALLUCINOGENS

POISON:
- for use with rapid fire guns
- no damage cap but duration and damage fall off fast
- stacks: increases both damage and duration
- level: apply more stacks/stack softcap increased
- upgrade: victim does reduced damage?
- AoE capstone: dead enemies explode in a cloud of poison
- single-target capstone: if there's enough poison stacks to eventually kill the target, it dies instantly

ACID:
- for use with powerful single-shot guns
- damage increases as health drops, but increased damage uses up stacks faster
Expand All @@ -222,12 +197,6 @@ LIGHTNING:
- AoE capstone: lightning nova that damages and stuns when certain stack-application breakpoints are reached
- single-target capstone: enemies killed with enough lightning stacks rise as your minions

## Applying upgrades

In WorldThingSpawned we can detect projectile spawnings (look for target=player and bMISSILE flag) and there we can apply stuff like ripper, bouncy, etc. We can't modify damage, though.

We can't do that for hitscan weapons because the puff spawns AFTER damage is applied, so probably we need to use ModifyDamage or WorldThingDamaged. ModifyDamage works for projectiles, hitscans, and DoTs like poison.

## Avoiding infinite recursion

So, say we have a weapon with the Fragmentation upgrade (shots release shrapnel on impact).
Expand Down
4 changes: 2 additions & 2 deletions ca.ancilla.laevis/upgrades/Dot.zs
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ class ::Dot : Inventory {
}

class ::DotModifier : ::BaseUpgrade {
string dot_type;
virtual string DotType() { return ""; }

override void OnDamageDealt(Actor player, Actor shot, Actor target, int damage) {
if (!shot) return;
let dot_item = ::Dot(target.FindInventory(dot_type));
let dot_item = ::Dot(target.FindInventory(DotType()));
if (!dot_item) return;
ModifyDot(player, shot, target, damage, dot_item);
}
Expand Down
4 changes: 2 additions & 2 deletions ca.ancilla.laevis/upgrades/Fire.zs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ::IncendiaryShots : ::BaseUpgrade {
}

class ::SearingHeat : ::DotModifier {
override void PostBeginPlay() { dot_type = "::FireDot"; }
override string DotType() { return "::FireDot"; }

override void ModifyDot(Actor player, Actor shot, Actor target, int damage, ::Dot dot_item) {
::FireDot(dot_item).heat = level;
Expand All @@ -45,7 +45,7 @@ class ::SearingHeat : ::DotModifier {
}

class ::Conflagration : ::DotModifier {
override void PostBeginPlay() { dot_type = "::FireDot"; }
override string DotType() { return "::FireDot"; }

override void ModifyDot(Actor player, Actor shot, Actor target, int damage, ::Dot dot_item) {
::FireDot(dot_item).spread = level;
Expand Down
4 changes: 2 additions & 2 deletions ca.ancilla.laevis/upgrades/Poison.zs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ::PoisonShots : ::BaseUpgrade {
}

class ::Weakness : ::DotModifier {
override void PostBeginPlay() { dot_type = "::PoisonDot"; }
override string DotType() { return "::PoisonDot"; }

override void ModifyDot(Actor player, Actor shot, Actor target, int damage, ::Dot dot_item) {
::PoisonDot(dot_item).weakness = level;
Expand All @@ -41,7 +41,7 @@ class ::Weakness : ::DotModifier {
}

class ::Hallucinogens : ::DotModifier {
override void PostBeginPlay() { dot_type = "::PoisonDot"; }
override string DotType() { return "::PoisonDot"; }

override void ModifyDot(Actor player, Actor shot, Actor target, int damage, ::Dot dot_item) {
::PoisonDot(dot_item).hallucinogens = level;
Expand Down

0 comments on commit 862b540

Please sign in to comment.