Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upInitial implementation of variable difficulty #19398
Conversation
codemime
reviewed
Nov 21, 2016
| @@ -172,7 +174,8 @@ class options_manager : public JsonSerializer, public JsonDeserializer | |||
| void add( const std::string sNameIn, const std::string sPageIn, | |||
| const std::string sMenuTextIn, const std::string sTooltipIn, | |||
| const int iMinIn, int iMaxIn, int iDefaultIn, | |||
| copt_hide_t opt_hide = COPT_NO_HIDE ); | |||
| copt_hide_t opt_hide = COPT_NO_HIDE, | |||
| const std::string &format = "%i" ); | |||
This comment has been minimized.
This comment has been minimized.
codemime
Nov 21, 2016
Member
options_manager clearly needs refactoring: 9th parameter was added to two of six monstrous overloaded functions.
This comment has been minimized.
This comment has been minimized.
mugling
Nov 21, 2016
Author
Contributor
Could not possibly agree more. It's a horrendously bad design and should probably be replaced en-masse. I'm looking into this for a separate PR.
For now though a minimal number of lines gets rid of a worse evil (spurious mods) and as a bonus provides two meaningful configuration options.
mugling
added some commits
Nov 21, 2016
This comment has been minimized.
This comment has been minimized.
harald921
commented
Nov 22, 2016
Mugling! <3 |
This comment has been minimized.
This comment has been minimized.
|
Monster hp should never reach 0. Rounding would be preferable to truncation there. |
Coolthulhu
reviewed
Nov 23, 2016
| ssTemp.precision(precision); | ||
| ssTemp << std::fixed << fSet; | ||
| return ssTemp.str(); | ||
| return string_format( format, fSet ); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mugling
Nov 23, 2016
Author
Contributor
We don't have any options with more than two decimals precision
This comment has been minimized.
This comment has been minimized.
Good point, needs a lower bound |
This comment has been minimized.
This comment has been minimized.
Fixed |
mugling
added some commits
Nov 23, 2016
mugling
added
the
<Enhancement / Feature>
label
Nov 26, 2016
Coolthulhu
self-assigned this
Nov 28, 2016
This comment has been minimized.
This comment has been minimized.
|
Annoyance: the query keeps the '%' sign from the display. This means you can't just add '0' at the end of it, because "100%0" is just "100" and not "1000". |
Coolthulhu
merged commit d17ae92
into
CleverRaven:master
Nov 28, 2016
1 check passed
This comment has been minimized.
This comment has been minimized.
Can you rephrase? |
This comment has been minimized.
This comment has been minimized.
Expected:
Got:
|
This comment has been minimized.
This comment has been minimized.
|
I didn't know you could press |
This comment has been minimized.
This comment has been minimized.
|
It doesn't work in main menu for some reason. But in a loaded world it does and it much better than holding left/right. |
This comment has been minimized.
This comment has been minimized.
harald921
commented
Nov 29, 2016
|
Is it possible to update and change the variable HP without regenerating the world? Mostly curious whether or not I will be able to tweak the settings without regenerating all the time. |
This comment has been minimized.
This comment has been minimized.
|
Yes, I did it during testing. |
This comment has been minimized.
This comment has been minimized.
Where does the code for this live. I'm looking in |
This comment has been minimized.
This comment has been minimized.
|
Found a candidate in |
This comment has been minimized.
This comment has been minimized.
Nothing happens when I press |
This comment has been minimized.
This comment has been minimized.
|
@mugling could this be changed to only affect zombie monsters? I liked the balance of fast+tough zombies but doing the same for all monsters is a little overwhelming |
This comment has been minimized.
This comment has been minimized.
Not easily |
mugling commentedNov 21, 2016
The current slow/fast/tough zombie mods are a bad design:
ddacontent pack--check-modsThis PR exposes them as percentages on worldgen.
The next step is to support difficulty presets, 'Easy', 'Medium', 'Hard' etc.