Skip to content
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

Move configs to new Unit Parameters DB and Max HP limits #3214

Merged
merged 8 commits into from
Jun 15, 2023

Conversation

guilherme-gm
Copy link
Member

Pull Request Prelude

Changes Proposed

This PR creates a new db file called Unit Parameters DB and moves a few battle configs to it:

  • NaturalHealWeightRate
  • MaxASPD
  • MaxHP
  • MaxStats

The reason to move those settings is that:

  1. We will need different values between RE and Pre-RE (e.g. MaxHP, NaturalHealWeightRate)
  2. We already have more than one different setting for it due to job differencs (MaxASPD, MaxStats)

Thus having this new file allows us to link jobs to parameter groups for each server type.

Finally, a small change but an actual new content: This PR also adds the maximum HP based on users level. A change introduced in kRO's episode 15.1

Huge thanks to Haru and 4144 for the discussions on this :)

Issues addressed: MaxHP limits item from #243

For users upgrading their Hercules copy

(I plan to also post this on herc board once the PR gets in a release)

There are 3 changes introduced in this PR that may affect you.

1. job_db.conf update

If you are using Hercules' default db folder (db/pre-re/job_db.conf or db/re/job_db.conf) this should get merged automatically.

For custom folders, please check the original Hercules' job_db.conf and replicate the ParametersGroup of each job. Using the same values as in Hercules' original file will make the other 2 changes easier to migrate.

2. You must have the new unit_parameters_db.conf db file

If you are using Hercules' default db folder (db/pre-re/ or db/re/) this should get merged automatically.

For custom folders, please copy db/(pre-re|re)/unit_parameters_db.conf to your own db folder (based on your server type).

Those will already come with the default configs and groups that you needed in step 1.

3. Migrate configs from conf/battle/player.conf

If you have customized any of the configs changed in this PR, you may have to update your unit_parameters_db.conf with the new values. Below you will find each battle config and how they map to the new unit_parameters_db.conf.

  • the first column mentions the existing battle conf name
  • the second column mentions the field in unit parameters db equivalent to this config (Note: Also look the 3rd column)
  • the third column mentions for which group(s) this config applies (for example: a 3rd job-only config will affect only 3rd job groups)
  • the fourth column gives you some notes, like whether you can remove or not this config and why.
player.conf Parameter Field Parameter Group Notes
natural_heal_weight_rate NaturalHealWeightRate Base This config may be removed from your player.conf, it is no longer used.
max_aspd MaxASPD Base This config should be kept in your player.conf, since it is still used for homunculus and as fallback for players
max_third_aspd MaxASPD ThirdClasses
SuperNovice
This config may be removed from your player.conf, it is no longer used.
max_hp MaxHP Base This config may be removed from your player.conf, it is no longer used. You may be interested in the level grouping (check docs)
max_parameter MaxStats Base This config should be kept in your player.conf, since it is still used for some skills/npc logic
max_third_parameter MaxStats ThirdClasses This config should be kept in your player.conf, since it is still used for some skills/npc logic
max_extended_parameter MaxStats ExtendedClasses This config may be removed from your player.conf, it is no longer used.
max_summoner_parameter MaxStats Summoner This config may be removed from your player.conf, it is no longer used.
max_baby_parameter MaxStats BabyBase This config may be removed from your player.conf, it is no longer used.
max_baby_third_parameter MaxStats BabyThirdClasses This config may be removed from your player.conf, it is no longer used.

this will make it easier to extend with new deprecations/removals
this new db will allow splitting certain battle configs into pre-re/re
versions and fine tune them in configuration groups associated to each
job.

this commit only contains the base file reading. fields will come in
follow up commits
@guilherme-gm guilherme-gm force-pushed the parameters-db branch 2 times, most recently from 09b1837 to 6fec984 Compare June 8, 2023 23:03
@MishimaHaruna MishimaHaruna added this to the Release v2023.06.14 milestone Jun 14, 2023
src/map/pc.h Outdated Show resolved Hide resolved
src/map/pc.h Outdated Show resolved Hide resolved
- this removed max_hp battle config
- it is now possible to create different MaxHP values
  depending on the player's level
From Episode 15.1 update
- from Lvl 1 to Lvl 99: 330,000
- from Lvl 100 to Lvl 150: 660,000
- from LVl 151 to Lvl 175: 1,100,000
max_third_aspd battle conf is also removed because it can be set
using unit parameters
- pc_maxparemeter macro is also renamed to pc_maxstats
- some max_parameter configs are kept because they are required for
  other logics
this prepares the code for future renewal update where natural heal
weight has changed.

- pc_is50overweight macro is now called pc_isoverhealweight to avoid
  confusion
@MishimaHaruna MishimaHaruna merged commit 93a3f4f into HerculesWS:master Jun 15, 2023
15 of 254 checks passed
@guilherme-gm guilherme-gm deleted the parameters-db branch June 15, 2023 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants