-
Notifications
You must be signed in to change notification settings - Fork 993
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
Create a gamerules file that allows for the easy manipulation of various currently-hardcoded values #5556
Comments
|
I definitely like the sound of this and how it opens up the game to customization. I definitely support min/max zoom levels, depreciation constants, ramscoop/solar panel strength, and debris lifespan. I'm sure there are others if/when I look for them. |
Any time you see a hardcoded variable anywhere, that is an opportunity to toss it into a configurable file for fun and profit. Should projectile effects like ion and slowing decay at 1% per frame? What about 0.0001%? Or 10%? Though, honestly, can't think of any others at the moment. Maybe the heat inefficiency curve? I had proposed a simplified version of the formula which used inverse tangent for a simpler inverse f(x), I think. The heat inefficiency curve could be put onto a configuration file. |
"Gamerules" as defined here would only involve changing constants, not entire equations. |
I would love to see this implemented. It'd be fantastic for those of us who are new to the game and would want some more leniency in addition to those who want to go full hardcore mode and have a challenge. |
Oh, yes! This sounds like it could lead to me being able to play ES and finding it acceptably challenging at the same time as steam newbies, without having to maintain my forked code independently.
True, but, depending on where you put those constants, they could have a profound effect on an equation. Especially if that constant is in an exponent, or on one term of a large equation, rather than simply being applied to the result. |
Following on from Amazinite's comment, could it be GameConstants? That would leave GameRules free for a more general rules engine that defines equations and appropriate contexts |
|
My impression is that most of the options mentioned here would be best placed as a keyword in the data-files. Then you could just get a plugin to override the setting if you want something non-standard. I also feel that you don't really need a separate class to store those, most values already have some nice location to store them. An issue that I see with removed mechanics is that re-adding them also requires maintenance and testing for those features. We want them to work properly if we allow players to activate them. |
The gamerules file was added with #7740. If there are any specific gamerules that people would like, they should be opened as separate issues or PRs. |
Is your feature request related to a problem? Please describe.
There are currently a number of hardcoded values that it might be interested to be able to fiddle with, such as as the values that dictate depreciation. There are also mechanics that have been removed in the past that some players might like to have in their game, while others might not. Death benefits comes to mind as one such removed mechanic. Ideally, instead of completely removing such mechanics, it might be better to have them be able to be toggled on and off.
Related Issue Links
#2200 attempted to create a file similar to this.
#5554 includes an example of the type of values that one might want to change in a data file.
#1386 Having customizable gamerules would allow for creating different difficulty levels.
#5512 Such gamerules would ideally be able to be modified by start conditions so that changing difficulties doesn't require going into the data files to switch things around.
Describe the solution you'd like
Create a class similar to preferences named gamerules. Gamerules would contain a
map<string, double>
where the string is the name of the gamerule and the double is the value. Gamerules would be statically accessed, as preferences is now, whenever it is needed. Using a double for the value means that we can have gamerules that do require doubles, gamerules that require ints (cast the double to and int), and gamerules that require bools (take 0 as false and anything else as true).What this would not include is the customization of strings that are currently hardcoded, such as outfit and ship categories.
Describe alternatives you've considered
Do what #5555 does and make use of the interface class.
Additional context
Potential gamerules:
Min/max map zoom levels. (Feature Request: Allow Min and Max Map Zoom Levels to be Defined in interfaces.txt #5554)Handled in the interface.As with my example in #5554, I imagine all gamerules would have comments above them in the data file to describe what they do. The gamerules file would be stored alongside the preferences file, but could perhaps also be altered depending on which save file the player chooses if different starts are able to modify gamerules.
The text was updated successfully, but these errors were encountered: