Boss HP scaling command implementation - #3
Closed
Strife (strife-mod) wants to merge 2 commits into
Closed
Conversation
Adding /bosshp command to allow players changing coop difficulty.
Contributor
|
Implemented on the SDK 0.3.0 branch on the server side. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementation of /bosshp command to allow players changing coop difficulty by adding custom boss HP scaling formula:
targetScaling = scaling + scaling * (areaPlayers - 1)Original scaling formula is retained and is used by default if /bosshp command has not been used:
targetScaling = 1 + scaling * (areaPlayers - 1)Constant
1.5fhas been replaced byscalingvariable used by both formulas.Two variables has been added to
Configclass to define scaling modifier and indicate if custom scaling is active. If these variables would be exposed for server owner in .txt or .json file, it could be used to change default boss HP scaling to their preferences.Method
CustomScaling(int scale)has percentage of boss HP as parameter and shows messages if Player is not MasterClient or invalid parameter has been used in command.Example
Original formula:
targetScaling = 1 + scaling * (areaPlayers - 1)Custom scaling formula:
targetScaling = scaling + scaling * (areaPlayers - 1)Problems & improvements
/bosshpcommand every time they join server, it will be reset to default scaling when session ends/bosshpcommand it's not possible to change scaling formula to original scaling.Screenshot