OpenPF2 / Plugin

Core C++ Game Logic for OpenPF2 (Status: Pre-alpha)
https://www.openpf2.org/
Other
24 stars 5 forks source link

Combat, Weapon Stats, and Damage Calculation (Part 1) #4

Closed GuyPaddock closed 2 years ago

GuyPaddock commented 2 years ago

What this PR Implements

  1. Provides a way to calculate dice rolls via the new OpenPF2 Dice Library.
  2. Provides a way to start representing melee and ranged weapon stats and ammo as GAs (though this may shift over to a data-table or primary asset approach later to improve data entry efficiency and reduce memory footprint).
  3. Provides tags for tracking weapon proficiency, weapon groups, currencies, and monetary units.
  4. Moves content defined by the P2E Core Rulebook that is not mandatory for core game logic to function into a new CoreContent package, so that game devs using OpenPF2 who do not need all of this content can reduce bloat of their games.
  5. Exposes character names and character levels through the PF2 Character Interface.
  6. Defines common, re-usable GEs for applying and resisting damage from the 18 standard damage types in the Core Rulebook.
  7. Implements low-level callbacks for detecting incoming damage on a PF2 character and dispatching it out to BP events. This is heavily inspired by Epic's Action RPG sample, but in smaller, more grokable pieces that are expected to evolve over time.

Next Steps

Part 2 will focus on:

  1. Providing base character montages for weapon attacks.
  2. Providing events that wire up weapon attack montages to roll actual damage and apply it to targets using the GEs in part 1.
  3. (Potentially) moving weapon stats into a data-table or other data-driven approach, so that GAs can be reserved for the logic behind the weapons. Whether this is the right approach or not depends on if the weapons in PF2 behave similarly enough that they can share common GAs; if they do not, then one-GA-per-weapon may end up still being the best approach.