aboutsummaryrefslogtreecommitdiff
path: root/settingtypes.txt
diff options
context:
space:
mode:
authorfluxionary <25628292+fluxionary@users.noreply.github.com>2022-02-13 06:54:41 -0800
committerGitHub <noreply@github.com>2022-02-13 15:54:41 +0100
commit2651262fa3134415f349f63840c89486fabd9063 (patch)
tree3fa7f2ac228e662b4e9bc8071acc2f0650c44e65 /settingtypes.txt
parent1a41379e1d7ae69347f0e6ee6a997234f7590793 (diff)
downloadmesecons_debug-2651262fa3134415f349f63840c89486fabd9063.tar.gz
mesecons_debug-2651262fa3134415f349f63840c89486fabd9063.zip
rework mesecons debug to be more flexible (#7)
* add proper settings (untested) * more constants -> settings * normalize whitespace between code files * refactor globalsteps in order to simplify logic * minor refactoring * rename file * use mod_storage for persistent data; optimize context initialization * refactoring (moving files around) * rewrite penalty * add settings; document; allow changing while game is running * add command to update settings * update init after splitting commands into files * fix bugs; add debugging tools; too much for one commit... * fix whitelist conversion * add adjustable blinky plant to timer overrides * add some more mesecons nodes with repeating timers * resolve luacheck warnings * tweak hud * Update documentation; parameterize more things; refactor some logic for readability
Diffstat (limited to 'settingtypes.txt')
-rw-r--r--settingtypes.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/settingtypes.txt b/settingtypes.txt
new file mode 100644
index 0000000..23cbbf5
--- /dev/null
+++ b/settingtypes.txt
@@ -0,0 +1,51 @@
+# in seconds
+mesecons_debug.hud_refresh_interval (hud refresh interval) int 1 1 60
+
+# max penalty in seconds
+mesecons_debug.max_penalty (maximum penalty) int 120 1 3600
+
+# everything above this threshold will disable the mesecons in that mapblock
+mesecons_debug.penalty_mapblock_disabled (threshold to disable mapblock) int 110 1 3600
+
+# time between /mesecons_clear_penalty commands, in seconds
+mesecons_debug.penalty_clear_cooldown (penalty clear command cooldown interval) int 120 1 3600
+
+# remove unused mapblock penalty data from memory after this many seconds
+mesecons_debug.gc_interval (garbage collection interval) float 61 1 3600
+
+# ratio between actual and expected duration of server steps, above which is considered laggy
+mesecons_debug.moderate_lag_ratio (low lag ratio) float 3 1 1000
+
+# ratio between actual and expected duration of server steps, above which is considered very laggy
+mesecons_debug.high_lag_ratio (high lag ratio) float 9 1 1000
+
+# percent of server step that is due solely to mesecons, above which is considered excessive
+mesecons_debug.high_load_threshold (high load threshold) float 0.33 0 1
+
+# number of server steps between penalty updates
+mesecons_debug.penalty_check_steps (steps between penalty updates) float 50 1 10000
+
+# scale of penalty during high load
+mesecons_debug.high_penalty_scale (high penalty scale) float 0.5 0.01 1
+
+# offset of penalty during high load
+mesecons_debug.high_penalty_offset (high penalty offset) float -0.5 -1 0
+
+# scale of penalty during medium load
+mesecons_debug.medium_penalty_scale (medium penalty scale) float 0.2 0.01 1
+
+# offset of penalty during medium load
+mesecons_debug.medium_penalty_offset (medium penalty offset) float -0.8 -1 0
+
+# scale of penalty during low load
+mesecons_debug.low_penalty_scale (low penalty scale) float 0.1 0.01 1
+
+# offset of penalty during low load
+mesecons_debug.low_penalty_offset (low penalty offset) float -1 -1 0
+
+# forces (1 / clamp) <= relative load <= clamp
+mesecons_debug.relative_load_clamp (clamp of relative load value) float 10 1 100
+
+# coefficient used in calculating an exponential moving average of values across penalty checks.
+# smaller values give more weight to history, larger values give more weight to the present.
+mesecons_debug.averaging_coefficient (averaging coefficient) float 0.2 0.01 1