lopez125 Posted May 24, 2012 Share Posted May 24, 2012 (edited) So i've been trying to tinker with a mod i have since earlier today i ran into a glitch where i instantly die after coming out of prison. i've been trying to circumvent this, and i've succeeded to a degree. However the new .pex file that is compiled from the .psc renders other aspects of the mod non-functional. After comparing the original .pex with the new one i've noticed a ~4 or 5 kb discrepency in size, and i'm wondering if perhaps the modder didn't include all the code in the .psc they distributed for general use. So i'm asking is there a way that i can convert the original .pex into a .psc so that i can look at the code in that specifically and edited more accurately? sorry if this is a really basic thing or has been asked before (i'm new to modding and such, normally i only install them, i don't typically tinker/make them) also should my scripts folder have .pex of all the same .psc's in the source folder? (just incase i compiled something wrong.) Edited May 24, 2012 by lopez125 Link to comment Share on other sites More sharing options...
AstralFire Posted May 24, 2012 Share Posted May 24, 2012 If a .pex is what I suspect it to be, the compiled version of the source code, converting back into the source code is notoriously difficult with that stuff. There's a decompiler located here: http://skyrim.nexusmods.com/downloads/file.php?id=2909 But you'll notice that while it is human-readable, it is not human-friendly, and will take some sorting to understand. Link to comment Share on other sites More sharing options...
lopez125 Posted May 24, 2012 Author Share Posted May 24, 2012 Thank you very much i will quickly try this out. Link to comment Share on other sites More sharing options...
Stingray1010 Posted March 29, 2015 Share Posted March 29, 2015 I love skyrim Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 29, 2015 Share Posted March 29, 2015 Myself I use a cmd line version: http://www.nexusmods.com/skyrim/mods/35307/?Works fine for me. Link to comment Share on other sites More sharing options...
cdcooley Posted March 29, 2015 Share Posted March 29, 2015 Myself I use a cmd line version: http://www.nexusmods.com/skyrim/mods/35307/?Works fine for me.That's definitely the best way I've found to deal with pex files. I even set it up as the default handler for pex files on my system. I haven't found any script that wouldn't recompile without editing and you get used to the fact that it uses the Function keyword for both events and functions, extra "self." and full parameter listings for every function call. Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 29, 2015 Share Posted March 29, 2015 The only thing it doesn't seem to keep intact is States. Link to comment Share on other sites More sharing options...
cdcooley Posted March 29, 2015 Share Posted March 29, 2015 The only thing it doesn't seem to keep intact is States.What do you mean? I haven't seen any problems. I know that it removes unused states but I assume that's because the compiler optimizes those out and doesn't include them in the pex files. Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 29, 2015 Share Posted March 29, 2015 The only thing it doesn't seem to keep intact is States.What do you mean? I haven't seen any problems. I know that it removes unused states but I assume that's because the compiler optimizes those out and doesn't include them in the pex files. Yep exacly what I mean.I noticed it with some pex files that use states, it seem to drop the states, even though the script would recompile without those states.I noticed first when I decompiled some UFO scripts and also some of my own custom planter scripts where I used states for different cycles. The states where removed, but the decomiler did comment that it had removed redundant states.But the states in my own scripts were required and used. As you said though it's not a problem as it's easy enough to follow functions and see where and if states are required or not. Link to comment Share on other sites More sharing options...
Recommended Posts