OpenPF2 / Plugin

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

Blueprint-able Character Base Classes (Part 2) #3

Closed GuyPaddock closed 2 years ago

GuyPaddock commented 2 years ago

This provides a sample UI and game mechanics for validating and applying ability boosts chosen by a player to a character. The boosts chosen will survive through character leveling and the toggling of passive GEs that grant boost GAs (as long as the toggling is done through the character interface rather than directly through the ASC).

Another change in this MR is that passive GEs can now control what "weight group" they are placed into, to ensure that GEs can run earlier or later than other GEs, in case they need to depend on the results of earlier GEs. Previously, these weights were maintained solely by a hard-coded list of base passive GEs in the character base class.

When applying a new passive GE (e.g., an ability boost) to a character, now only passive GEs in weight groups after the affected weight group are re-applied, rather than re-applying all passive GEs. This helps to ensure that a passive GE that grants an ability (e.g., an ability boost GA) can run in an earlier weight group so that its corresponding GA is not interrupted when applying additional, new passive GEs. Previously, if a character had two pending boost GAs, after the player made a selection for the first, the player would either get asked to choose boosts for the same boost GA repeatedly; or, the second boost GA would no longer be in effect after the first selection was applied. This is now fixed.