Jump to content

Search the Community

Showing results for tags 'unityexplorer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Nexus Mods Hub
    • Site Updates
    • Projects
    • Site Support
    • Vortex Support
  • Modding Discussion
    • Mod Troubleshooting
    • Mod Ideas
    • Modding Academy
    • Articles and Guides
  • The Lounge
    • Newbies
    • General Chat
    • Gaming
    • Hardware and software discussion
    • Off-Topic
  • Moderation
    • Formal Warnings, Bans and Takedowns
  • Discussions
  • Vortex
  • Archived
    • Nexus Mods app
  • Cyberpunk 2077's Mod Ideas
  • Cyberpunk 2077's Discussion
  • Baldur's Gate 3's Discussion
  • Baldur's Gate 3's Mod Ideas
  • Blade & Sorcery's Discussion
  • Blade & Sorcery's Blade & Sorcery: Nomad
  • Elden Ring's Discussion
  • Elden Ring's Mod Ideas
  • Fallout 4's Discussion
  • Fallout 4's Mod Ideas
  • Fallout 4's Creation Kit and Modders
  • Skyrim's Skyrim SE
  • Skyrim's Skyrim LE
  • Skyrim's Skyrim VR and Consoles
  • Skyrim's Mod Ideas
  • Skyrim's Creation Kit and Modders
  • Monster Hunter's MH Rise
  • Monster Hunter's MH World
  • Monster Hunter's MH Wilds
  • Morrowind's Discussion
  • Morrowind's Spoilers
  • Morrowind's Lore
  • Morrowind's Construction Set and Modders
  • Morrowind's Troubleshooting
  • Mount & Blade II: Bannerlord's Discussion
  • Mount & Blade II: Bannerlord's Old Games
  • Oblivion's Classic Discussion
  • Oblivion's Mod Ideas
  • Oblivion's Mod troubleshooting
  • Oblivion's Oblivion Construction Set and Modders
  • Oblivion's Spoilers
  • Oblivion's Remastered Discussion
  • Ready or Not's Discussion
  • Red Dead Redemption 2's Discussion
  • Red Dead Redemption 2's Mod Ideas
  • Resident Evil Remakes's Resident Evil 4
  • Resident Evil Remakes's Resident Evil 3
  • Resident Evil Remakes's Resident Evil 2
  • Resident Evil Remakes's Resident Evil Village
  • Starfield's Discussion
  • Starfield's Mod Ideas
  • Starfield's Creation Kit and Modders
  • The Witcher's The Witcher 3: Wild Hunt
  • The Witcher's Mod Ideas
  • The Witcher's The Witcher 2: Assassins of Kings
  • The Witcher's The Witcher
  • The Witcher's REDEngine and Modders
  • Spider-Man's Spider-Man Remastered
  • Spider-Man's Miles Morales
  • Spider-Man's Mod Ideas
  • Spider-Man's Spider-Man 2
  • Fallout New Vegas's Discussion
  • Fallout New Vegas's Mod Ideas
  • Fallout New Vegas's Mod Troubleshooting
  • Fallout New Vegas's GECK and Modders
  • Fallout New Vegas's Spoilers
  • Stardew Valley's Discussion
  • Fallout 3's Mod Ideas
  • Fallout 3's Discussion
  • Fallout 3's GECK and Modders
  • Fallout 3's Spoilers
  • Fallout 3's Mod Troubleshooting
  • Dragon Age: Origins's Discussion
  • Dragon Age: Origins's Builder Troubleshooting
  • Dragon Age: Origins's Mod Troubleshooting
  • Dragon Age: Origins's Mod Ideas
  • Valheim's Discussion
  • Dark Souls's Dark Souls
  • Dark Souls's Dark Souls 2
  • Dark Souls's Dark Souls 3
  • Dark Souls's Dark Souls Remastered
  • Mass Effect's Legendary Edition
  • Mass Effect's Original Trilogy
  • Mass Effect's Andromeda
  • Hogwarts Legacy's Discussion
  • Subnautica's Subnautica
  • Subnautica's Below Zero
  • XCOM's Discussion
  • XCOM's Mod Ideas
  • XCOM's Enemy Unknown
  • XCOM's XCOM 2
  • Jurassic World Evolution's Jurassic World Evolution 2
  • Jurassic World Evolution's Jurassic World Evolution
  • 7 Days To Die's Discussion
  • Anno 1800's Discussion
  • Assassin's Creed's Odyssey
  • Assassin's Creed's Valhalla
  • Fallout 76's Discussion
  • Fallout 76's Mod Ideas
  • Far Cry's Far Cry 3
  • Far Cry's Discussion
  • Final Fantasy's Discussion
  • Final Fantasy's VII Remake
  • Final Fantasy's XII The Zodiac Age
  • BattleTech's Discussion
  • Dying Light's Dying Light
  • Dying Light's Dying Light 2
  • Dying Light's The Beast
  • Dragon's Dogma: Dark Arisen's Discussion
  • Dragon's Dogma: Dark Arisen's Mod Ideas
  • Dragon Age: Inquisition's Discussion
  • Dragon Age: Inquisition's Mod Ideas
  • Dragon Age: Inquisition's Troubleshooting
  • No Man's Sky's Discussion
  • No Man's Sky's Mod Ideas
  • The Elder Scrolls Online's Discussion
  • State of Decay's State of Decay
  • State of Decay's State of Decay 2
  • Planet Zoo's Discussion
  • Neverwinter Nights's NWN Discussion
  • Neverwinter Nights's NWN2 Discussion
  • Neverwinter Nights's Mod Ideas
  • My Summer Car's Discussion
  • Metal Gear Solid V: The Phantom Pain's Discussion
  • MechWarrior 5: Mercenaries's Discussion
  • Kingdom Come: Deliverance's KCD1 Discussion
  • Kingdom Come: Deliverance's Modding Tools and Modders
  • Kingdom Come: Deliverance's KCD2 Discussion
  • Devil May Cry 5's Discussion
  • Star Wars Jedi's Fallen Order
  • Star Wars Jedi's Survivor
  • Star Wars: Battlefront II (2017)'s Discussion
  • Sekiro: Shadows Die Twice's Discussion
  • Pillars of Eternity's Pillars of Eternity
  • Pillars of Eternity's Pillars of Eternity 2: Deadfire
  • Palworld's Mod Ideas
  • Palworld's Discussion
  • Palworld's Unreal Engine and Modders
  • Dragon's Dogma 2's Discussion
  • Dragon's Dogma 2's Mod Ideas
  • S.T.A.L.K.E.R. 2's General Modding
  • S.T.A.L.K.E.R. 2's Troubleshooting
  • S.T.A.L.K.E.R. 2's Mod Ideas
  • Horizon Games's Horizon Zero Dawn
  • Horizon Games's Horizon Forbidden West
  • Horizon Games's Ask the Community

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Originally this guide was written for the game News Tower in the Steam Community - but given the overall process is applicable to all modern Unity games, I wanted to share it here as well. The main goal of the tutorial was to boost the "income" of Influence Points, while preserving the general game balance. Preface These things are considered cheating, and your save will probably be banned from submitting scores to the leader board. It doesn't block you from achievements though, so be cautious if you like to unlock them honestly as well. I will show you in an easy step-by-step way, how you can modify game elements in "real-time", without having to alter any game files. We'll do that to increase the yield we get from any Influence Point (IP) sources in-game, by simply doubling everything we get. The game gets less grindy, while still requiring you to work for IP. If you are only interested in changing something a single time, you can skip the Code and Hook sections, as they aren't that relevant for you. I'll probably build a normal mod for Influence Points in the future, but for now this must suffice. About the Process The stuff here will work in most (if not all) Unity games, just make sure you'll pick the right BepInEx/MelonLoader and UnityExplorer versions, if you try it out with another game. Preparing the Game To start: Download the latest BepInEx 5, e.g. BepInEx_win_x64_5.4.23.4 Extract/Copy the contents into your game folder, e.g. C:\SteamLibrary\steamapps\common\News Tower Start the game once. Load/Continue the game, and make a new save - just in case. Download the latest UnityExplorer BIE 5.X - Mono. Use this direct link, if you're unsure what to pick. Extract/Copy the plugin folder into ...\News Tower\BepInEx\plugins If your game folder looks like this in the end, you've done everything correctly: The Code Before we go into the game, I'll explain the logic to you, so you don't have to run random code you got "from a guy on the internet". And don't worry, everything is super simple. The gist of it: The game stores the amount of IP in an object called TowerStats, and every time you gain IP, it simply tells the TowerStats object just that; "Hey, add these 2 Influence Points". It does so by using a function called "AddInfluence", and passes the amount of IP to add, e.g. AddInfluence(2). We will intercept said function call, to multiply that number by 2, before it gets actually passed to AddInfluence. Here is the code, all lines starting with "//" are comments and explanations, and can be safely ignored and deleted - the program doesn't care. // "Prefix" means that we will do something before the original method is run // TowerStats __instance is the GameObject that holds the values we are interested in // ref float __0 is the amount of Influence Points that are supposed to be added. "__0" is just the (very bad) name of the variable, in the normal code it is called "amount" // Notice the "ref" tag; It tells the program to give us the actual "place" of the value (=reference), instead of simply telling us which value it has. This is important, as we not only want to read, but actually change it // __1 is irrelevant here static void Prefix(TowerStats __instance, ref float __0, bool __1) { // StringBuilder and sb.Append is just formatting stuff, so we see something in the log try { StringBuilder sb = new StringBuilder(); sb.Append("Multiplying Influnce. Before: ").Append(__0.ToString());; // This is the actual place of the "boost", __0 (=the Influence Points we get) // is multiplied with 2. // It's written like that because of floating point shenanigans, // but boils down to: amount = amount * 2 __0 = (float)((int)__0 * 2); // You can change this to anything you want, e.g. a higher multiplication, // or just a flat increase: // __0 = (float)((int)__0 * 5); // __0 = (float)((int)__0 + 2); sb.Append(" After: ").AppendLine(__0.ToString()); UnityExplorer.ExplorerCore.Log(sb.ToString()); } catch (System.Exception ex) { UnityExplorer.ExplorerCore .LogWarning($"Exception in Multiplier Mod; void TowerStats::AddInfluence(float amount, bool silent):\n{ex}"); } } And here is the code without the spam: static void Prefix(TowerStats __instance, ref float __0, bool __1) { try { StringBuilder sb = new StringBuilder(); sb.Append("Multiplying Influnce. Before: ").Append(__0.ToString());; __0 = (float)((int)__0 * 2); sb.Append(" After: ").AppendLine(__0.ToString()); UnityExplorer.ExplorerCore.Log(sb.ToString()); } catch (System.Exception ex) { UnityExplorer.ExplorerCore .LogWarning($"Exception in Multiplier Mod; void TowerStats::AddInfluence(float amount, bool silent):\n{ex}"); } } Applying the Hook A hook is essentially just another piece of code that is "attached" to something that is already present in the game. In our case, we want to do something when Influence Points are added, so we want to hook into the according class and method. After starting the game again, you'll be greeted with something like this - don't be intimidated! You can freely move, resize and close any windows you don't need, or hit F7 to hide it completely; Do just that, so you can continue/start a new game. After the game is fully loaded, find the right class for our hook: Search for the specific method for us to hook into. You can reduce the list by typing "add", so you're only shown those that have "add" in them: ឵ Now you can copy the code from above, and paste it inside: And that's it! Now you will always get double the amount of Influence Points from any source! Testing If you want to test the change, you can simply search for the TowerStats object and invoke our "AddInflunce" method. To do that, you'll have to find the object first: After you did that Scroll down to the AddInfluence method Click "Evaluate" Type in some value that you want to run a test with (into the first input field) Hit evaluate again Thereafter Check your Influence Points Check the Log window This is also the method you'd use to change other stats, e.g. money, resources, etc. - you only have to find the according GameObject they are stored in. That isn't always an easy task to do (or explain), but if you want to get a hang of how things work, simply use "Object Explorer"->"Scene Explorer" to find out how the game is structured. If objects are nested, you can "dig deeper" by simply clicking on "Inspect" in such a case. Note None of your game files are changed, and your game stays vanilla - which means that the changes are not permanent, and you'll have to apply the hook again after you restart the game. To uninstall the UnityExplorer, simply delete the folder from the BepInEx/plugins folder, or delete the BepInEx files altogether. Feel free to ask if you encounter problems - although I won't react to questions that can be solved by a 10 seconds google search.
×
×
  • Create New...