Skip to content

Remove "SKILL_RUST_RESIST" enchantment ---> SKILL_RUST_BONUS_XP #79884

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Feb 27, 2025

Summary

None

Purpose of change

SKILL_RUST_RESIST is very much a 'legacy' enchantment. It was introduced back when skill rust was a negative, but never reconsidered when rust was completely reworked (several years ago). Now you have an enchantment with very little effect - skill rust is heavily capped in both directions. So the difference between +1000 "resist" and -1000 "resist" is effectively nothing. Quoting myself:

image

In other words, this enchantment is completely useless.

Describe the solution

Nix it, and replace it with something useful instead. Something that can scale as far as we need. We make a new enchantment, SKILL_RUST_BONUS_XP, which further multiples rust's bonus exp. Because it multiplies exp directly, we can apply straight multipliers without worrying about caps.

The ultimate goal of this PR is

  1. To remove several existing instances where SKILL_RUST_RESIST was mistakenly used to penalize the player and replace them with bonuses - Flawless Memory perk, good/bad memory traits, Enhanced Memory Banks, probably some other places.

  2. To make the infrastructure for some hopefully upcoming XE content which explicitly relies on uncapped bonuses from skill rust.

Describe alternatives you've considered

Testing

Opened as draft with only SKILL_RUST_RESIST removed. Will undraft and fill this in when it's done

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Enchantments / Spells Enchantments and spells json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 27, 2025
@past-simple
Copy link

Is removing skill rust resist necessary for implementing skill rust bonus xp?

The two seem to fill different roles. One allows mods to disable skill rust, the other will allow mods to enhance or reduce the catch-up xp. Is that right?

@John-Candlebury
Copy link
Member

I think it really ought to stay for modding purposes.
A long standing goal of aftershock is to let you play as robots, with along other changes would include a mostly static skill list.
The implementation is really just waiting for proper limbs (as is happening with exodii cyborg bodies),

That needs some extra handling in skill learning code that doesnt exist yet, but disabling skill rust is part of it.

@RenechCDDA
Copy link
Member Author

RenechCDDA commented Feb 28, 2025

I think it really ought to stay for modding purposes. A long standing goal of aftershock is to let you play as robots, with along other changes would include a mostly static skill list. The implementation is really just waiting for proper limbs (as is happening with exodii cyborg bodies),

That needs some extra handling in skill learning code that doesnt exist yet, but disabling skill rust is part of it.

If they're disabling skill rust for them, they should be doing it with a character flag that returns before any of this happens. Assuming that you also don't want these robots to learn, there's much better places upstream to do that. You also don't want to do math on a value that should always result in 0 - that only leads to errors.

@RenechCDDA RenechCDDA force-pushed the skill_rust_enchantment branch from ca845b1 to f97d4fc Compare February 28, 2025 17:50
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON Bionics CBM (Compact Bionic Modules) Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies [Markdown] Markdown issues and PRs Mods: Xedra Evolved Anything to do with Xedra Evolved Mods: Bombastic Perks Mods: Mind Over Matter labels Feb 28, 2025
@RenechCDDA
Copy link
Member Author

RenechCDDA commented Feb 28, 2025

I found two bugs in C++ while working on this, and one two more in JSON. I've separated the C++ ones out into separate commits.

Also un-marking as draft so I can have CI run the tests. Still verifying stuff on my end.

@RenechCDDA RenechCDDA marked this pull request as ready for review February 28, 2025 17:52
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • You cannot forget anything at all, ever. Skills you've "forgotten" come back to you instantly. It also grants you the ability to memorize books for you to read in your head later and makes you able to store mental images so detailled it's almost as if you were taking pictures with your mind.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @bombasticSlacks @Standing-Storm

@RenechCDDA RenechCDDA force-pushed the skill_rust_enchantment branch from 9e99d6e to bb88962 Compare February 28, 2025 18:05
@RenechCDDA
Copy link
Member Author

Hmmm I think I broke it with one of those changes. Back to draft.

@RenechCDDA RenechCDDA marked this pull request as draft February 28, 2025 19:40
@dead-letter-office
Copy link

I think this PR misunderstands how skill rust works quite badly.

SKILL_RUST_RESIST is a highly impactful lever used by mods and base game mutations to affect the rate of skill rust.

The PR description says:

So the difference between +1000 "resist" and -1000 "resist" is effectively nothing.

but this is not correct.

Small changes to SKILL_RUST_RESIST have considerable effects in game.

For example, on a basic character with no modification to skill rust, a skill at level 6 will rust about 4% a day, e.g. the screnshot below is after 1 day of rust with no modifiers:

image

On a character with a modification to SKILL_RUST_RESIST, this changes.

Adding a mutation which applies a 'multiply 10' to rust resist (a positive malus to skill rust) results in a 44% skill rust over the same period:

"enchantments": [ { "values": [ { "value": "SKILL_RUST_RESIST", "multiply": 10 } ] } ]

image

This is useful (and used) for increasing skill rust for characters deep into animal-like mutation paths, and could also be used by mods to simulate certain vitamin deficiencies, injuries, and spells. Obviously lower 'multiply' values would reduce the amount of xp lost to rust.

This isn't the only way that SKILL_RUST_RESIST can be applied. Adding a value to it (instead of multiplying) introduces a chance to resist skill rust, such that,

"enchantments": [ { "values": [ { "value": "SKILL_RUST_RESIST", "add": 100 } ] } ]

would grant 100% resistance (immunity) to skill rust, which would be useful for e.g. characters with eidetic memory.

This is partially documented in the docs:

image

expanded upon in code comments, and also becomes clear after a couple of minutes of testing.

Beyond the problems in the writeup, it's not clear why a PR adding a lever to skill rust for mods to use in the future should also remove a different lever that is used currently by mods (and the base game!), especially since the new lever would not provide the same functionality.

@RenechCDDA
Copy link
Member Author

For example, on a basic character with no modification to skill rust, a skill at level 6 will rust about 4% a day, e.g. the screnshot below is after 1 day of rust with no modifiers:

On a character with a modification to SKILL_RUST_RESIST, this changes.

Adding a mutation which applies a 'multiply 10' to rust resist (a positive malus to skill rust) results in a 44% skill rust over the same period:

"enchantments": [ { "values": [ { "value": "SKILL_RUST_RESIST", "multiply": 10 } ] } ]

The behavior you're describing is not borne out by our existing tests or the code. Please open a bug report with attached save.

would grant 100% resistance (immunity) to skill rust, which would be useful for e.g. characters with eidetic memory.

Not accurate. It reduces the rust amount by over 100x, but unless the rust amount always rounds downs to integer 0 it will continue to accumulate.

As I mentioned before: In cases where gameplay would want skill rust to be turned off, it should be actually turned off. You do not want to do math that you already know the desired answer to.

@dead-letter-office
Copy link

dead-letter-office commented Mar 1, 2025

Wasn't the argument for removing it that no SKILL_RUST_RESIST values of any size made substantive differences to skill rust xp?

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 1, 2025
@Maleclypse
Copy link
Member

So I went ahead and had some time to test this. I did my best to replicate the factors in the pictures above. I did 30 days of waiting and averaged a half a percent of rust per day. I developed scurvy on the 29th day and on the thirtieth I was only at 14% rusted from the starting point.

Randle-trimmed.tar.gz

Rust check 30 days in 14 percent rust and scurvy
Rust check 11 days in 6 percent rust
Rust check 9 days in 5 percent rust
Rust check 7 days in 4 percent rust
Rust check 6 days in 3 percent rust
Rust check 4 days in 2 percent rust
Rust check 3 days in 1 percent rust
Rust check prework

@past-simple
Copy link

past-simple commented Mar 1, 2025

@Maleclypse it looks like you were rusting from 0% progress, and I think hitting the cap whenever rust drops a skill to the next lower level. To see the effects of rust resist, you'd need to have positive progress towards the next level. That's what rust mostly affects. There's also a dropoff where rusted skills rust more slowly, but I don't think you hit that.

@Maleclypse
Copy link
Member

@Maleclypse it looks like you were rusting from 0% progress, and I think hitting the cap whenever rust drops a skill to the next lower level. To see the effects of rust resist, you'd need to have positive progress towards the next level. That's what rust mostly affects. There's also a dropoff where rusted skills rust more slowly, but I don't think you hit that.

Is it possible for you to replicate my testing above using the starting point you are suggesting and provide it or someone else do the same? I am not 100% sure what would be the best way for me to get to that starting point for an example and I've also run out of testing time for tonight and probably the weekend.

@past-simple
Copy link

past-simple commented Mar 1, 2025

No sorry, thats just my understanding of how it works. Also it might be why op thought it didnt do anything?

If you're playing a game and craft until you're halfway through a level then wait 48 hours you should see it.

@Standing-Storm
Copy link
Contributor

I made an issue with saves with my testing. What I found backs up dead-letter-office's report above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells Mods: Bombastic Perks Mods: Mind Over Matter Mods: Xedra Evolved Anything to do with Xedra Evolved Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants