LogRaam Posted January 30 Share Posted January 30 (edited) I tested the integration of a mod into Xenonauts 2. In fact, I created a manifest.json that I associated in the game with the MOD section. My mod is recognized by the game at startup and is listed in the mods.json file. Then, I can select and activate it. However, at that point, the game crashes and exits to the desktop. I wonder if it's not an error in the content of my manifest file. Do you have documentation on creating a manifest file for a mod? Here is the content of my manifest: { "version": "0.1.0", "asset": { "Name": "LogRaam's Better Warden Proportions", "UID": "6936a366-b01e-4cd7-9dd9-5a1f6ac4cafd", "Description": "An adjustment to warden proportions.", "Author": "LogRaam", "Website": "https://www.nexusmods.com/skyrim/users/308756", "Version": "1.0.0" } } And here is the content of the mods.json file when I activate my mod into the game: { "Mods": [ { "Manifest": { "descriptor": { "path": "P:/OneDrive/Documents/My Games/Xenonauts 2/Mods/LogRaam/manifest.json", "_type": "Common.Content.DataStructures.ContentPackManifest", "$type": "Common.Content.Descriptors.FileDescriptor" } }, "State": "Enabled" } ] } In the directory where my manifest is located, I haven't added anything else for now. This scenario causes the game to crash. Ultimately, I would like to include a modified .png texture file corresponding to something like this: { "version": "0.1.0", "asset": { "_assetBundleMap": { "generated_texture_strategy": [ "assets/assets/xenonauts/texture/strategy/ui/paperdoll/armour/warden^default^collar.png", ], }, "$type": "Common.Content.DataStructures.AssetBundleBuildManifest" }, "$type": "Common.Content.DataStructures.VersionedAsset" } I will place the .png file in the correct file structure within the directory of my mod. This second scenario have been tested and still cause a crash of the game. Do you have any advice to better guide me in creating the manifest for a mod that I want to select in the game's MOD section? Edited January 30 by LogRaam add more info 1 Quote Link to comment Share on other sites More sharing options...
SanitySP Posted January 31 Share Posted January 31 (edited) Does anybody have an example of a working mod? Edited January 31 by SanitySP Quote Link to comment Share on other sites More sharing options...
SanitySP Posted January 31 Share Posted January 31 (edited) Ok i've got to the same point as you but I also have the crash, I think it has to do with the version because in the UI, it has nothing listed under supported versions Edited January 31 by SanitySP Quote Link to comment Share on other sites More sharing options...
LogRaam Posted January 31 Author Share Posted January 31 The supported game version section is filled in via a JSON property. Unfortunately, I do not yet know which property I should use to comply with the manifest standard for mods in Xenonauts 2. Do we have access to documentation on the manifest model that we should use for a mod in Xenonauts 2? Quote Link to comment Share on other sites More sharing options...
SanitySP Posted January 31 Share Posted January 31 If you want I can send you the decompiled code where the Mod class and asset bundle manifest are defined Quote Link to comment Share on other sites More sharing options...
LogRaam Posted January 31 Author Share Posted January 31 Yes, that could help me. Or if you have the steps for decompressing, I could then use dnSpy to take a look. I tried with the mod examples provided by Goldhawk Interactive, and I have the same issue. So it might be a bug rather than a configuration error on my part. Quote Link to comment Share on other sites More sharing options...
Gijs-Jan Posted January 31 Share Posted January 31 We're in the process of adding in support but we had to refocus on the Unity 2022 migration and 3.0 milestone sadly :(. At the moment the game only really supports swapping out values in the Templates - texture swaps (runtime loading of textures) needs to be implemented still unless you use Unity's asset bundle loading. Could you post the mod as a zip, that way I can delve a bit into it and I'll try to help debug it! I do need the logs of the game of the crash to better help see what's going on. We're going to consolidate all info needed for modding here once we continue work on it: https://github.com/GoldhawkInteractive/X2-Modding?tab=readme-ov-file#getting-started However, this is under construction and aside from the example mods doesn't contain anything yet. 1 Quote Link to comment Share on other sites More sharing options...
Gijs-Jan Posted January 31 Share Posted January 31 The only thing you should have to do with a mod is define it's manifest: ``` { "version": "0.0.4", "asset": { "Name": "Xenonauts Basic Cover Mod", "UID": "56bbba8a-7fb5-44c3-a6d3-834a2fb2d977", "Description": "A basic mod for Xenonauts 2 that changes cover values on the full cover master to 80%.", "Author": "Goldhawk Interactive", "Website":"http://www.goldhawkinteractive.com/", "Tags":["Official", "Mod"], "Version": "1.0.0", "$type": "Common.Content.DataStructures.ContentPackManifest" }, "$type": "Common.Content.DataStructures.VersionedAsset" } ``` The primary things that are crucial in the above are the name, and the UID - which need to be unique. Our plan is to release a modding tool that automates the creation of the above, for now you could use an online generator (https://www.guidgenerator.com/) or simply change the UID yourself. The second thing is that the structure of the mod needs to follow the directory structure in the Xenonauts folder - which only has the templates for now. Quote Link to comment Share on other sites More sharing options...
LogRaam Posted January 31 Author Share Posted January 31 Thank you Gijs-Jan, Everything makes sense if you haven't implemented the ability to import a native PNG sprite into the game without going through a Unity bundle recompilation. I can upload the game logs here if you tell me where to find them. However, I've also tested the two mods suggested on https://github.com/GoldhawkInteractive/X2-Modding, and the game still crashes. I cloned the repo and placed the mods as they are in the game's mod directory. This UCase is probably what you'll be interested in for debugging. Quote Link to comment Share on other sites More sharing options...
Gijs-Jan Posted January 31 Share Posted January 31 You can find the details around logs & saves here: (My Documents/My Games/Xenonauts-2/) Locally I can enable the example mods, so I'd love to see the logs to check if anything is going wrong. Quote Link to comment Share on other sites More sharing options...
LogRaam Posted January 31 Author Share Posted January 31 (edited) Ok, I have the log. Attached to this message. Step to reproduce the crash: 1. Start game 2. Go to MODS section 3. Choose any mod to activate, save and close mod section 4. Start a new game. At this point, game crashes to Desktop. I used the 2 mods from your Github. I tested with my own mod too. I tested with only a manifest with name and newly generated UID. All 3 ucases crash the game. output.log Edited January 31 by LogRaam 1 Quote Link to comment Share on other sites More sharing options...
Gijs-Jan Posted February 1 Share Posted February 1 Thank you for taking the time to get us the error report. For some reason it seems to want to create a tooltip for the mod, trying to access the contents which crashes the game. So it doesn't seem there's an issue with how you've setup the mod. I'm going to card this up and try to see if I can spend some evening hours getting it fixed for next week. Quote Link to comment Share on other sites More sharing options...
Pietje666 Posted February 1 Share Posted February 1 Do i need to create every meta file with a unique id for every folder and file? Yikes! Quote Link to comment Share on other sites More sharing options...
LogRaam Posted February 1 Author Share Posted February 1 Thank you Gijs-Jan, I appreciate it. I have experience in programming and good skills in C#. If I can help with anything, let me know, and I'll be happy to assist you. Quote Link to comment Share on other sites More sharing options...
LogRaam Posted February 1 Author Share Posted February 1 @Pietje666 I had the same reaction when I saw the project on GitHub. 1 Quote Link to comment Share on other sites More sharing options...
SanitySP Posted February 2 Share Posted February 2 It makes sense that the tooltips are causing the issue given that the tooltip system looks through the files on its own to assign some constants. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.