UBOAT
New ways to play
Modify your UBOAT experience by checking out the many mods created and shared by the community, including tweaks to almost any aspect of the game.
Steph 31 May, 2024 @ 2:26pm
Mod version question
How do you add a version to a mod? I did the console enable mod with general.xlsx which worked, but it says it's out of date. My first mod, so I don't know much. :) Thanks!
< >
Showing 1-15 of 19 comments
DECAFBAD 7 31 May, 2024 @ 5:11pm 
Edit the Manifest.json file.
But right now no matter what I type in there it says outdated. So just ignore the warning.
R3dShift 1 1 Jun, 2024 @ 10:08am 
A Manifest should look something like this:


{
"name": "Your mod",
"version": "1.0 ",
"description": "whatever",
"author": "You",
"supportedGameVersions": [
"2024.1 (full release)\npreview 5",
"2024.1 (full release)\npreview 6",
"2024.1 (full release)\npreview 7",
"2024.1 (full release)\npreview 8",
"2024.1 (full release)\npreview 9",
"2024.1 (full release)\npreview 10",
"2024.1 (full release)\npreview 11",
"2024.1 (full release)\npreview 12",
"2024.1 (full release)\npreview 13",
"2024.1 (full release)\npreview 14",
"2024.1 (full release)\npreview 14"
],
"assemblyName": "NewAssembly",
"permissions": [],
"steamFileId": xxxxxxxxxxx
}


You can add a new line for each previews, you can even add lines for previews that doesn't exist yet like i did above, so you don't have to update your manifest after each update.

I hope that help
Last edited by R3dShift; 1 Jun, 2024 @ 12:30pm
Steph 1 Jun, 2024 @ 4:05pm 
Thanks both of you. That helps a lot.
link 15 2 Jun, 2024 @ 10:02am 
could you not just set the manifest to be "2024.1 (full release)\n" and it would include all previews?
DECAFBAD 7 2 Jun, 2024 @ 10:05am 
What's that "\n" doing there?
Is that why it keeps saying outdated? :steamfacepalm:
link 15 2 Jun, 2024 @ 10:06am 
that might be? I mean R3dshift mentioned that character in the string so maybe its present i am just going off this convo. Haven't done so myself (also sqparadox mentioned the extra char)
R3dShift 1 2 Jun, 2024 @ 10:08am 
Does it work that way ?
link 15 2 Jun, 2024 @ 10:09am 
In prevous versions you would just state "B131" or "2022.1" and the game would do a "[value]*" regex or string comparison which would match all versions under that major.

sqparadox had some issues with it initially (in the current version) and reported a bug, it either partially works or needs full fix to resolve but I do think the string had a \n which most players didn't pick up on.
Last edited by link; 2 Jun, 2024 @ 10:10am
R3dShift 1 2 Jun, 2024 @ 10:11am 
i'll try it next time i update my mod, thank you Link !
Beta uses a new version of unity. Mod tools has not been updated for that yet as it still calls for the old unity version. That is probably why its not working yet. No point making mods until devs has fixed this.
Last edited by [82AD] ♤Stonewall♤; 2 Jun, 2024 @ 3:14pm
link 15 2 Jun, 2024 @ 3:55pm 
We can still build data sheet and texture mods. Even code is technically buildable. You just can't validate against the game assemblies

Assets however cannot be built without a new template to link in the assemblies properly from the game
DECAFBAD 7 2 Jun, 2024 @ 4:10pm 
Originally posted by link:
You just can't validate against the game assemblies
You can't? I can. I use neovim with omnisharp, I think visual studio or vscode will work too. Just add the dlls as References into your csproj file

<ItemGroup> <Reference Include="Assembly-CSharp"> <HintPath>lib/Assembly-CSharp.dll</HintPath> </Reference> <Reference Include="com.uboat.game"> <HintPath>lib/com.uboat.game.dll</HintPath> </Reference> <Reference Include="com.uboat.modapi"> <HintPath>lib/com.uboat.modapi.dll</HintPath> </Reference> </ItemGroup>

But it's inexplicable, sometimes even when dotnet can compile the DLL, UBOAT can't. There's an issue with the compilation errors not being printed at all so I don't know exactly what causes this.
Last edited by DECAFBAD; 2 Jun, 2024 @ 4:12pm
link 15 2 Jun, 2024 @ 5:02pm 
Originally posted by DECAFBAD:
Originally posted by link:
You just can't validate against the game assemblies
You can't? I can. I use neovim with omnisharp, I think visual studio or vscode will work too. Just add the dlls as References into your csproj file

<ItemGroup> <Reference Include="Assembly-CSharp"> <HintPath>lib/Assembly-CSharp.dll</HintPath> </Reference> <Reference Include="com.uboat.game"> <HintPath>lib/com.uboat.game.dll</HintPath> </Reference> <Reference Include="com.uboat.modapi"> <HintPath>lib/com.uboat.modapi.dll</HintPath> </Reference> </ItemGroup>

But it's inexplicable, sometimes even when dotnet can compile the DLL, UBOAT can't. There's an issue with the compilation errors not being printed at all so I don't know exactly what causes this.


Doesn't the game have a certain protections and what it will compile? Whereas an external compiler may not recognize that . Also, there are permission sets you may have to set onto the mod to get it to compile depending on what access is required
DECAFBAD 7 2 Jun, 2024 @ 5:34pm 
Sure, but unless you're trying to start a web server inside UBOAT or something similar, you won't have issues. Unless there's one under the System namespace of course, in that case even that will work.
I don't know, I don't usually deal with C# other than for trivial modding things.
link 15 2 Jun, 2024 @ 5:52pm 
I just know there are things that you have to set into the metadata.json in order for some scripts to build . like "reflection, or system" or something I assume yours has something in it.
< >
Showing 1-15 of 19 comments
Per page: 1530 50