Skip to content
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

Use of older versions of Mods for Lastest Version of KSP not being installed and Not showing when done manually. #2533

Closed
Gryffen1971 opened this issue Oct 5, 2018 · 20 comments
Labels
Support Issues that are support requests

Comments

@Gryffen1971
Copy link

Background

CKAN Version:
v1.25.3

KSP Version:
v1.45.2243

Operating System:
Win10-64-Bit

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
yes, Manual addition of Mods when CKAN's failure to import files.

Problem

What steps did you take in CKAN?

  1. Imported files from Downloads directory
  2. Clicked 'Yes' to install files in Gamedata Directory.
  3. Clicked 'No' to delete files in Downloads Directory.
  4. Waited several minutes for completion.
  5. Refreshed Display to update listing of Installed Mods.

What did you expect to happen?
Mods to be installed wither or not they are for current version of KSP.

What happened instead?
Mods did not install with CKAN and did not show as 'AD' when manually installed.

Screenshots:

No

CKAN error codes (if applicable):
No Errors.

@HebaruSan HebaruSan added the Needs more info We need more info label Oct 5, 2018
@HebaruSan
Copy link
Member

Which mods did you attempt to import? Which mods had this problem?

@HebaruSan HebaruSan added the Support Issues that are support requests label Oct 5, 2018
@Gryffen1971
Copy link
Author

Gryffen1971 commented Oct 5, 2018

Here is a list of the mods i tried to import;

  1. OPT Space Plane Parts (KSP v1.1.2)
  2. OPT Space Plane Main (KSP v1.1.2)
  3. Prakasa Aeroworks (KSP v1.1.3)
  4. Asteroid Day for KSP (KSP v1.2)
    Now i know these are for older versions but, even after i tried the import i did a manual install.
    Yes, i have done manual installs before (many times) and placed each of the required files/folders in the Gamedata directory.

I refreshed Ckan's Mod listing to see if, they would show up and Nothing. I even went as far a exiting out of CKAN and restarting the program and still nothing. Usually they would show up with 'AD' next to them.

This is the first time i have run into this problem with CKAN. Older version(s) would show the Mod as an 'AD' when detected.

In earlier version of CKAN (v1.2-1.23) i never had a problem with adding mods in manually even when they were for an earlier version of KSP. What has changed in CKAN (v1.24+) for it not to detect them?

@HebaruSan
Copy link
Member

OK, it sounds like there are two points here.

  1. The import function didn't install those four mods. In this case, that would be because they're not compatible with your version of KSP. The import function won't auto-install incompatible mods, by design.
  2. Manually installed mods are not showing up as Auto-Detected. The AD functionality has always been very limited; it works by finding all the DLLs under GameData that CKAN didn't install, and checking if any of their filenames exactly match the identifier of a known mod. So for example in order for OPT Space Plane Parts to be auto-detected, you would have to have a file somewhere in your GameData called OPTSpacePlaneParts.dll (and you can confirm this by manually creating an empty file with that name and then launching CKAN again). You state that it used to work differently, but more likely is that in those older versions you tested it with mods where this heuristic works successfully, e.g. ModuleManager.

Is that an accurate summary? Did I miss anything?

@HebaruSan HebaruSan removed the Needs more info We need more info label Oct 5, 2018
@Gryffen1971
Copy link
Author

I checked using these mods to answer question #2;

  1. Asteroid Day v1.2 (KSPv1.2) Installed into Gamedata. Started CKAN and still did not show.
    1a. This mod worked in previous versions of KSP and in previous versions of CKAN it showed-up as 'AD' even though KSP was several versions higher then intended for the mod.

  2. "NAME":"OPT Legacy Spaceplane Parts",
    "URL":"http://ksp-avc.cybutek.net/version.php?id=300",
    "DOWNLOAD":"http://spacedock.info/mod/711/Orbit%20Portal%20Technology%20%5BOPT%5D%20Spaceplane%20Parts",
    "VERSION":{"MAJOR":1,"MINOR":1,"PATCH":2,"BUILD":0},
    "KSP_VERSION":{"MAJOR":1,"MINOR":4,"PATCH":5},
    "KSP_VERSION_MIN":{"MAJOR":1,"MINOR":4,"PATCH":0},
    "KSP_VERSION_MAX":{"MAJOR":1,"MINOR":4,"PATCH":9}
    Above text is from the Version file. No dll with this mod. Placed in Gamedata folder and same results. I did find it under Incompatible but, it lists that it can work with-up-to KSP v1.4.9 , So, how is it incompatable?

Even if, the mod is or is not compatible with KSP and those mod have a '.dll' or '.version' file, CKAN should pick it up and show that it is "Auto-Detect". Now i have had OPT Legacy Space Plane installed before and it did not come with a '.dll' file just a '.version' file it showed as "Auto-Detect" and this occured when KSP was at Version 1.4.3 and i think CKAN was Version 1.23. So, why is it now that this mod does not show?
The mod as stated in the version file is compatible to use up-to KSP v1.4.9.
Has something changed in CKAN that it no longer sees a mod that does not have a ".dll" but, a ".version" file? It showed in the past.
I surmise that something in the code of CKAN was changed in version 1.2.4 and above so that only ".dll" file is recognized. Now i could be wrong.

In addition, i checked with another mod called OPT Reconfig. This mod also comes with a ".version' file and it also states;
"NAME":"OPT Reconfig",
"URL":"http://ksp-avc.cybutek.net/version.php?id=572",
"DOWNLOAD":"https://spacedock.info/mod/1808/OPT%20Reconfig",
"CHANGE_LOG_URL":"https://github.com/Moobien/OPT_Legacy/blob/master/GameData/OPT_Reconfig/Version/OPTReconfig.version",
"VERSION":{"MAJOR":1,"MINOR":2,"PATCH":3,"BUILD":0},
"KSP_VERSION":{"MAJOR":1,"MINOR":4,"PATCH":5},
"KSP_VERSION_MIN":{"MAJOR":1,"MINOR":4,"PATCH":0},
"KSP_VERSION_MAX":{"MAJOR":1,"MINOR":4,"PATCH":9}
Text is from version file.
Now why does this file not show when it states that it will work correctly with KSP v1.4.5?

@HebaruSan
Copy link
Member

So when you said "KSP v1.1.2", you did not mean that those mods were released for KSP v1.1.2? That's why I thought that they weren't compatible, because that's an old game version and almost no mods from back then would be compatible with KSP 1.4.5. If those are instead the version numbers of those mods, and the text "KSP" was added in error, then that completely changes what this problem report is about.

As for AD, no it hasn't changed as I've already said; CKAN has never checked .version files for that. The data structure that tracks AD mods has "Dlls" in its name, and CKAN has never tracked the info that would be required to do what you describe (see my comments in #949).

@Gryffen1971
Copy link
Author

I just read your post #949 and understand where your coming from. This still does not answer the question, "How can CKAN in previous versions see Mods with Version files and then not see them in later Versions."
Also, In the Incompatible section of CKAN it show "Orbit Portal Technology [OPT] Spaceplane [Legacy] as having a Max KSP Version of 1.4.9., I don't understand how this is possible when i have shown that the version files states it will work with KSP v1.4.5.

@Gryffen1971
Copy link
Author

I shortened the name of Kerbal Space Program to KSP to save on typing.

@HebaruSan
Copy link
Member

Previous versions did not work that way.

@Gryffen1971
Copy link
Author

Ok, i've done more digging. I've looked in the registry.json file and it lists the OPT Reconfig Mod several times. It stops at Max KSP Version 1.4.4. Now, this information is from the "https://github.com/KSP-CKAN/CKAN-meta/archive/master.tar.gz file. Now, there is a version mismatch coming from what it shows as listed from Spacedock.info and the included Version file of said Mods. I have been playing Kerbal Space Program since it was at Version 0.90.0 Beta and 1235 in-game hours since purchasing it on Steam and have used CKAN since Version 1.21. Now, i have in those years have seen CKAN Auto-Detect files that did not have a Dll file just a Version file. That is because of the registry file getting it information form the Meta-Data Base Archive for KSP-CKAN and yes i have kept track over the years it has Auto-Detected those files. To say it has not is not Correct.

@HebaruSan
Copy link
Member

I've been playing KSP since version 0.23, and using CKAN since v1.0.1. Your move. 😁

@Gryffen1971
Copy link
Author

No move just stating. So, how do we resolve this problem with CKAN and the Information it receives?

@Gryffen1971
Copy link
Author

@HebaruSan
I have done some digging and have come across somethings that might be of interest to you.

I examined the .version file for OPTReconfig and came across these fields specifically these lines;

"KSP_VERSION":{"MAJOR":1,"MINOR":4,"PATCH":5},
"KSP_VERSION_MIN":{"MAJOR":1,"MINOR":4,"PATCH":0},
"KSP_VERSION_MAX":{"MAJOR":1,"MINOR":4,"PATCH":9}

I draw your attention to line 3 where it states the KSP_VERSION_MAX {"MAJOR":1,"MINOR":4,"PATCH":9}. Now when i checked the URL listed it showed a different Version number for the Max Version of KSP this Mod will work with;

{"NAME":"OPT Reconfig","URL":"http://ksp-avc.cybutek.net/version.php?id=572","DOWNLOAD":"https://spacedock.info/mod/1808/OPT%20Reconfig","CHANGE_LOG_URL":"https://github.com/Moobien/OPT_Legacy/blob/master/GameData/OPT_Reconfig/Version/OPTReconfig.version","VERSION":{"MAJOR":1,"MINOR":2,"PATCH":3,"BUILD":0},"KSP_VERSION":{"MAJOR":1,"MINOR":4,"PATCH":5},"KSP_VERSION_MIN":{"MAJOR":1,"MINOR":4,"PATCH":0},"KSP_VERSION_MAX":{"MAJOR":1,"MINOR":4,"PATCH":4}}

This is where IMHO is where the problem lies. Since this states that it will work with KSP v1.4.0 to KSP v1.4.4 when the Version files states it will work with KSP v1.4.0 to KSP v1.4.9. Even thou version file has the Current Version for KSP at the moment. It's the Max Version that is keeping it from showing-up in CKAN under the Compatible Section.

Now i was also reading about the CKAN/spec.md and i found a section that speaks about the .version file.
$vref

The $vref field indicates that version data should be filled in from an external service provider. Only one $vref field may be present in a document.
#/ckan/ksp-avc[[/path]/avcfilename.version]

If present, a $vref symbol of #/ckan/ksp-avc states that version information should be retrieved from an embedded KSP-AVC .version file in the file downloaded by the download field. The following conditions apply:

Only .version files that would be installed for this mod are considered. (In theory. Transformer ordering may cause files outside the installed folders being considered)
It is an error if more than one .version file would be considered.
It is an error if the .version file does not validate according to the KSP-AVC spec.
The KSP_VERSION field for the .version file will be ignored if the KSP_VERSION_MIN and KSP_VERSION_MAX fields are set.
Netkan will first attempt to use anything after ksp-avc as a literal path within the zip file, and if that fails, will use the string as a regexp to search for a matching file to use.

When used, the following fields are auto-generated:

ksp_version

ksp_version_min

ksp_version_max

Version information is generated in such a way as to ensure maximum compatibility. For example if the .version file specifies that the mod is compatible with KSP version 1.0.2 but the existing version specifies 1.0.5 then the version information generated will give a ksp_version_min of 1.0.2 and a ksp_version_max of 1.0.5.

If (and only if) no mod version number has been identified (eg a #/ckan/http/:url), then the following field will also be auto-generated:

version

Now i do not know how this plays into the problem that i found. Any insight you might have is greatly appreciated.

Thanks.

I think i found out why this Mod will not install. Any insight on this is greatly appreciated.

@HebaruSan
Copy link
Member

Yes, it's using http://ksp-avc.cybutek.net/version.php?id=572 to get the latest version info. This is to allow mod authors to control it after release without having to change their downloads. The mod author would need to update the file at that URL to resolve this.

@Gryffen1971
Copy link
Author

Ah, that is what i figured out after i read more here on the CKAN Github in the .md file for CKAN on how it reads that information. So, if a Modder sets the Min & Max Version of the Mod that is where CKAN will determine wither or not the mod is Valid/Compatible for that Version of KSP. But, if those Values/Fields are not filed out then CKAN would read the .version file for said information and determine if, the mod is Valid/Compatible with a Current version of KSP. This is what i determined from reading up on the Spec.md file for CKAN.

@Gryffen1971
Copy link
Author

After all was said and done i just ran into another problem/issue. CKAN did not Auto-Detect Manually installed Mods (OPT_Reconfig and OPT_Legacy) that i Manually installed.
I ran CKAN a few minutes ago and checked to see if, it would Auto-Detect those mods because OPTReconfig was updated at 10:08pm EST on Spacedock.info. Now i don't konow how long it takes to propagate information but 3 Hours after Update should have been enough time. Here is a link to the Pics/Screenshots i took; https://imgur.com/a/KwFrXmm
I'll try to reproduce this.

@Gryffen1971
Copy link
Author

Update;
After restarting CKAN, It still did not Auto-Detect those Mod(s). So, i removed the Folders and Installed them with No Problem. So, The Question still remains, Why did CKAN not Auto-Detect Manually Installed Mods?

@HebaruSan
Copy link
Member

See above;

The AD functionality has always been very limited; it works by finding all the DLLs under GameData that CKAN didn't install, and checking if any of their filenames exactly match the identifier of a known mod. So for example in order for OPT Space Plane Parts to be auto-detected, you would have to have a file somewhere in your GameData called OPTSpacePlaneParts.dll (and you can confirm this by manually creating an empty file with that name and then launching CKAN again). You state that it used to work differently, but more likely is that in those older versions you tested it with mods where this heuristic works successfully, e.g. ModuleManager.

@Gryffen1971
Copy link
Author

I figured as much. Thanks again for the help. Also, i did post my suggestion in the proper area. What do you think of it?

@HebaruSan
Copy link
Member

I think reducing the size of registry.json is definitely something we'd like to do if we can find a way to do it without breaking things, and there's been some discussion of it previously.

So is there anything we still need to figure out for this issue?

@Gryffen1971
Copy link
Author

Not aat this time. If, any other problems i will submit a New Issue. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Issues that are support requests
Projects
None yet
Development

No branches or pull requests

2 participants