-
Notifications
You must be signed in to change notification settings - Fork 39
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
libtrx/config: support enforced config settings #1854
libtrx/config: support enforced config settings #1854
Conversation
Download the built assets for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything looks good and works well!
My one suggestion is to change how the config tool shows the enforced option. Right now, the tool shows the user's version of the option greyed out. However, I think the tool should show the enforced option greyed out. For example, using your example setting from the PR force disables the underwater roll:
"enforced" : {
"enable_uw_roll" : false
}
That enforced option is properly enforced in game so Lara can't roll. But, the config tool's greyed out option makes it seem like the author force enabled the underwater roll as seen here:
This is confusing because the player would assume the underwater roll is enforced on. I think the opposite can also occur if the user has an option disabled, but the author force enabled it. The player would think it's off but it's actually always on.
e10fac0
to
688f385
Compare
Pushed an update @walkawayy. Unfortunately, because of the abstraction in how the properties are managed, I couldn't think of a good way to store the enforced value but retain writing the actual value back when needed. But I agree it's clearer to show what's actually in place, so let me know if you think the update is OK. It just shows the raw enforced value along with a message. It's clear there is no UI input as such. |
Oh oops I didn't notice I had to do a git pull with a rebase. My normal pull failed and I wasn't paying attention. Yes it works perfectly now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but we need to describe this mechanism in the gameflow docs for it to be adopted.
688f385
to
eed62ce
Compare
Updated |
This allows an enforced object to be defined in the config file, within which any regular config setting can be defined, and the values from here will be enforced in the game. Enforced settings are not shown in the config tool, but will be preserved on write. Resolves LostArtefacts#1846.
This makes enforced properties read-only inside the config tool, and adds a banner to the top of the main window to inform the user why some settings cannot be changed.
eed62ce
to
0b950b0
Compare
This refactors the enforced config control from LostArtefacts#1854 into the gameflow and removes the legacy settings for enforcing game modes and save crystals. Resolves LostArtefacts#1857.
This refactors the enforced config control from LostArtefacts#1854 into the gameflow and removes the legacy settings for enforcing game modes and save crystals. Resolves LostArtefacts#1857.
This refactors the enforced config control from LostArtefacts#1854 into the gameflow and removes the legacy settings for enforcing game modes and save crystals. Resolves LostArtefacts#1857.
This refactors the enforced config control from LostArtefacts#1854 into the gameflow and removes the legacy settings for enforcing game modes and save crystals. Resolves LostArtefacts#1857.
Resolves #1846.
Resolves #1847.
Checklist
Description
This allows an enforced object to be defined in the config file, within which any regular config setting can be defined, and the values from here will be enforced in the game. This applies to TR1 and TR2.
Example snippet for
TR1X.json5
:Here the initial value is replaced by the one in the
enforced
object when the game loads. When the game writes back the config, both entries will be preserved, meaning if players want to remove these enforcements they can do so and their original settings will not need to be re-edited.The config tool will grey out any enforced options, and display a message so the user knows why they cannot be edited.
I think we can remove
force_game_modes
andforce_save_crystals
from the gameflow and allow builders to implement it in the same way as above. But probably best handled in its own PR and after review/testing of this one.Re #1847, this same approach can be used by builders to remove features available only with Lara's animation injection. The alternative to this is testing animation goals, which IMO would result in too many additional code checks.