I am wanting to create a mod to add more realism to GDT, but I cant find any of the functions I need to overwrite. I may be getting the deobf code, but I’m still confused at what functions to overwrite. I am currently trying to add outsourcing. I have tried looking at the code to other mods, but those are confusing as well.
Any help would be appreciated, sorry if I’m a noob.
I read through that, but it didn’t help me that much. I understand how to overwrite the functions, just not what functions to overwrite. Sample code would be great!
“For this reason it’s better to patch the games source code, rather than
changing it directly. You can easily do this by overwriting
objects/methods in the game code. Sometimes you might just want to add a
hook when something happens, in this case you can hijack an original
method like this:” That’s from the wiki for advanced modding.
To add outsourcing, I don’t think you’d need to override UI.showContextMenu to add a custom menu item.
For the GUI, take a look at how windows are made in defaultbrowser.html in the main GDT folder (use Ctrl+F!). Then use jQuery to add a window, either the ugly way I did it in GDTMP, or the better way of doing it; like it’s done in Platform Randomiser (or TotalRandomiser for a version with a button).
By the way @Stian@Assossa, I sometimes don’t understand my own code that I wrote a few months or sometimes even a few weeks ago, because of how a mess it is. InfoStatsMod, for instance, is much more structurized