Skip to content

Added improved hydra scaling#795

Merged
SimonFlapse merged 14 commits intoRefactorio:developfrom
SimonFlapse:hydra-scaling
Mar 3, 2019
Merged

Added improved hydra scaling#795
SimonFlapse merged 14 commits intoRefactorio:developfrom
SimonFlapse:hydra-scaling

Conversation

@SimonFlapse
Copy link
Member

@SimonFlapse SimonFlapse commented Feb 23, 2019

Change log
Added min, max and trigger to config
Added online_player_scale to config

Made hail hydra chances a variable of:

  • number of online players (toggle)
  • evolution based on a custom formula that has a slow scaling until evolution 0.8

Current config is in need of balancing, what is shown is just an example to illustrate the changes.

What is this?
These changes would make hail hydra better suit all kinds of maps with increased customization.

What is new?
We can now customize:

  • Hydras minimum chance
  • Hydras maximum chance
  • Toggle whether player count should affect these chances
  • Amount of players needed for configured chances to be true.
    • Above this number further increase the chances
    • Below this number decrease the chances
    • Each player increases or decreases the chance with 1%

What have been removed
Evolution_scale didn't do much towards customizing the spawn chances. The equivalent in these changes are:
{min = 0.2, max = min + evolution_scale}

Technical changes
The formula for calculating the chance is:
(0.00003*(E*100)^3 + 0.004 * (E*100)^2 + 0.3 * (E*100))*0.01 where E = force.evolution_factor

Approx values shown in evolution = (percentage of max):
| 0.25 evolution = 10% | 0.50 evolution = 29% | 0.60 evolution = 45% | 0.75 evolution = 58% |
| 0.80 evolution = 65% | 0.90 evolution = 81% | 1.00 evolution = 100% |

Yet to do

  • Create public functions to change these settings runtime
  • Implement compatibility with the old config using the conversion in What have been removed
  • Balance the default configuration
  • Ensure current maps aren't broken from these changes
  • Set max to -1 in config if it's unused
  • Make overriding the online_player_scale for a single hydra spawn possible

Added min, max and trigger to config
Added online_player_scale to config

Made hail hydra chances a variable of: - number of online players (toggleable)
- evolution based on a custom formula that has a slow scaling until evolution 0.8
@SimonFlapse SimonFlapse added Discussion Discussion is requested before proceeding WIP labels Feb 23, 2019
@linaori
Copy link
Contributor

linaori commented Feb 23, 2019

What's max = 0?

@SimonFlapse
Copy link
Member Author

What's max = 0?

It's if you don't want the chance to change. I just didn't want to remove max = ? for clarity
max <= min <=> max = min

@linaori
Copy link
Contributor

linaori commented Feb 23, 2019

That sounds odd, perhaps -1 would be a good alternative?

@SimonFlapse
Copy link
Member Author

We could do -1 in the default settings, but I might actually set a maximum setting.
It doesn't matter if it's 0, -1 or anything less than min.

@linaori
Copy link
Contributor

linaori commented Feb 23, 2019

It doesn't matter if it's 0, -1 or anything less than min.

It's the way it's treated, when I see max being lower than min, my brain will wtf for a moment, where as -1 indicates that it is disabled (indexof being a prime example). Additionally could also use "false" instead to turn it off, or a different key.

@mheguy
Copy link
Member

mheguy commented Feb 23, 2019

As this is still WIP, going to tag this as post-0.17

@mheguy mheguy added the waiting for june/ 0.17 stable waiting until everyone's time frees up a bit label Feb 23, 2019
@mheguy mheguy removed the waiting for june/ 0.17 stable waiting until everyone's time frees up a bit label Feb 28, 2019
Added min, max and trigger to config
Added online_player_scale to config

Made hail hydra chances a variable of: - number of online players (toggleable)
- evolution based on a custom formula that has a slow scaling until evolution 0.8
Added conversion from old config to new
# Conflicts:
#	config.lua
#	map_gen/shared/hail_hydra.lua
@SimonFlapse
Copy link
Member Author

What a nice surprise. No RB for me...

@SimonFlapse SimonFlapse closed this Mar 1, 2019
@SimonFlapse SimonFlapse reopened this Mar 1, 2019
@SimonFlapse SimonFlapse mentioned this pull request Mar 2, 2019
17 tasks
@SimonFlapse
Copy link
Member Author

Has been used in Diggy launched 2019-03-01 and Quadrants 2019-03-02

@SimonFlapse SimonFlapse added Feature Enhances gameplay and removed Discussion Discussion is requested before proceeding WIP labels Mar 2, 2019
@SimonFlapse SimonFlapse merged commit bad47f3 into Refactorio:develop Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Enhances gameplay

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants