ParadoxosModManagerRework icon indicating copy to clipboard operation
ParadoxosModManagerRework copied to clipboard

[Critical] Playset functionality from last launcher update (2020.10) makes PMM impossible to work

Open deschain212 opened this issue 5 years ago • 19 comments

Stellaris now has a built in "playset" and now when you try applying it with your mod manager it overrides the mod manager config.

deschain212 avatar Aug 10 '20 19:08 deschain212

Can you try the following?:

  • Launch the game launcher
  • Launch PMM and apply your list
  • Launch the game through the launcher (without touching anything else than "play")

ThibautSF avatar Aug 10 '20 20:08 ThibautSF

Yea I tried that. It just doesnt apply the modlist anymore.

deschain212 avatar Aug 10 '20 22:08 deschain212

Apparently this was also added for Hearts of Iron IV and it also does not apply to it.

deschain212 avatar Aug 11 '20 00:08 deschain212

Hello, I met the same issue. Can you fix that? Thank you. By the way, Paradox seems use a weird method to build a playlist via a type of file called SQlite. Basically it is a database that builds references list to mods.

fgf1011 avatar Aug 11 '20 05:08 fgf1011

Same issus here.

The new launcher use SQlite to create mod list and the mod manager is no longer working.

please have a look, and save us from this painful experience of scrolling a hundred mods up and down.

KevinKevin-2020 avatar Aug 11 '20 05:08 KevinKevin-2020

6c7077f856aefd6ad681931688bdb3b 9507bafcd4c09b0457e0dcaa45fc754 8b45fe131ea7bf68a9b799ddf11e549

I tried to open the SQlite via a sqlitebrowser. However, I never learn CS before so I have no idea.

fgf1011 avatar Aug 11 '20 05:08 fgf1011

Games affected, all Paradox games using new launcher system.

  • Stellaris (tested)
  • Europa Universalis (supposed)
  • HoI4 (supposed and reported)
  • Imperator Rome (tested)

ThibautSF avatar Aug 11 '20 15:08 ThibautSF

TODO for development:

  • Study file used (looks like to be launcher-v2.sqlite)
  • Study database structure
  • Find a java library to query sqlite DB
  • Find workarounds to apply mods

Enhancements ideas:

  • Import lists from playset when PMM start (or as an option like: "Update my lists from Paradox launcher")
  • Apply a list will create a playset (or update the playset with same name)

ThibautSF avatar Aug 11 '20 15:08 ThibautSF

Note: Launching the game directly by it's executable (might be "stellaris.exe", I'm not sure because I'm not at home and can't check game folder...) should be an option.

  • Apply you mod list as usual
  • Don't start the game or launcher (through steam, nor PMM, nor GoG...)
  • Go in the game's install folder and use the direct executable

ThibautSF avatar Aug 11 '20 16:08 ThibautSF

I can confirm that the workaround works. Its the way to go for the time being.

deschain212 avatar Aug 11 '20 16:08 deschain212

Did exactly what @ThibautSF suggested to fix in HoI 4, with a clean install and few mods, still not working ( sorry for bad english)

KarlSchwartz avatar Aug 11 '20 17:08 KarlSchwartz

@KarlSchwartz @Crack-Attack The workaround works it's just that you cannot under any circumstances open the PDX Launcher as it will instantly overwrite your changes made via PMM. If you do you must reapply the PMM list again.

bcssov avatar Aug 14 '20 03:08 bcssov

@bcssov , I understand what you wrote, but I can assure you, that I was well aware that the launcher would interfere with the list, so I applied the list and launched through the exe, still, no results

KarlSchwartz avatar Aug 14 '20 10:08 KarlSchwartz

@bcssov Yeah nvm the workaround worked for me. I didn't test it properly.

Crack-Attack avatar Aug 14 '20 18:08 Crack-Attack

@ThibautSF Hi, I ran into this same issue and I threw together a solution. I've created a simple JS script that generates a SQL query that can be used to insert into the new sqlite db. At present it only generates the query; I ran it manually through an SQLite DB browser. I will attach it to this message. It is very rough but works - just needs modification to work with your code, make sure it works universally, and make it less hardcoded :)

Code follows below:

const dlcload = {"enabled_mods":["mod/ugc_2114559224.mod","mod/ugc_2183551683.mod"],"disabled_dlcs":[]};


const generateModDbQuery = (dlcLoadJson) => {
    let i = 0;
    const playsetId = "a3efbe94-2688-421a-8c83-ab3a242ce52e"; // Unique ID generated by launcher - not sure how to decode it. Just copy/pasted.
    const startValue = parseInt('3333333334', 16); // Sequence of mods is a 10-character hexidecimal string. Using this to convert it to int and generate new values in the loop below.
    let sql = `INSERT INTO playsets_mods VALUES `; // playsets_mods is the table that handles the mods-playsets many to many relationship.
    for (const mod of dlcLoadJson['enabled_mods']) {
        const nextValue = startValue + i;
        if (i) {
            sql += ', ';
        }
        sql += `('${playsetId}', (SELECT id FROM mods WHERE mods.gameRegistryId = '${mod}' LIMIT 1), '${nextValue.toString(16)}', 1)`;
        i++;
    }
    sql += ';';
    return sql;
}

const sql = generateModDbQuery(dlcload);
console.log(sql);

/*
Example output:

INSERT INTO playsets_mods VALUES ('a3efbe94-2688-421a-8c83-ab3a242ce52e', (SELECT id FROM mods WHERE mods.gameRegistryId = 'mod/ugc_2114559224.mod' LIMIT 1), '3333333334', 1), ('a3efbe94-2688-421a-8c83-ab3a242ce52e', (SELECT id FROM mods WHERE mods.gameRegistryId = 'mod/ugc_2183551683.mod' LIMIT 1), '3333333335', 1);

*/

mkemper31 avatar Aug 16 '20 06:08 mkemper31

@mkemper31 const playsetId = "a3efbe94-2688-421a-8c83-ab3a242ce52e" There's nothing to decode, this is what you call a GUID or UUID.

const startValue = parseInt('3333333334', 16); Well, not exactly a proper hex number you see in my test cases I've seen generated position values "33333333ci" or "333333333m" or "33333333bf" for example. If you decode the number and then sort by it you don't get the proper order which they seem to get. They seem to be sorting these strings alphabetically ;)

I just kinda fetch them from the database sort them the same way they're doing and then update all entries with my own hex numbers. I have no idea what they were thinking to be honest.

bcssov avatar Aug 16 '20 20:08 bcssov

Any news on the update?

deschain212 avatar Sep 12 '20 22:09 deschain212

If the mod manager directly launched Stellaris.exe instead of the paradox launcher, the problem would be mitigated.

Is there a way to make steam launch Stellaris.exe (or PMM) instead of the stupid paradox launcher?

shadoxxhd avatar Sep 29 '20 07:09 shadoxxhd

You can create a shortcut on your desktop to the stellaris.exe and launch that, instead of launching via PMM. PMM does not detect the location of your game installs to be able to run the exe directly at the moment I think.

bcssov avatar Sep 29 '20 11:09 bcssov