Search the Community
Showing results for tags 'unity'.
-
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.
-
- guide
- modding guide
-
(and 4 more)
Tagged with:
-
As the title suggest, anyone be willing to add a color reskin for the Unity pistol? It looks like it goes blue and purple within its Slide and barrel. If anyone is willing to do so, it would be great for a Lucy build.
-
- lucy
- cyberpunk edgerunners
-
(and 3 more)
Tagged with:
-
Greetings fellow modder, It happens to me that I don't have any issues with Valheim modding at all, it is all going smoothly but still I get this message at the debug window every time I press any button in my gamepad [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: UITooltip.OnHoverStart (UnityEngine.GameObject go) (at <5ff8e8381e5049d4926d72f9dd2218ac>:0) UITooltip.LateUpdate () (at <5ff8e8381e5049d4926d72f9dd2218ac>:0) Is there anyway to solve this? Anyways, give away your thoughts. May your road lead you to warm sands, friend.
-
Hey all! So like everyone else, I've been SUPER pumped for the update. Unfortunately, I haven't even been able to START my game yet, as each time I attempt to start the game (with or without Vulkan), i see BepInEx open, it freezes saying something related to a console Input, a Unity error window shows up, then it all shuts down. I've made sure to update my mods, I've updated BepInEx, and everything else I could see or think of. Here's what I see when I get a crash: Does ANYONE have ANY idea as to what's going on??? I must say I'm very upset, as I finally fixed a few mod issues I had been having for a while prior to the H&H update breaking everything.... I'm just grateful I saved a backup copy the night before the update that I can still play offline..... I just hate the stress of not knowing what idiotic mistake I've made to get here. To make things worse, I feel like no one else is having this issue. Maybe it's too soon, but I can't find anything related on Google, or in these forums. Please, if you know anything, I'd love to hear some suggestions.... Thank you everyone.
-
I don't know how hard it will be to do this but i think it will be really cool if there was a mod that makes changes to cities and textures of things and buildings bassed on what universe you go to through the unity so it is actully more like a parallel universe rather than each new universe just being a copy of the last with no changes at all. it coud be very different the more you go through the unity. a mod that does that would be so cool
-
I'm not shore how hard it will be to do this but i think it will be really cool if there was a mod that makes changes to cities and textures of things and buildings bassed on what universe you go to through the unity so it is actully more like a parallel universe. it coud be very different the more you go through the unity. a mod that does that would be so cool
-
- spoiler
- environnent
- (and 5 more)
-
ok found this happening and cant figure out why. anyone have any ideas... no idea whats causing it, [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an objectStack trace:ZNetScene.RemoveObjects (System.Collections.Generic.List`1[T] currentNearObjects, System.Collections.Generic.List`1[T] currentDistantObjects) (at <1b865f8b3455488592cdc401081112e3>:0)ZNetScene.CreateDestroyObjects () (at <1b865f8b3455488592cdc401081112e3>:0)ZNetScene.Update () (at <1b865f8b3455488592cdc401081112e3>:0) and it repeats... till the game fps totally dies..and it crashes... or the fps stays at 10 or less and runs like poo. not sure what is the cause but as i said... when i open console with f5 i can see this code repeating itself over and over. anyone????
-
I'm curious if using asset parts from the unity store as published mods is allowed/legal on the site. I've already got them added to my game and have the legal rights to use them as such, but am curious as if they are allowed to be posted here.
-
Can someone do this armor from jessica nigri cosplay?? It looks prety good!
-
Ola, Basically I am in semi-rant mode: once what was working perfectly, now is just stupidly on non-obvious way won’t work. I used to use mono to install Unity Mod Manager on my macOS to be able to install mods in Pathfinder: Wrath of the Righteous... Until recently. Instaling mono on 64bit went fine, I compiled some small stuff just to prove myself it works, but once I hit that part where you choose Console.exe (instead UUM.exe on 32bit systems), and it gave me option to show the path to the .app – it just says “no path“. That simple. Made me insane. Tried every possible thing I could think of, consulted all search engines, and... NOTHING. So, well, maybe people lurk here, who knows, maybe I find my luck if someone know what is this all about. Thanks for bearing w/ me through this... Rant, me guess. Cheers to all! All help welcome (much so!), – Axie
-
Hello, everyone! I wanted to reach out to Nexus modders community and tell everyone about a large project being worked on by TES modding community which has not gained a lot of attention yet. You might have heard about it, you might have not, but there is a project to bring TES 2: Daggerfall to Unity engine - http://www.dfworkshop.net/ You can also get all the important information about the project on UESP page - http://en.uesp.net/wiki/Daggerfall:Daggerfall_Unity The project is far-far away from being finished, but it's getting there quickly. Already, basic combat and quests are available. Plus, the modders are already replacing old 3D models and sprites with new models and textures. But there is so much work! Come and join, everyone is welcome! Even if you are not skilled enough to make models for games like Skyrim or Fallout 4, your skills might be useful for recreating Daggerfall in full 3D. Here are some examples of the work already done: http://i.imgur.com/8EL3Qh3.png http://i.imgur.com/KWhakGT.png http://i.imgur.com/P0Cz9zS.pnghttp://i.imgur.com/N51F0tG.png The project desperately needs more help, there is so much work to be done! The game has huge potential, but it needs people to achieve new heights. So if you are intersted, visit the forums and we'll get you up to speed - http://forums.dfworkshop.net/
-
Hey guys, I was wanting to edit the main sprite but didn't know the best route. Is it possible to open the asset, edit it, and inject it back in with Unity? Thanks
-
basically in the prologue, when Arno gets captured and goes to prison and stays two months there, he has a nice beard, but as soon as you escape the prison and do the first quest to join the assassin's, the beard disappears and gets replaced by some subtle stubble, which is ugly. the request is to make the beard permanent and compatible with all other mods like outfit manager.
-
Hello everyone, I found an old news where it says about an unofficial patch that increases the drawing range. There is news, but the post on Twitter has been deleted and the links on the file sharing site do not work. Maybe someone has new links or this patch remains.
-
I usually wouldn't be posting topics, but right now I really need some help. I've been having some ideas for a game that's right there in my head and I just really wanna get it out. For an insight on what the game will be about; http://pastebin.com/bgK0Ljrn I need (right now); -Someone skilled with Unity and script writing -An Animator -Concept Artist If you're interested in helping me, please either send me a message here on the forums or email me at [email protected] Thank you for your time :3
