-
Notifications
You must be signed in to change notification settings - Fork 198
Support for runtime patches: MonSca, EncounterRandomnessAlert, EXPlus, GuardRevamp #3378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
florianessl
wants to merge
13
commits into
EasyRPG:master
Choose a base branch
from
florianessl:compat/BattlePatches
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b3c5d65
to
b9cd797
Compare
16 tasks
…picked from VDCE commit 8555c92)
…eters based on some variable values)
…ert' & moved code to separate file.
- Refactor the way Player::config_game is initialized, so that the values set by indirectly adressing config params don't get overwritten. - Replace all occurrences of ':' for INI parameters with '.' - Game config parameters were passed by copy instead of reference in some occassions - Also implement EXPlus modifier for RPG2k3 - Fix GCC warnings
…ap codes from our InputKey enum to their "virtual key" equivalent
b9cd797
to
6269f66
Compare
Ok, this should be ready for review. I also cherry-picked my recent commits that move the handling for "Virtual Key" code mapping because several other PRs & WIP branches depend on these helper functions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detection
No automatic patch detection yet! (Only .INI settings & cmd line args)
This would either require something like my proposed Draft PR #3352 (Extracting patch info from .EXE via known addresses & signatures) or some database of known patch configurations of games (As proposed in Issue #1210)
Test Game:
BattlePatches.zip
RPG_RT Patches included in this PR
MonSca:
This patch scales the default battle parameters of an enemy based on the contents of some in-game variables.
(Default:
V[1001] - V[1010]
)When a switch is set (default:
S[1001]
) to ON, an alternative scaling formula, based on the average party level, is used.Default formula:
val = val * V[...] / 1000
Alternative formula: val =
val * avg_level * V[...] / 1000
Variant 'MonScaPlus':
If set, the variable IDs used for scaling will be offset by the enemy's troop index.
->
V[base_var_id + troop_index]
Encounter Randomness Alert
This patch skips the normal battle startup logic whenever a random encounter would be triggered.
Instead a switch (default:
S[1018]
) is set to ON and the troop ID is stored into a variable (default:V[3355]
).EXPlus:
This patch allows to individually boost the 4 party members' gained experience inside battles by applying an extra percentage based on the values of in-game variables.
(default:
V[3333]
for party member#1
; the amounts for other party members are read from the subsequent 3 variables)If the '[+]' option is enabled, a side effect is added to one of the Actor clauses of 'CommandConditionalBranch':
Whenever this command is used to check for the existence of an actor in the current party, the current party slot (1-4) of this actor is set to an in-game variable. (default:
V[3332]
)GuardRevamp:
This patch changes the way the damage adjustment is calculated whenever the target of an attack is defending.
Normally this calculation is done by simply dividing the damage in half for normal defense situations, and by quartering it when the target has the 'strong defense' attribute. With 'GuardRevamp' enabled, this is changed to a percentage calculation, allowing for more granular control over the output. The given default values of '50%', and '25%' would provide the same results in most situations.
Notes
Support for all of these patches can be disabled by setting the compiler flag
NO_RUNTIME_PATCHES
.Some of the handling of command line args has been refactored, to allow setting patch parameters inidividually.
Example:
Player.exe --patch-monsca -atk 2003 -exp 2027 -plus --patch-guardrevamp -normal 75 -strong 30
V[2003]
&V[2027]
(+ troop_id for this 'Plus' variant)