Open BaalEvan opened 3 years ago
Hi, thanks for the PR. I mostly have a question about the new tech database methods: does the base game without the DLC also use the new method, or does there have to be some sort of compatibility switch?
Based on what i found on Github (becasue i never made any mod to ONI before) there is no new way in Vanilla but you can select target in Mod_info.yaml and upload mod with Mod Archive with Vanilla support
supportedContent: EXPANSION1_ID lastWorkingBuild: 464434
- Suppose you've got a mod working with the base version of ONI, on version 441000. Add a mod_info.yaml with these contents:
supportedContent: VANILLA_ID lastWorkingBuild: 441000
- You decide to update your mod to work with Spaced Out!, which is at 442000.
First: make a new folder and subfolder in your mod for archiving the base version of your mod, named something like:
/archived_versions/vanilla and copy all your mod files (including the mod_info.yaml) into that subfolder. Then change the mod_info.yaml in the root folder of your mod to these contents: supportedContent: EXPANSION1_ID lastWorkingBuild: 442000 Develop your mod for the new expansion features and publish it in that root folder. Players on the base game will get the version from the archive folder, and players on Spaced Out! will get the version from the top-level folder. 3. Later, we open up a public_testing branch for Spaced Out! that changes the build number to 443000. As before, make a new archive folder called something like: /archived_versions/spacedout_old and copy all your top-level mod files into it (including the mod_info.yaml). Then change the mod_info.yaml in the root folder of your mod to these contents: supportedContent: EXPANSION1_ID lastWorkingBuild: 443000 You can update your mod for the preview branch and publish it in that root folder. Players on the newest preview version of the game will get the newest version of your mod, and players not on the previous will continue playing the previous version from the archive folder. You can of course delete old archived versions as the progress of the game moves forward.
https://forums.kleientertainment.com/forums/topic/126022-setting-up-mod_infoyaml/
So best way to handle Tech Database will be:
#IF VANILLA
// OLD WAY
#ELSEIF SPACEOUT
// NEW WAY
#ENDIF
And then building 2 separate DLL for each version example: https://github.com/davkas88/ModNotIncluded/blob/388403d204032dc6aa8c033c546d458233916447/Source%20Code/Insulated%20Door/InsulatedDoors.cs OR... you can use reflection to check if there is field in Techs named Instance and based on that use correct approach second example: https://github.com/v-limc/oni-mods/blob/a369c7848fd0fa3f22d15fbccaa29be04edb7ca3/src/commons/VUtils.cs
I've talked with some fellow mod devs and I think that I don't want to support the DLC yet, because it's just a big pain. I will wait for full release. However, if you want to please feel free to upload your DLC changes on Steam Workshop! The only thing I ask for is to link back to the original mod & clarify you got permission. Call it "Drains [Spaced Out Beta]" or something, yeah?
Sure ;) No problem ;)
Additional: Added Radiant Pipes to Radiation