Jump to content

.Pex Scripting Editing & Recompiling


Recommended Posts

Hello I'm trying to open a .pex up tweak it & repackage it, the mod author abandoned the mod in 2012 and gave full permission to take over, so where do I begin to learn this? I'm trying to fix a flying mod that uses wings and has infinite stamina, I'm trying to remove the infinate stamina part to have it drain normally by messing around in Creation Kit. it looks as though this has been baked in to the custom script. I've never done this before so where should I begin to learn this?

the script is in the .pex am I missing something maybe simple in the creation kit as far as Maybe magic effect Values need to be changed?

 

I have a copy of the .pex if anyone knows how to open it up and look.

 

Thanks

Link to comment
Share on other sites

I am not an expert at scripting (at all), but generally there are two versions of a script in Skyrim/Papyrus, with those two being:

  • scriptname.pex - this is the 'compiled' version that is executed by Papyrus and is probably not intended to be edited or read
  • scriptname.psc - this is the 'source code' version, a human-readable and editable file that needs to be compiled to .pex before it can be run in-game, and the .psc one is probably the one you are after if you want to edit a script

If the mod has a .psc version of the script somewhere (it probably has the same name as the .pex one), then you can open the .psc with any text editor and start editing. When you have finished, you can recompile the .psc with the Papyrus Compiler somehow (for example there exists the Sublime Papyrus plugin for Sublime Text 3 if you happen to use that text editor). I have never compiled a script through the CK, but from what I have noticed, it should be possible to edit and compile a script through it.

 

There seem to exist tools to decompile .pex files back to .psc of sorts but I have never used them. If the mod does not include the .psc files, you could also try asking the author for them, if you really want to take over the mod. And I think it would be handy to ask the author anyway, as it sounds like you might be trying to port the mod to what could be considered another game of sorts (from normal Skyrim to SE?), if only to avoid any permission issues. But I am not sure. Also, the author might be able to describe to you how the mod works, exactly, so that you would not need to search around and try things out (assuming the author still remembers how the mod works)! :thumbsup:

Edited by Contrathetix
Link to comment
Share on other sites

I would try to see if you can get the original source scripts from the author because they will be better formatted and maybe even have comments.

But if that's not possible, use Champollion a PEX to Papyrus decompiler by li1nx. It will give you a working PSC version of the script you can edit and recompile. (And yes it's in the Skyrim section but scripting didn't change for the Special Edition.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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