beyond-all-reason / beyond-all-reason/RecoilEngine

Default damage is overloaded with meanings

Open
#1,625 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
683
Forks
293
Avg merge
3d 2h
Merged PRs (30d)
40

Description

Weapon default damage is used for a lot of things:
* damage to units and shields whose armor class wasn't explicitly specified in the damages table.
* damage to units and shields with the armor class "default".
* damage to features, which are always in the armor class "default".
* cratering power.
* impulse power.
* targeting priority (even for targets of different armor classes)
* reference value for dynamic damage minimum
* size of the ground decal.
* size of the default CEG component.
* [this random-ass multiplier for the above](https://github.com/beyond-all-reason/spring/blob/0889e956f86847114f1944c931c519a2614b3872/rts/Sim/Units/Unit.cpp#L508), on top of the linear damage scaling.
* size of the muzzle flare when shooting.
* size of waves for dynamic water (`/water 2`)

Many of these are good defaults, and some provide means of control (you can Lua targeting priority, there's `gfxMod` or `craterBoost` weapon def tags, etc).

The task is to:
* figure out which entries from the list above can be worked around, and document the method and caveats of doing so.
* figure out if the workaround is tiresome enough to warrant doing something about it in the engine.
* do something about it where applicable.

In particular, features should be able to have an armor class.

Contributor guide

Open the contributing guide

Research direction

Start with rts/Sim/Units/Unit.cpp around line 508, then trace how weapon default damage feeds the listed effects. Inventory which behaviors can be controlled through Lua, gfxMod, or craterBoost, and document the workarounds and caveats. Done means applicable engine changes are made, especially support for an armor class on features, with the remaining defaults explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.