Eranziel / foundryvtt-lancer

A Foundry VTT game system for LANCER RPG.
GNU General Public License v3.0
105 stars 64 forks source link

[FEATURE] Damage Application #189

Open VexxMyst opened 3 years ago

VexxMyst commented 3 years ago

Is your feature request related to a problem? Please describe. the Mess/Mars module has an feature where you can apply damage from a roll directly to a targeted character.

Describe the solution you'd like If a roll is made against a targeted character, the GM can right-click on the character section and select 1/2x, 1x, or 2x damage. If full automation is desired, the GM could instead have a button next to the hit/miss marker that applies the damage, taking resistances and Exposed into account automatically.

Describe alternatives you've considered See if Moerill would be interested in supporting Lancer with Mars. As the system already has hit detection and acc/diff integrated, the module's main functions seem redundant.

Additional context A mockup showing both suggestions: lancerhitmock

Discord contact info VexxMyst#6669

ScyllPoesis commented 3 years ago

Manual damage application is in the cards, yes yes. We've discussed it internally and I have some basic designs for it, but still need to shop it out. Currently my idea is similar to MidiQOL's damage cards, which on hits will calculate what it thinks the damage should be for each target, listing out things like resistances and such, and allowing the GM to apply the suggested damage or half/double it if there are other factors it missed or aren't supported.

msprijatelj commented 3 years ago

To chime in with my 2 cents: I'd love it if automatic damage reduction/amplification could be applied for Resistance, Exposed, Armor, Miss-for-half-damage, etc, without the need for a GM to click to verify damage. I'm just imagining scenarios where a Monarch or a Barbarossa hits a ton of enemies at once, and the number of clicks needed to verify the damage if I need to apply damage to each target on a case-by-case basis. Ideally, I could roll damage once and have the system automatically take care of the rest.

Eranziel commented 3 years ago

While I agree that fully automatic would be great, the fact at the end of the day is that our data model can't account for all of Lancer's edge cases and special cases. Especially in cases like hitting many characters in one attack it is very likely that some of the damage would be applied incorrectly, making more work for the GM instead of less.

msprijatelj commented 3 years ago

I am sure that full Lancer damage automation, with all edge cases covered, would require a significant amount of developer effort. However, I am not pushing for full damage automation, here. I would be beyond happy to see the automation of the 4-step Calculating Damage algorithm from pg. 67 of the Lancer Core Book.

From the sounds of things, there are a reasonable number of characters (PCs or NPCs) that potentially break the damage calculation algorithm and could frustrate damage automation. Given this concern, these are the best case/worst case scenarios I would anticipate given the presence and lack of damage automation:

No Damage Automation

With Full Damage Automation, following the core book's Calculating Damage algorithm:

Most cases are going to fall between the best case and the worst case, of course, but if even a fraction of the tokens follow the standard damage calculation algorithm, the GM's job could get easier due to automation, as measured by number of manual intervention events. With all that said, in order to understand the trade-offs between manually applying damage and correcting auto-applied damage, I have the following questions:

Answers to these questions that can clarify the current state of Lancer would be immensely helpful! I want to better understand the system so that I can contribute to it in a meaningful way.

Eranziel commented 3 months ago

Documenting recent discussions and the current plan. Damage application will end up as a 3 steps process for the user:

Other surrounding discussion:

msprijatelj commented 3 months ago

Some of my thoughts on the above:

Eranziel commented 3 months ago

I kind of buried the lede, but I was thinking of having a "1/2 damage" checkbox in the attacker's damage HUD, since non-resistance halving is all due to attacker's effects AFAIK. That and resistance definitely need to stack.

Edit: that checkbox should have a global and a per-target copy, though. In the example of HyperDense Armor, with an AOE attack you could have some targets within 3 and some targets outside range 3.

lmilekic commented 3 months ago

Hey friends, I hadn't looked at this in a little bit, but I made a SUPER SUPER rough PR with what I was thinking. I'm still both learning lancer + learning my way around the foundryvtt code. I was thinking as a super MVP just copying the style from pathfinder with 1/2, 1x and 2x damage (even if its not taking into account armor etc) might be nice. But in the past someone also put a lot of effort into calculating damage to be done to mechs so maybe we can reuse that code? I'm not familiar enough with lancer to confidently go through it and confirm if its handling all possible cases we care about. Here's what the pathfinder one looks like: image

I put a pic of my super jank/ugly version in my PR.

C-S-McFarland commented 3 weeks ago

I did some testing today.

The enemy NPC mech (Pyro) has a flamethrower that has an effect on it that isn't covered in the automation. But applying exposed (to try and get double burn) doesn't apply to burn ... which is right. So, maybe we can add a drop-down to just apply double damage to help cover some of these random effects on weapons?

This weapon deals double � to characters that already have any �.

C-S-McFarland commented 3 weeks ago

When I perform a basic tech attack, it gives me a roll damage option on the card. The roll damage seems to throw an error, but I'm not sure Invade should even have a damage roll?

msprijatelj commented 3 weeks ago

When I perform a basic tech attack, it gives me a roll damage option on the card. The roll damage seems to throw an error, but I'm not sure Invade should even have a damage roll?

Invade innately inflicts 2 heat, which would be a valid use for the damage application algorithm. That said, basic tech attack can be used for things that aren’t Invade, so applying a “blanket 2 Heat” may not be ideal.

C-S-McFarland commented 3 weeks ago

Invade innately inflicts 2 heat, which would be a valid use for the damage application algorithm. That said, basic tech attack can be used for things that aren’t Invade, so applying a “blanket 2 Heat” may not be ideal.

Fair point. If that's possible, here is the error I'm getting.

Screenshot 2024-09-26 at 3 49 02 PM

C-S-McFarland commented 3 weeks ago

When a roll damage for a multi target attack, the roll damage hud includes missed targets. Once I roll the damage, it only shows me a card for the mechs I hit, but it's a little confusing at this point why those mechs are there? Screenshot 2024-09-27 at 2 18 33 PM

C-S-McFarland commented 3 weeks ago

Ahh, I see, there are little crit/hit/miss markers in each target card inside the roll damage HUD.

Eranziel commented 2 weeks ago

@C-S-McFarland

When I perform a basic tech attack, it gives me a roll damage option on the card. The roll damage seems to throw an error, but I'm not sure Invade should even have a damage roll?

I'll add damage rolls for tech attacks/invades later, they need a bit more time in the oven. The Roll Damage button on tech attacks should be hidden properly now, if you pull the latest commits.

When a roll damage for a multi target attack, the roll damage hud includes missed targets. Once I roll the damage, it only shows me a card for the mechs I hit, but it's a little confusing at this point why those mechs are there?

Yup, it's so that you can roll and apply reliable damage. I think I'll give target cards marked as "miss" a bit of a visual treatment so it's more obvious.

Thanks for the testing and feedback!