Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class Generator_Settings
public float MaxPowerDraw = 500.00f;
public float MinPowerDraw = 50.00f;

public int MaxSiegeTime = 60;
public int MinSiegeTime = 15;
public int MaxSiegeTime = 60; // this refers to max time spent you are able to be in siege mode.
public int MinSiegeTime = 10; // this refers to min time spent sieging in the cooldown formula, any time spent in siege below this number will count as this value for the cooldown formula. thus the minimum cooldown time is this number * 2.
public int SiegePowerDraw = 900;
public float SiegeModeResistence = 0.9f;

Expand Down Expand Up @@ -75,79 +75,79 @@ void LoadConfig(MyIni iniParser)

void SaveConfig(MyIni iniParser)
{
iniParser.Set(IniSection, nameof(MaxModuleCount), MaxModuleCount);
iniParser.SetComment(IniSection, nameof(MaxModuleCount),
" \n[Maximum number of upgrade modules that can be attached to the Field Generator core.]\n" +
"[Each core has 4 mounting points by default.]\n" +
"[Default: 4]");
iniParser.Set(IniSection, nameof(PerModuleAmount), PerModuleAmount);
iniParser.SetComment(IniSection, nameof(PerModuleAmount),
" \n[Amount of resistance each attached upgrade module provides.]\n" +
"[Default: 10.0]");
iniParser.Set(IniSection, nameof(MaxPowerDraw), MaxPowerDraw);
iniParser.SetComment(IniSection, nameof(MaxPowerDraw),
" \n[The maximum power draw (in MW) when the Field Generator is at full power.]\n" +
"[Default: 500 MW]");
iniParser.Set(IniSection, nameof(MinPowerDraw), MinPowerDraw);
iniParser.SetComment(IniSection, nameof(MinPowerDraw),
" \n[Baseline power draw (in MW) at minimum field power.]\n" +
"[Default: 50 MW]");
iniParser.Set(IniSection, nameof(MaxSiegeTime), MaxSiegeTime);
iniParser.SetComment(IniSection, nameof(MaxSiegeTime),
" \n[Maximum duration (in seconds) the Field Generator can remain in Siege mode.]\n" +
"[Default: 60s]\n");
iniParser.Set(IniSection, nameof(SiegePowerDraw), SiegePowerDraw);
iniParser.SetComment(IniSection, nameof(SiegePowerDraw),
" \n[Power draw (in MW) while Siege mode is active.]\n" +
"[Overrides normal scaled power draw.]\n" +
"[Default: 900 MW]");
iniParser.Set(IniSection, nameof(SiegeModeResistence), SiegeModeResistence);
iniParser.SetComment(IniSection, nameof(SiegeModeResistence),
" \n[Amount of damage resistance provided by Siege mode (0.0 to 1.0).]\n" +
"[Example: 0.9 means 90% damage reduction from normal.]\n" +
"[Default: 0.9]");
iniParser.Set(IniSection, nameof(SimplifiedMode), SimplifiedMode);
iniParser.SetComment(IniSection, nameof(SimplifiedMode),
" \n[Whether to disable (true) or enable (false) the advanced stability system.]\n" +
"[Default: true]");
iniParser.Set(IniSection, nameof(DamageEventThreshold), DamageEventThreshold);
iniParser.SetComment(IniSection, nameof(DamageEventThreshold),
" \n[Number of damage events (within ResetInterval) needed to trigger stability reduction.]\n" +
"[Default: 6]");
iniParser.Set(IniSection, nameof(ResetInterval), ResetInterval);
iniParser.SetComment(IniSection, nameof(ResetInterval),
" \n[Time interval (in seconds) between damage counter resets.]\n" +
"[Default: 3]");
iniParser.Set(IniSection, nameof(MinBlockCount), MinBlockCount);
iniParser.SetComment(IniSection, nameof(MinBlockCount),
" \n[Minimum grid block count used in the size-based stability calculation.]\n" +
"[Default: 2500]");
iniParser.Set(IniSection, nameof(MaxBlockCount), MaxBlockCount);
iniParser.SetComment(IniSection, nameof(MaxBlockCount),
" \n[Maximum grid block count used in the size-based stability calculation.]\n" +
"[Default: 35000]");
iniParser.Set(IniSection, nameof(SizeModifierMin), SizeModifierMin);
iniParser.SetComment(IniSection, nameof(SizeModifierMin),
" \n[The lower bound of the size modifier.]\n" +
"[Size Modifier can reduce or increase stability change based on the grid size. This Min is the Increase at Min Grid Size]\n" +
"[Default: 1.2]");
iniParser.Set(IniSection, nameof(SizeModifierMax), SizeModifierMax);
iniParser.SetComment(IniSection, nameof(SizeModifierMax),
" \n[The upper bound of the size modifier.]\n" +
"[Size Modifier can reduce or increase stability change based on the grid size. This Max is the Reduction at Max Grid Size]\n" +
iniParser.Set(IniSection, nameof(MaxModuleCount), MaxModuleCount);
iniParser.SetComment(IniSection, nameof(MaxModuleCount),
" \n[Maximum number of upgrade modules that can be attached to the Field Generator core.]\n" +
"[Each core has 4 mounting points by default.]\n" +
"[Default: 4]");

iniParser.Set(IniSection, nameof(PerModuleAmount), PerModuleAmount);
iniParser.SetComment(IniSection, nameof(PerModuleAmount),
" \n[Amount of resistance each attached upgrade module provides.]\n" +
"[Default: 10.0]");

iniParser.Set(IniSection, nameof(MaxPowerDraw), MaxPowerDraw);
iniParser.SetComment(IniSection, nameof(MaxPowerDraw),
" \n[The maximum power draw (in MW) when the Field Generator is at full power.]\n" +
"[Default: 500 MW]");

iniParser.Set(IniSection, nameof(MinPowerDraw), MinPowerDraw);
iniParser.SetComment(IniSection, nameof(MinPowerDraw),
" \n[Baseline power draw (in MW) at minimum field power.]\n" +
"[Default: 50 MW]");

iniParser.Set(IniSection, nameof(MaxSiegeTime), MaxSiegeTime);
iniParser.SetComment(IniSection, nameof(MaxSiegeTime),
" \n[Maximum duration (in seconds) the Field Generator can remain in Siege mode.]\n" +
"[Default: 60s]\n");

iniParser.Set(IniSection, nameof(SiegePowerDraw), SiegePowerDraw);
iniParser.SetComment(IniSection, nameof(SiegePowerDraw),
" \n[Power draw (in MW) while Siege mode is active.]\n" +
"[Overrides normal scaled power draw.]\n" +
"[Default: 900 MW]");

iniParser.Set(IniSection, nameof(SiegeModeResistence), SiegeModeResistence);
iniParser.SetComment(IniSection, nameof(SiegeModeResistence),
" \n[Amount of damage resistance provided by Siege mode (0.0 to 1.0).]\n" +
"[Example: 0.9 means 90% damage reduction from normal.]\n" +
"[Default: 0.9]");

iniParser.Set(IniSection, nameof(SimplifiedMode), SimplifiedMode);
iniParser.SetComment(IniSection, nameof(SimplifiedMode),
" \n[Whether to disable (true) or enable (false) the advanced stability system.]\n" +
"[Default: true]");

iniParser.Set(IniSection, nameof(DamageEventThreshold), DamageEventThreshold);
iniParser.SetComment(IniSection, nameof(DamageEventThreshold),
" \n[Number of damage events (within ResetInterval) needed to trigger stability reduction.]\n" +
"[Default: 6]");

iniParser.Set(IniSection, nameof(ResetInterval), ResetInterval);
iniParser.SetComment(IniSection, nameof(ResetInterval),
" \n[Time interval (in seconds) between damage counter resets.]\n" +
"[Default: 3]");

iniParser.Set(IniSection, nameof(MinBlockCount), MinBlockCount);
iniParser.SetComment(IniSection, nameof(MinBlockCount),
" \n[Minimum grid block count used in the size-based stability calculation.]\n" +
"[Default: 2500]");

iniParser.Set(IniSection, nameof(MaxBlockCount), MaxBlockCount);
iniParser.SetComment(IniSection, nameof(MaxBlockCount),
" \n[Maximum grid block count used in the size-based stability calculation.]\n" +
"[Default: 35000]");

iniParser.Set(IniSection, nameof(SizeModifierMin), SizeModifierMin);
iniParser.SetComment(IniSection, nameof(SizeModifierMin),
" \n[The lower bound of the size modifier.]\n" +
"[Size Modifier can reduce or increase stability change based on the grid size. This Min is the Increase at Min Grid Size]\n" +
"[Default: 1.2]");

iniParser.Set(IniSection, nameof(SizeModifierMax), SizeModifierMax);
iniParser.SetComment(IniSection, nameof(SizeModifierMax),
" \n[The upper bound of the size modifier.]\n" +
"[Size Modifier can reduce or increase stability change based on the grid size. This Max is the Reduction at Max Grid Size]\n" +
"[Default: 0.8]");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ private void EndSiegeMode()

SiegeBlockEnabler(Block.CubeGrid.GetFatBlocks<IMyFunctionalBlock>(), true);

SiegeCooldownTime.Value = (SiegeElapsedTime.Value > Config.MinSiegeTime) ? (SiegeElapsedTime.Value * 2) : Config.MinSiegeTime;
SiegeCooldownTime.Value = 2 * (SiegeElapsedTime.Value > Config.MinSiegeTime ? SiegeElapsedTime.Value : Config.MinSiegeTime);
SiegeElapsedTime.Value = 0;
SiegeCooldownActive.Value = true;
}
Expand Down