Jump to content

[tool] Python script that checks what files that mods overwrite


Recommended Posts

I just created it because I wanted to know how my load order interacts, kinda like how the mod organizer for Skyrim does it. Might or might not be useful for others, so uploading it here. Unknown if it works for machines other than mine, but will only work on Windows.

 

Feel free to rewrite or adapt or create a real mod manager from it. I might have made the wrong assumptions, so it can be totally wrong.

ck3_mod_overwrite_finder.py

Link to comment

Excuse me if I am being dumb, but when I try to run it it spouts out
Traceback (most recent call last):
 

  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 110, in <module>
    print_overwrites(include_base_game=False)
  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 94, in print_overwrites
    mods = get_current_playset()
  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 44, in get_current_playset
    ck3_docpath = os.path.join(os.path.expanduser,("~"), 'OneDrive', 'Documents', 'Paradox Interactive', 'Crusader Kings III')
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 104, in join
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not function

and refuses to work
How can I directly link the path to the code? Sorry, I've never been all that great with code, and also have never used Python.

Link to comment
On 9/22/2022 at 3:23 PM, prto204 said:

Excuse me if I am being dumb, but when I try to run it it spouts out
Traceback (most recent call last):
 

  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 110, in <module>
    print_overwrites(include_base_game=False)
  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 94, in print_overwrites
    mods = get_current_playset()
  File "C:\Users\user\ck3_mod_overwrite_finder.py", line 44, in get_current_playset
    ck3_docpath = os.path.join(os.path.expanduser,("~"), 'OneDrive', 'Documents', 'Paradox Interactive', 'Crusader Kings III')
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 104, in join
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not function

and refuses to work
How can I directly link the path to the code? Sorry, I've never been all that great with code, and also have never used Python.


 

os.path.join(os.path.expanduser,("~")

You have inserted a comma here, maybe it will work if you remove it. My My Documents folder is in the default location, so I cannot test it, but perhaps I can look into a more generic fix anyway.

Link to comment

So I just tested it and at first I got an error

Traceback (most recent call last):
  File "C:\Users\redacted\Downloads\ck3_mod_overwrite_finder(1).py", line 125, in <module>
    print_overwrites(include_base_game=False)
  File "C:\Users\redacted\Downloads\ck3_mod_overwrite_finder(1).py", line 115, in print_overwrites
    os.chdir(path)
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'mod/Carnalitas'         #it means 'system cannot find the specified path' in german.

 

BUT after I changed the current playset to another one. It worked!

and after changing back, well this also worked.

 

Sooo thank u very much. for this tool?

 

Edited by nYidentity
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use