Skip to content

KSP 1.4 and DLC detection #2035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
Olympic1 opened this issue Apr 21, 2017 · 9 comments · Fixed by #2326
Closed
4 tasks done

KSP 1.4 and DLC detection #2035

Olympic1 opened this issue Apr 21, 2017 · 9 comments · Fixed by #2326

Comments

@Olympic1
Copy link
Member

Olympic1 commented Apr 21, 2017

@ayan4m1 @Dazpoet @dbent @linuxgurugamer @politas @Postremus @techman83

We should make some prep work for the upcoming release. Supporting KSP 1.4 will be fairly easy, just another version. But this time there will also be a dlc available. People will be able to make missions/mods for the dlc but we should only make this available for the users who have the dlc.

We'll have to wait for the release to see how the dlc can be detected by CKAN, but could we make any preparations for it?

  • Add KSP 1.4 version
    - 1.3 Prep
  • Preparation for DLC
  • Making History release
  • Finish DLC detection
@Olympic1 Olympic1 added Discussion needed Enhancement New features or functionality ★★★ labels Apr 21, 2017
@Olympic1 Olympic1 added this to the KSP 1.3 & DLC milestone Apr 21, 2017
@dbent
Copy link
Member

dbent commented Apr 22, 2017

As far as detecting the DLC, it should (hopefully) be as simple as detecting the presence or lack thereof of specific files in the installation directory. This should piggyback off the existing autodetect mechanism and create a virtual package named MakingHistoryDLC that other mods can depends (or even conflicts) on. It could be a soft-convention that any official DLC have the suffix "DLC". This should make any dependency errors obvious to users attempting to install mods that require DLC they don't have. "Mod Foo requires MakingHistoryDLC which is not available in the repository." (or whatever the exact error message is).

@dbent
Copy link
Member

dbent commented Apr 22, 2017

We should also consider DLC versioning. Will updates to the DLC always be tied to a new KSP release (and therefore could share versioning) or would it have to be versioned separately...

@politas
Copy link
Member

politas commented Apr 22, 2017

I'm not sure whether we should handle missions made with the Making History DLC. Do they fall into our remit? We definitely need to detect and flag the DLC for conflicts and depends, though.

@Dazpoet
Copy link
Member

Dazpoet commented Jul 10, 2017

If modders start making custom missions I guess the users will expect us to start indexing said missions.

@HebaruSan HebaruSan changed the title KSP 1.3 and DLC detection KSP 1.4 and DLC detection Feb 7, 2018
@HebaruSan
Copy link
Member

Making History's release date has been announced: March 13th, 2018.

CKAN has just over a month to get ready.

@politas
Copy link
Member

politas commented Feb 13, 2018

Ok, so do we handle Making History purely as an Autodetected mod, tagged as DLC (Pro: Minimal code changes required), or do we write some special DLC detection code to inject the prereq?

@dbent
Copy link
Member

dbent commented Feb 13, 2018

...or do we write some special DLC detection code to inject the prereq?

How would that differ from reusing the autodetect mechanism?

I took a look at this briefly to see what would have to be done. It seems relatively straightforward with one annoyance: the test for if something is an autodetected mod is if its version is of type DllVersion. I find this a bit awkward, rather than having an explicit Autodetected property or something, but it's workable. The big issue is that DllVersion right now doesn't actually store a version, which is problematic if we need to version the DLC separately (which I think is a good idea regardless). That's probably easy to rectify, however, without too much issue.

In summary these are the minimum changes I believe are necessary for support:

  1. Modify DllVersion to take a version string parameter and pass it to the base Version class.
  2. Modify DllVersion so that its ToString() method returns the actual version string rather than "autodetected dll", possibly with a (AD) tag or something. Although I think something like (Unmanaged) is more explicit about the relationship CKAN has with it.
  3. Modify the KSP.ScanGameData() directory to include whatever check is necessary to detect that Making History is installed and hopefully extra a useful version or build number.

Bonus

  1. Modify ScanGameData() to ignore specific dlls like KSPSteamCtrlr and Steamworks

I should have some time to do this if this is what we want to do and nobody else has a burning desire to.

@politas
Copy link
Member

politas commented Feb 13, 2018

Huge +1 on changing our "Autodetected" DllVersion to an "Unmanaged" marker that can track version numbers. Perhaps we could have a right-click menu option that will let users select the correct version number for an unmanaged object if we can't figure it out.

We could then add a tag to those Unmanaged objects for those that could in principle be brought back under CKAN management by a plugin.

@dbent
Copy link
Member

dbent commented Mar 13, 2018

Now that Making History is out it seems that detecting the DLC is just a matter of testing for the presence of GameData/SquadExpansion/MakingHistory directory. Also, it appears the DLC is versioned separately from KSP itself. The version can be extracted from the readme.txt file from the aforementioned directory; there doesn't appear to be any build ID for the DLC.

I'll update #2326 witht he appropriate code.

Sorry, something went wrong.

@dbent dbent mentioned this issue Mar 13, 2018
@politas politas removed Enhancement New features or functionality ★★★ labels Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants