SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Current crop of subsims & naval games > UBOAT > UBOAT Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-31-19, 05:10 PM   #1
R-T-B
Sparky
 
Join Date: Aug 2008
Posts: 150
Downloads: 324
Uploads: 5


gear How to mod a Unity Game like UBOAT AKA You guys are doing it all wrong

Hello all. I'm R-T-B. An old wannabe Silent Hunter 5 modder who grew frustrated with the game and has probably been forgotten. I also am a game dev, and have worked on modding some unity games in the past.


Some terminology. Unity is a game "engine." It's what makes our game run. A lot of games are made in it. So this likely applies beyond just UBOAT, but obviously as I sponsored this game on day 1, I'm interested in modding it!


Benefits of modding a unity game the "right" way:


1.) More resilient to updates of the game itself



2.) Can better coexist with other mods (this technique only replaces the assets in the binary archive that are used).



3.) No need to distribute huge binary archive files like we are doing now. We only distribute what is changed.


Drawbacks (vs JGSME on SH):


1.) No mod list tracking (you need to track what mods and what order they are installed in on your own! Scary, I know, but no way around this, and it's not like what we had before was better).



In short, do it this way, not how you have been doing it up until now, and I think we'll all reap the benefits!


You will need an open source tool to produce a mod this way. As an example, I'm going to botch up the 13th flotilla logo, and slap a generic clipart deer/buck/stag/whatever in the middle of it. And apply a cheap photoshop filter because my Photoshop skills suck and this helps hide that fact.


I won't go too into details of what we do to make the mod, modders know about how to replace textures already I assume. But I will glance over the basics. You need this tool, called UABE, to continue (you can think of this kind of as a "JSGME for Unity games"):



https://github.com/DerPopo/UABE/releases


Grab the latest 32/64-bit build (I went with 64-bit since our game assumes you have 64-bit anyways, but it doesn't matter).


Once you have it, you got a zip archive. Extract it and run the exe tool inside. Open Uboats directory and open ALL the *.assets files in UBOAT_DATA. Do whatever mod work you desire to the files now, and feel free to explore! Hint: Files you can easily work on usually have an export option under "plugins." In my case, for our lame emblem mod (I called it "IronStag" to compensate for... something) I edited the main texture files for the Conning towers and painted a new logo on (using plugins->export to png, edit the png, and then edit->load to replace it when done editing. I use normal multithreading quality).


You can see the work here. The changed files are marked at the end with an asterisk.





Now, it's time to make our mod!

You do that with the file menu. You can chose to distribute it as an innocent non-executable file (the client will need UABE installed to use the mod then), or as a complete do-it-all exe that handles everything (the client will probably need to trust you in that case.


I'm doing both. First an EXE, though. Select that option in our case:





Fill out some mod details. As you can see, I like my mod so much I even told you what it does. I suggest you do the same. You can also set a custom and icon and should set the default game directory:





As a result of your hard work, the installer will look kind of like this:


Mine is much technical, very detail, wow:





About the only thing your end user needs to know is where UBOAT is installed. It might even figure that out for them if you installed to the same default place, and filled it out for them:





As you can see, it "patches" the needed files, only replacing what is needed. This enabled mod coexistence and better handling of updates. It's all around a far better system.




Can I has sticky?






Demo mod downloads (exe and not-exe) will be posted soon to the mod workshop here at subsim, for you to see the wonder for yourself. Stand by.



EDIT: The emblem mods I just made:


EXE Version: http://www.subsim.com/radioroom/down...o=file&id=5483


Safe "who da heck is R-T-B" version. Requires UABE: http://www.subsim.com/radioroom/down...o=file&id=5484


They should work with any modstack that doesn't touch the uboat skin, and on any version for quite some time. That's the magic.

Last edited by R-T-B; 06-03-19 at 12:32 PM.
R-T-B is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.