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

feat(balance): sanity-check EXP gain of several activities #5696

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

chaosvolt
Copy link
Member

Checklist

Required

Optional

Purpose of change

This aims to tackle several cases where the EXP gain of certain actions pale in comparison to craft-grinding and book-grinding, when I want to generally encourage gaining skills by actually using them during gameplay.

Describe the solution

  1. In construction.cpp, set the time scaling for EXP gain in complete_construction to a value closer to the scaling used by crafting, dividing the duration of construction by 10 minutes (crafting seems to divide by 5, so should scale up at half the rate of crafting) instead of 30 to get the EXP multiplier.
  2. Also in construction.cpp, removed the old hardcoded checks in construct::done_deconstruct that give you electronics EXP for taking apart a very narrow specific range of terrain, and instead have it grant it for any deconstruction where the furniture being removed has active info, so any grid furniture will give electronics EXP when salvaged.
  3. In iexamine.cpp, changed iexamine::practice_survival_while_foraging to not penalize the player's EXP for having more survival skill, since EXP per level ALREADY goes up exponentially!
  4. In iuse_actor.cpp, changed how the EXP gain in repair_item_actor::repair is determined. Instead of 1 + half the item's repair difficulty, it now uses the item's repair difficulty as-isv (std::max'd against 1 so that level-zero items don't give nothing).
  5. Also in iuse_actor.cpp, updated heal_actor::finish_using so that the EXP gain from using healing items values bandage and disinfectant stacks at the same 3x multiplier it values the old instant-healing, instead of only a 2x multiplier.
  6. In veh_utils.cpp, set calc_xp_gain to multiply the EXP gain formula by the skill requirement, so that more advanced installation and repair will grant proportionately more EXP.

Describe alternatives you've considered

Screaming.

Testing

  1. Compiled and load-tested.
  2. Spawned in a vehicle and tested a level-1 hour-long installation, still get 60% of the way to next level as expected.
  3. Retested with a level-2 hour-long installation, confirmed I get more EXP from it.
  4. Inserted a message into repair actions temporaily, practice amount for one instance of repairing a messenger bag went from 2 to 3.
  5. Observed that applying a single banadage to an injury at level zero first aid went from granting 9 EXP to 12 EXP. The std::max in the function means the actual before value was probably 8 and got bumped up to a minimum of 9.
  6. Tested deconstructing furniture, confirmed that fabrication progress from level zero went from 16% to 30%, compare ice cream (also a 20-minute, level-zero recipe) getting cooking to 47%.
  7. Confirmed I got some electronics EXP for taking apart the solar panel on the roof.
  8. Checked to confirm that deconstructing a random old bench or other non-grid furniture wouldn't give me electronics EXP.
  9. Checked affected files for astyle.

Additional context

@github-actions github-actions bot added the src changes related to source code. label Nov 11, 2024
@chaosvolt chaosvolt merged commit 75a63f5 into cataclysmbnteam:main Nov 11, 2024
12 checks passed
@chaosvolt chaosvolt deleted the skill-exp-increases branch November 11, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants