ZerbuTabek
11 years agoRising Hotshot
@SimGuruModSquad: How do you override a default Python file? [Updated]
The official documentation said you could override default Python files:
So, I've been trying to override the buff.pyo file. I did exactly what it said, and put all files in the "buffs" folder in with my mod.
However, the game still won't acknowledge any changes I make. It appears in the "Script Mods" list, but nothing happens.
To see if the game was acknowledging the scripts at all or if it was just a problem with my changes, I tried intentionally breaking the code to the point it would normally cause the game to crash or glitch severely. It still didn't do anything, it just ran normally as if the script wasn't there.
UPDATE:
I tried creating a subdirectory within the .zip file, and that got me somewhere. It caused the game to crash upon trying to load a lot. I tried it with unedited copies of recompiled PYO files, but it still crashed. At least it's a step further than the game ignoring them.
UPDATE 2:
I tried it with just the default PYO files, not recompiled or anything, and got no crash. I think I can safely assume it's an issue with the decompiler, unless there's special steps that need to be taken to compile an override (but I'm not going to get my hopes up on that :().
You can override Maxis Scripts, however to avoid breaking the game your Scripts should preserve the existing Maxis APIs where possible. To override a Script in a sub-package (a Script in a subdirectory containing an “__init__.pyo” file), your Mod must include all other files in the same directory. This type of Mod may need to be updated when the game is updated so it is recommended that this is avoided where possible.
So, I've been trying to override the buff.pyo file. I did exactly what it said, and put all files in the "buffs" folder in with my mod.
However, the game still won't acknowledge any changes I make. It appears in the "Script Mods" list, but nothing happens.
To see if the game was acknowledging the scripts at all or if it was just a problem with my changes, I tried intentionally breaking the code to the point it would normally cause the game to crash or glitch severely. It still didn't do anything, it just ran normally as if the script wasn't there.
UPDATE:
I tried creating a subdirectory within the .zip file, and that got me somewhere. It caused the game to crash upon trying to load a lot. I tried it with unedited copies of recompiled PYO files, but it still crashed. At least it's a step further than the game ignoring them.
UPDATE 2:
I tried it with just the default PYO files, not recompiled or anything, and got no crash. I think I can safely assume it's an issue with the decompiler, unless there's special steps that need to be taken to compile an override (but I'm not going to get my hopes up on that :().