Forum Discussion
Thank you for your thorough testing!! That's exactly it!
I experimented a bit with scripts in my Terminal; I doubt the game is actually written in Python but I know mods use it, so I tried to test what os.walk() saw in my Mods folder.
Turns out os.walk() has an option called followlinks, which is set to False by default. So by default, Python will see files/folders that are symlinks, but will not go through a symlink directory without being told so with followlinks=True. That would explain all of your tests! Especially if a symlink to a file works, but not a symlink to a directory.
Here's the code I tested and the results it yielded if it's of any interest :
Here are my test files in context :
Here is my code :
import os rootdir = '/Users/user/Documents/Electronic Arts/Global Mods/Modern' # Chunk of code to ignore folders we do not care about dont_go_there = ['1Quarantine', 'BuildBuy', 'BuildBuyMods', 'CAS', 'CASMods', 'GameplayMods'] def has_keyword(path): results = [] for keyword in dont_go_there: results.append(keyword in path) return (True in results) # Going through folders and subfolders for full_path, subdirs, children in os.walk(rootdir, followlinks=False): if not has_keyword(full_path): print(full_path) print('\t Has the following subdirs =>', subdirs) print('\t Has the following files =>', children)
And running this with followlinks=False will yield the following result :
$ python3 test.py /Users/user/Documents/Electronic Arts/Global Mods/Modern Has the following subdirs => ['CAS', 'CASMods', 'TestSymlinkDirectory', 'BuildBuy', 'GameplayMods', '1Quarantine', 'BuildBuyMods'] Has the following files => ['.DS_Store', 'TestSylinkFile.sh', 'Resource.cfg']
So it can see TestSymlinkDirectory as a child of Modern, but it doesn't go through. TestSylinkFile.sh is here no problem.
If followlinks is set to true however, it will list the directory and its children :
$ python3 test.py /Users/user/Documents/Electronic Arts/Global Mods/Modern Has the following subdirs => ['CAS', 'CASMods', 'TestSymlinkDirectory', 'BuildBuy', 'GameplayMods', '1Quarantine', 'BuildBuyMods'] Has the following files => ['.DS_Store', 'TestSylinkFile.sh', 'Resource.cfg'] /Users/user/Documents/Electronic Arts/Global Mods/Modern/TestSymlinkDirectory Has the following subdirs => ['CAS', 'CASMods', 'BuildBuy', 'BuildBuyMods'] Has the following files => ['.DS_Store']
I guess there could be an equivalent "issue" in the game code?
What blows my mind is that the Windows build isn't tripped up by the use of symlinks inside the Mods folder, and I would have thought the same bit of in-game code was used for both platforms. So either the way files are loaded is different between the builds (and a tiny parameter is missing); or the way the same bit of code is executed changes between Windows and Mac OS systems. That's actually pretty cool to know!
I'm sorry, it's my first time using Answers HQ; could you tell me how I could "report" this to the developers?
I don't have much hope of seeing it fixed -- if the "Me too" button could go sub-zero, that'd be for me and my weird use-case -- and it's not like it's a real problem, but I think it'd be a shame to lose such a nifty feature between the two platforms 😅
Thank you again for all your help!
That is so interesting, thanks so much for taking the time to post the explanation. I have no experience of Python but it is something I want to learn, it's near the top of the to do list 🙂
I'm forwarding this to EA QV. I don't hold out much hope they will do anything, it isn't exactly game breaking but I like to think someone will take an interest 🙂
About The Sims 4 Technical Issues - Mac
Community Highlights
Recent Discussions
- 2 hours ago
- 16 hours ago