Page 1 of 1

[Request] Shadows of Doubt

Posted: Tue Apr 25, 2023 10:53 pm
by Lord Blade


God Mode
Edit/Infinite Coins
Edit/Infinite Lock Picks
Invisibility/Stealth Mode
Freeze Time

Re: [Request] Shadows of Doubt

Posted: Wed Apr 26, 2023 1:59 am
by Lord Blade
Reusable codebreakers would be nice too. If possible.

Re: [Request] Shadows of Doubt

Posted: Wed Apr 26, 2023 3:20 am
by NomuNomu
Here's what I have at the moment. There are other things to toggle in the Game class like invincibility and pausing AI, but this covers the major things. It should be possible to spawn codebreakers on the floor or patch it to allow unlimited use if you reverse it further.

I don't like to drop dlls on people, so I'm just putting the entire source.

Code: Select all

using Il2Cpp;
using MelonLoader;
using ShadowsMod;
using UnityEngine;

[assembly: MelonInfo(typeof(ModClass), "Shadows of Doubt Mod", "1.0.0", "")]
[assembly: MelonGame("ColePowered Games", "Shadows of Doubt")]

namespace ShadowsMod
{
    public class ModClass : MelonMod
    {

        public static ModClass instance;
        public override void OnInitializeMelon()
        {
            instance = this;
            instance.LoggerInstance.Msg("Shadows of Doubt mod init");
        }

        public override void OnLateUpdate()
        {
            Game gameInst = Game._instance;
            if (gameInst == null)
            {
                return;
            }
            if (Input.GetKeyDown(KeyCode.F7))
            {
                bool status = !gameInst.devMode;
                gameInst.devMode = status;
                instance.LoggerInstance.Msg($"Devmode: {status}");
            }

            if (Input.GetKeyDown(KeyCode.F8))
            {
                gameInst.Give100Lockpicks();
            }
            if (Input.GetKeyDown(KeyCode.F9))
            {
                gameInst.GiveAllUpgrades();
            }
            if (Input.GetKeyDown(KeyCode.F10))
            {
                bool status = !gameInst.invisiblePlayer;
                gameInst.invisiblePlayer = status;
                gameInst.inaudiblePlayer = status;
                instance.LoggerInstance.Msg($"Player invisible: {status}");
            }
        }
    }
}

Re: [Request] Shadows of Doubt

Posted: Wed Apr 26, 2023 12:19 pm
by Aranaktu