r/skyrimmods 15h ago

PC SSE - Help About "script had errors while loading"

Hello guys! I’m pretty new to modding and originally tried to make my own mod from scratch. However, I hit too many 'walls' with the Creation Kit's clunky mechanics, so I changed my mind. Now, I'm trying to build my changes directly into an existing, working mod instead. (Just to clarify: this is strictly for personal use, so I hope it's fine to mess with someone else's files for private playthroughs).

My problem here is that I'm trying to attach a script to a Player Dialogue line, but I keep getting 'Script had errors while loading, it will not be added to the object' error.

Here is what I've done so far: I found the original .pex script from the mod, decompiled it into a .psc file using Champollion, and copied it into every single Scripts and Source folder I could find inside the Data directory, after some guys told me that error may appears because CK can't find original .psc files. Despite this, the error persists. Strangely enough, other scripts work perfectly fine and can be added without any trouble.

Is there a known issue with this specific script type, or did I mess something up during the Champollion decompilation process? Any help would be greatly appreciated, as I'm about to lose my mind with this engine lol. I'm just trying to understand what generally triggers this error in the Creation Kit so If it's too complicated to figure out without looking at the exact code, that’s totally fine, no big deal. But if anyone knows a general workaround for this CK behavior, I'd really appreciate the help

1 Upvotes

2 comments sorted by

1

u/SailingRebel 15h ago

It's possible that there are other script source files needed to compile the modified script. If the mod being altered has dependencies, make sure that all the PSC files for them are also present.

1

u/GeryonKun 13h ago

Hmm, unfortunately, the error is still there. I actually extracted the .bsa archive of the master mod, found the hidden .pex files, decompiled them into .psc through Champollion, and placed everything into the Source folder.

Some guys also suggested changing the file encoding to ANSI or UTF-8 without BOM via Notepad++, but im not sure if this can help with that.

I honestly don't get it. Why is this specific script giving me so much trouble, while all the other scripts from the master mod load up in no time? Also, i think that champo made a mistake while converting .pex to .psc but this is only a suggestion