bcssov / IronyModManager

Mod Manager for Paradox Games. Official Discord: https://discord.gg/t9JmY8KFrV
https://bcssov.github.io/IronyModManager/
MIT License
343 stars 41 forks source link

Stellaris - Certain Inline Scripts from Patch Mod don't take effect in-game #504

Closed lnodiv closed 3 months ago

lnodiv commented 3 months ago

Describe the bug Had some issues sorting out compatibility between two mods - Bug Branch and Venture Politics. Both edit the new file common\inline_scripts\regular_empire_capital_jobs.txt which is meant to make compatibility for capital jobs easier.

The conflict between two showed up correctly in the Conflict Solver, and I was able to make a patch (for this and 200+ other conflicts, all told).

In-game, capital buildings were still only taking the inline script from the mod that was loaded last, without regard for the changes in the patch mod. All other changes in the patch mod were verified to be working.

Resolved by manually editing the last-loading mod file contents to be identical to the patch mod, which made it work - so it's not a bad patch.

To Reproduce Steps to reproduce the behavior:

  1. Download both mods listed above
  2. Patch the two mods.
  3. Load up a new game and select a civic that changes ruler jobs from the mod that doesn't load last (eg. load Venture Politics last and take the Warlord civic)
  4. Observe that you just have default ruler jobs based on your empire type instead of the civic-based ones
bcssov commented 3 months ago

It cannot selectively work, it either does or does not work. What you are describing is either:

  1. User error
  2. Game error where it fails (refuses to load)
lnodiv commented 3 months ago

This is reproducible with only these two mods, patching only that file. With regard to this file, the game ignores the patch mod in favor of the mod loading last in the load order.

Any other elements of the patch mod work fine, if you patch other files.

lnodiv commented 3 months ago

zzz_00000001regular_empire_capital_jobs.txt Here's an example patch. For this one I just ignored other conflicts and patched only this one.

1) Load Bug Branch first, Venture Politics second. 2) Use the contents of this file as the resolution for the conflict in regular_empire_capital_job 3) Load game, make a race with eg. the Warlord Civic. 4) Note that on game load, your capital building is missing the Commander job and the localization indicating it should have it.

Close the game.

5) Edit the regular_empire_capital_job overwrite provided by the last loading mod (Venture Politics) instead 6) Overwrite it with the contents of the patch file instead. 7) Repeat test, note that all jobs show correctly.

The same thing happens if you swap the load order and use a civic from Venture politics. In either case, the patch for this file specifically seems to lose priority to whatever is in the load order for some reason.

bcssov commented 3 months ago

Ah, now that I can confirm as a bug in Irony. Seems like a regression somewhere the generated file name should not have any prefixes or suffixes.

Fixed with this commit: https://github.com/bcssov/IronyModManager/commit/1a22ba1d547912c5491c5c202a73166da80e4038