Jump to content

convert .pex->.psc?


lopez125

Recommended Posts

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 by lopez125
Link to comment
Share on other sites

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

  • 2 years later...

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

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

 

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

  • Recently Browsing   0 members

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