Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1c6d2aa
fixed senbatsu infix function; it now uses the root of triangular num…
ExSlam Jan 20, 2026
cdde5a5
target both opcodes call and callvirt in GetRevenue
ExSlam Jan 20, 2026
437795a
added fix: senbatsu stats calculation doesn't use just cute and check…
ExSlam Jan 20, 2026
bb68e20
refactored out all magic numbers
ExSlam Jan 20, 2026
4a7c836
fix pie chart, hype clamps to 200% max correctly, breakups correctly …
ExSlam Jan 20, 2026
51eddd2
fix: improve fan pie rendering to accurately reflect teen/YA/adult ra…
ExSlam Jan 20, 2026
2ef9d10
fix: update concert revenue calculation to include FUJI ticket bonus …
ExSlam Jan 20, 2026
a5a867e
use proper match.Set rather than SetOpcodeAndOperand
ExSlam Jan 20, 2026
613aee9
fix: harden fast-forward and audition flows across mods
ExSlam Feb 24, 2026
98b8153
fix: ensure mod settings button installation and handle null data in …
ExSlam Mar 5, 2026
112e2e8
fix: add null guards in SaveManager.LoadData to prevent crashes on mi…
ExSlam Mar 5, 2026
8eebfbb
Change the handling of age range and audition popup
ExSlam Aug 9, 2026
7cecd5b
Made graduation blocking more robust, and compatible with other Tel Mods
ExSlam Aug 15, 2026
2c8fa52
Fixed math issues and bugs with Going Viral
ExSlam Aug 15, 2026
517e466
Adjusted some stat limits
ExSlam Aug 15, 2026
055537e
Fixed many issues and some possible crash bugs
ExSlam Aug 15, 2026
3c045ed
Fixed maths, added compatibility with Never Graduate mod so that Idol…
ExSlam Aug 15, 2026
0e3890d
Added a changelog.md
ExSlam Aug 15, 2026
947f289
Made correctness and math fixes
ExSlam Aug 15, 2026
c82b61e
Fixed op codes and run order to properly apply multipliers
ExSlam Aug 15, 2026
ff9dc33
Fixed Audition idol age exceeding set target limit by one year, made …
ExSlam Aug 15, 2026
210339f
Updated changelog
ExSlam Aug 15, 2026
2cbb7e3
Fixed an incorrect reference to properly use Harmony for accessing th…
ExSlam Aug 15, 2026
56fc6d6
included cafeFans in fan change, excluded internet shows
ExSlam Aug 15, 2026
19f442e
Fixed a clamp value for tv medium trend to 15% instead of 100% clap (…
ExSlam Aug 15, 2026
cd89321
Made TV fame progression more balanced.
ExSlam Aug 15, 2026
d9dd4a0
Fixed ModMenus button injection to detect when the setting tab is sel…
ExSlam Aug 15, 2026
0969116
Updated Changelog to use clearer formatting and full history of chang…
ExSlam Aug 15, 2026
a877b70
Added fix to remove duplicate policy definitions
ExSlam Aug 15, 2026
022a443
Updated Harmony Checker to wait for the right timing before displayin…
ExSlam Aug 16, 2026
a2ce5b4
Updated changelog
ExSlam Aug 16, 2026
3d800f6
Mod Settings consistently anchors itself to the Settings button
ExSlam Aug 16, 2026
a95bd13
Updated changelog
ExSlam Aug 16, 2026
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
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<ModOutputDirRelease>$(APPDATA)\..\LocalLow\Glitch Pitch\Idol Manager\Mods</ModOutputDirRelease>
<ModOutputDirDebug>$(APPDATA)\..\LocalLow\Glitch Pitch\Idol Manager\Mods</ModOutputDirDebug>
<!--<ModOutputDirDebug>$(SolutionDir)\..\Mods</ModOutputDirDebug>-->
<dllDir>$(SolutionDir)\..\dll</dllDir>
<dllDir Condition="'$(SolutionDir)' != ''">$(SolutionDir)\..\dll</dllDir>
<dllDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)..\dll</dllDir>

<!--Other assembly info-->
<Description>Idol Manager Mod</Description>
Expand Down
4 changes: 2 additions & 2 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<configuration>
<packageSources>
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
<add key="nuget.org" value="http://api.nuget.org/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
</configuration>
259 changes: 259 additions & 0 deletions changelog.md

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions mods/Extended SSK/Extended SSK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static int Infix(int i)
[HarmonyPatch("RecalcFameBonus")]
public static class SSK_RecalcFameBonusPatch
{
static Func<int> GetFameBaseValDelegate;
static readonly MethodInfo GetFameBaseValInfo = AccessTools.Method(typeof(SEvent_SSK._SSK), "GetFameBaseVal");

/// <summary>
/// Postfix method to recalculate fame bonuses after the original method execution.
Expand All @@ -90,13 +90,8 @@ public static void Postfix(ref SEvent_SSK._SSK __instance)
int limit = int.Parse(variables.Get(varID) ?? defaultRankingsStr);
List<int> list = __instance.FameBonus;

if(GetFameBaseValDelegate == null)
{
MethodInfo GetFameBaseValInfo = AccessTools.Method(typeof(SEvent_SSK._SSK), "GetFameBaseVal");
GetFameBaseValDelegate = AccessTools.MethodDelegate<Func<int>>(GetFameBaseValInfo, __instance);
}

int num = Mathf.RoundToInt(GetFameBaseValDelegate() * 0.056f);
int fameBaseVal = (int)GetFameBaseValInfo.Invoke(__instance, null);
int num = Mathf.RoundToInt(fameBaseVal * 0.056f);
for (int i = 10; i < Math.Min(girlCount, limit); i++)
{
list.Add(num);
Expand Down
7 changes: 6 additions & 1 deletion mods/Fan Attrition/Fan Attrition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static int Infix(Shows._show __this, int num6)
{
if (__this.mc != null)
{
float mcCoeff = Mathf.Max(1f, 1f + __this.mc.fame * __this.mc.fame / 10);
float mcCoeff = Mathf.Max(1f, 1f + __this.mc.fame * __this.mc.fame / 10f);
if (__this.mc.fame >= 10)
{
mcCoeff += MC_MAX_FAME_BONUS;
Expand Down Expand Up @@ -123,6 +123,11 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
/// <returns>The modified fan count.</returns>
public static float Infix(Shows._show __this, float num2)
{
if (__this.medium != null && __this.medium.media_type == Shows._param._media_type.internet)
{
return num2;
}

if (staticVars.IsHard())
{
num2 *= 1f - __this.GetFatigue() * __this.GetFatigue() / SHOW_FATIGUE_COEFF_HARD;
Expand Down
2 changes: 1 addition & 1 deletion mods/Fan Attrition/FanTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public class tooltip_fans_RenderFanChange
public static void Postfix(tooltip_fans __instance)
{
long baseChange = resources.FansChange * 7;
long totalChange = adFans + dramaFans + netFans + tvFans + radioFans + baseChange;
long totalChange = adFans + dramaFans + netFans + tvFans + radioFans + cafeFans + baseChange;

string changeStr = ExtensionMethods.formatNumber(totalChange, false, false) + " " + Language.Data["PER_WEEK"];
if (totalChange > 0)
Expand Down
304 changes: 238 additions & 66 deletions mods/FastForward/FastForward.cs
Original file line number Diff line number Diff line change
@@ -1,66 +1,238 @@
using HarmonyLib;
using UnityEngine;
using TMPro;
using static FastForward.FastForward;

namespace FastForward
{
public class FastForward
{
public const string VARID = "FastForward_Multiplier";
public const string DEFAULT_VAR = "5";
}

/// <summary>
/// Patch class for the TimeControlButton's OnClick method to implement faster time acceleration.
/// </summary>
[HarmonyPatch(typeof(TimeControlButton), "OnClick")]
public class TimeControlButton_OnClick
{
/// <summary>
/// Prefix method to enhance the fast forward functionality when clicking the fast forward button twice.
/// </summary>
/// <param name="__instance">The instance of the TimeControlButton being clicked.</param>
/// <returns>Boolean indicating whether the original method should be executed.</returns>
public static bool Prefix(TimeControlButton __instance)
{
double mult = double.Parse(variables.Get(VARID) ?? DEFAULT_VAR);
double speed = 200 * mult;

if (__instance.Type != mainScript._time_state.fast || staticVars.timeState != mainScript._time_state.fast || staticVars.dateTimeAddMinutesPerSecond == speed)
return true;

staticVars.dateTimeAddMinutesPerSecond = speed;
Camera.main.GetComponent<mainScript>().TimeControls_Fast.GetComponent<TextMeshProUGUI>().color = mainScript.gold32;

return false;
}

}

/// <summary>
/// Patch class for the Controls' Update method to implement hotkey-based time acceleration.
/// </summary>
[HarmonyPatch(typeof(Controls), "Update")]
public class Controls_Update
{
/// <summary>
/// Postfix method to add hotkey functionality for speeding up time when pressing the '4' key.
/// </summary>
public static void Postfix()
{
if (mainScript.IsBlockingHotkeys())
return;

if (Input.GetKeyDown(KeyCode.Alpha4))
{
double mult = double.Parse(variables.Get(VARID) ?? DEFAULT_VAR);
double speed = 200 * mult;
Camera.main.GetComponent<mainScript>().Time_SetState(mainScript._time_state.fast);
staticVars.dateTimeAddMinutesPerSecond = speed;

Camera.main.GetComponent<mainScript>().TimeControls_Fast.GetComponent<TextMeshProUGUI>().color = mainScript.gold32;
}
}
}
}
using HarmonyLib;
using UnityEngine;
using TMPro;
using System;
using System.Globalization;
using static FastForward.FastForward;

namespace FastForward
{
public class FastForward
{
public const string VARID = "FastForward_Multiplier";
public const string DEFAULT_VAR = "5";
public const double BASE_FAST_SPEED = 200d;
public const double MAX_MULTIPLIER = 50d;
public const double EPSILON = 0.001d;

// Stores the user's pre-popup super-fast speed so it can be restored after forced popup pause.
private static double pendingAuditionRestoreSpeed = 0d;

internal static double GetConfiguredMultiplier()
{
string raw = variables.Get(VARID);
if (string.IsNullOrWhiteSpace(raw))
{
raw = DEFAULT_VAR;
}

if (!double.TryParse(raw, NumberStyles.Float, CultureInfo.InvariantCulture, out double multiplier))
{
multiplier = 5d;
}

if (double.IsNaN(multiplier) || double.IsInfinity(multiplier))
{
multiplier = 5d;
}

if (multiplier < 1d)
{
multiplier = 1d;
}
else if (multiplier > MAX_MULTIPLIER)
{
multiplier = MAX_MULTIPLIER;
}

return multiplier;
}

internal static double GetConfiguredSpeed()
{
return BASE_FAST_SPEED * GetConfiguredMultiplier();
}

internal static void ApplySuperFast(mainScript main)
{
if (main == null)
{
return;
}

// Use vanilla state transition first so all game-side effects still run as expected.
main.Time_SetState(mainScript._time_state.fast);
staticVars.dateTimeAddMinutesPerSecond = GetConfiguredSpeed();
SetFastButtonColor(mainScript.gold32);
}

internal static void SetFastButtonColor(Color32 color)
{
if (Camera.main == null)
{
return;
}

mainScript main = Camera.main.GetComponent<mainScript>();
if (main == null || main.TimeControls_Fast == null)
{
return;
}

TextMeshProUGUI fastLabel = main.TimeControls_Fast.GetComponent<TextMeshProUGUI>();
if (fastLabel != null)
{
fastLabel.color = color;
}
}

internal static void SuspendSuperFastForAuditionPopup()
{
// Only suspend custom speeds; vanilla fast (200) does not need this safety fallback.
if (staticVars.timeState != mainScript._time_state.fast || staticVars.dateTimeAddMinutesPerSecond <= BASE_FAST_SPEED + EPSILON)
{
return;
}

if (pendingAuditionRestoreSpeed <= BASE_FAST_SPEED + EPSILON)
{
pendingAuditionRestoreSpeed = staticVars.dateTimeAddMinutesPerSecond;
}

// Drop to vanilla fast while popup initialization runs to avoid race conditions in recruitment UI.
staticVars.dateTimeAddMinutesPerSecond = BASE_FAST_SPEED;
SetFastButtonColor(mainScript.green32);
}

internal static void TryRestoreSuperFastAfterResume(mainScript main)
{
if (pendingAuditionRestoreSpeed <= BASE_FAST_SPEED + EPSILON)
{
return;
}

// Respect user state changes made while popup flow was active.
if (staticVars.timeState != mainScript._time_state.fast)
{
pendingAuditionRestoreSpeed = 0d;
return;
}

// Only restore when popup system resumes vanilla fast speed.
if (staticVars.dateTimeAddMinutesPerSecond > BASE_FAST_SPEED + EPSILON)
{
pendingAuditionRestoreSpeed = 0d;
return;
}

staticVars.dateTimeAddMinutesPerSecond = pendingAuditionRestoreSpeed;
pendingAuditionRestoreSpeed = 0d;
SetFastButtonColor(mainScript.gold32);
}

internal static void ClearPendingRestoreIfNotFast(mainScript._time_state state)
{
if (state != mainScript._time_state.fast)
{
pendingAuditionRestoreSpeed = 0d;
}
}
}

/// <summary>
/// Patch class for the TimeControlButton's OnClick method to implement faster time acceleration.
/// </summary>
[HarmonyPatch(typeof(TimeControlButton), "OnClick")]
public class TimeControlButton_OnClick
{
/// <summary>
/// Prefix method to enhance the fast forward functionality when clicking the fast forward button twice.
/// </summary>
/// <param name="__instance">The instance of the TimeControlButton being clicked.</param>
/// <returns>Boolean indicating whether the original method should be executed.</returns>
public static bool Prefix(TimeControlButton __instance)
{
double speed = GetConfiguredSpeed();

if (__instance.Type != mainScript._time_state.fast || staticVars.timeState != mainScript._time_state.fast || Math.Abs(staticVars.dateTimeAddMinutesPerSecond - speed) <= EPSILON)
return true;

ApplySuperFast(Camera.main != null ? Camera.main.GetComponent<mainScript>() : null);
return false;
}
}

/// <summary>
/// Patch class for the Controls' Update method to implement hotkey-based time acceleration.
/// </summary>
[HarmonyPatch(typeof(Controls), "Update")]
public class Controls_Update
{
/// <summary>
/// Postfix method to add hotkey functionality for speeding up time when pressing the '4' key.
/// </summary>
public static void Postfix()
{
if (mainScript.IsBlockingHotkeys())
return;

if (Input.GetKeyDown(KeyCode.Alpha4))
{
ApplySuperFast(Camera.main != null ? Camera.main.GetComponent<mainScript>() : null);
}
}
}

/// <summary>
/// Ensures custom super-fast speed does not interfere with audition popup initialization.
/// </summary>
[HarmonyPatch(typeof(PopupManager), "Open")]
public class PopupManager_Open
{
/// <summary>
/// Prefix method to temporarily downgrade custom super-fast speed when opening the audition popup.
/// </summary>
/// <param name="type">Popup type being opened.</param>
public static void Prefix(PopupManager._type type)
{
if (type != PopupManager._type.audition)
{
return;
}

SuspendSuperFastForAuditionPopup();
}
}

/// <summary>
/// Restores previously suspended super-fast speed after popup-driven forced pause is released.
/// </summary>
[HarmonyPatch(typeof(mainScript), "Time_Resume")]
public class mainScript_Time_Resume
{
/// <summary>
/// Postfix method to restore the user's pre-popup custom speed.
/// </summary>
/// <param name="__instance">mainScript instance.</param>
public static void Postfix(mainScript __instance)
{
TryRestoreSuperFastAfterResume(__instance);
}
}

/// <summary>
/// Clears pending speed restoration when user manually switches away from fast mode.
/// </summary>
[HarmonyPatch(typeof(mainScript), "Time_SetState")]
public class mainScript_Time_SetState
{
/// <summary>
/// Postfix method to cancel restore state if current mode is no longer fast.
/// </summary>
/// <param name="state">Requested time state.</param>
public static void Postfix(mainScript._time_state state)
{
ClearPendingRestoreIfNotFast(state);
}
}
}
2 changes: 1 addition & 1 deletion mods/FastForward/FastForward.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<HarmonyID>com.tel.fastforward</HarmonyID>
<ModDescription>Press '4' or click the fast-forward button twice to go faster!</ModDescription>
<Authors>Tel</Authors>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
<Tags>["gameplay"]</Tags>

<!--For the JSON Load Order mod (leave it at 0 if not using)-->
Expand Down
Loading