9_nine-EnableConsoleMine icon

EnableConsoleMine

Simply enable console without any other alteration

By 9_nine
Last updated 4 hours ago
Total downloads 10
Total rating 0 
Categories Server-side Client-side
Dependency string 9_nine-EnableConsoleMine-1.0.0
Dependants 0 other packages depend on this package

README

Introduction

tried 3 different mods to enable the console, not a single one worked, decompiled and there is some trash code instead of just enabling the **** console, so i created this one adn worked!

Developed by aedenthorn

Description

just set consoel to true

Installation

  • Copy the EnableConsoleMine.dll to your /Valheim/BepInEx/plugins directory

If you want to complain or ask for help, don't, download decompile and fix it yourself

Source Code

using BepInEx.Logging; using BepInEx; using HarmonyLib; using UnityEngine;

namespace EnableConsoleMine { [BepInPlugin("EnableConsoleMine", "(mod)EnableConsoleMine", "1.0.0.0")] public class EnableConsoleMine : BaseUnityPlugin { static ManualLogSource logger;

    public void Awake()
    {
        Logger.LogInfo("Plugin EnableConsoleMine is enabled.");
        logger = Logger;

        Harmony.CreateAndPatchAll(typeof(EnableConsoleMine));
    }

    [HarmonyPrefix]
    [HarmonyPatch(typeof(FejdStartup), "Awake")]
    static void Prefix_FejdStartup_Awake()
    {
        Console.SetConsoleEnabled(true);
        Debug.Log("Console has been enabled by EnableConsoleMine mod."); //Unity log 
        logger.LogInfo("Console has been enabled by EnableConsoleMine mod."); // BepInEx log
    }
}

}

Change Log

v1.0.0

  • enalbe debug console