Kanonenschuss: the stun no longer plays the hit motion or pushes the target; stunned creatures stand still for 1.5 s. The impact effect only shows on targets that did not resist, and the ray reaches 1800 for the wider view. Mörsergranate: the impact radius grows by a tenth of its size every 5 skill levels. Art levels come from a shared helper. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2.7 KiB
2.7 KiB
Dwarf arts: Kanonenschuss and Mörsergranate
Requests (2026-10-25 / 2026-10-26)
- Kanonenschuss (art 0x43f,
gui_spells_kanone): "remove the knockback, instead it can be just a stun" (chosen: no push, only a stun); the range increased for the wider view; the stun particles not on targets that avoided the stun. The game's stun resistance stays (2026-10-26: "we dont ignore anything, the skill is fine for now"). - Mörsergranate (art 0x43e,
gui_spells_moerser): "the radius of the explosion should increase every 5 skill levels".
Measured
- The cannon's code is the combat move function
0x5145d0, case 0x43f. Its ray:cmp edi,19hat0x517389, 25 steps of 40 = 1000 range. Hostile targets getcEvent_creature5 from0x51768d. - Stun chance
0x4fc810(level, creature)= level × 5 / creature level × 100 (UI_STAT_STUNNCHANCE). On a successful roll:0x5936e0(MOTION_HIT_A 0xaf, 3.0, 0.25)at0x517709(pushes from0x5176f8), then the stun ordercEvent_creature3 with +0x14 = 100, sent bycall [eax+18h]at0x5177aa(returns to0x5177ad). - The stun is the knockback.
cCreature::ReceiveOrder0x52e400case 3: first the resistancevf24(0x50)(0x55d0a0: flag +0x4f0 & 0x1000 resists 2 in 3, effect 0x35d a percentage); otherwise push left +0x24d = 100, flag +0x200 |= 0x20000, attacker +0x259, ResetToIdle.cCreature::Updatebranch0x594c82moves a creature with that flag away from the attacker and lowers the push left by each step (0x594deb), measured about 100 units in 0.3 s; at 0 the flag is cleared. - The impact effect
TYPE_FX_DWARF_SHOOT_IMPACT(0x47f) is created on every hit target byCreateAtat0x517855(target in ebx), resisted or not. - Mörsergranate: the grenade (type 0x3fa) lands and creates
TYPE_FX_GRENADEIMPACT(0x3fc), which gathers its targets withcObjectManager 0x5ff820(called from0x5ab400at0x5ab63d): a creature is hit when its distance is below the impact's size (150, type table0x428bb0) plus its own type's size.
The mod (src/mods/dwarfarts.cpp)
- The HIT_A motion is jumped over (
0x5176f8:jmppast the call). - The push step at
0x594debcallsPushStepThunk: creatures the cannon stunned (order 3 from0x5177ad, kept with an end time) move by 0 and keep their push left above 0 for 1.5 s, so they stand still, then carry on. - The impact effect is created only on targets in the stun state.
- The ray gets 45 steps (1800); confirmed to reach across the widened view.
- The impact's gather call gets a radius of size × (1 + 0.1 × (level / 5)),
with the owner's Mörsergranate level (
game::ArtLevel). The growth 0.1 per step is our choice; not yet seen in the game (Borf's level is 2).