WhiskeyRiver2 Posted April 1, 2017 Share Posted April 1, 2017 I'm working on adding some new weapon mods to a certain well-known, rather popular mod, but I've run into a snag. Specifically, I can't get the new suppressors to function with our on-the-fly switch script(s). All I have are the relevant .pex files, so I'm wondering if it's possible to convert them to readable, editable plaintext so I can figure out how they work, make whatever changes/additions need to be made, and then save/recompile them with the new functions/additions. Or, as I'm worried, am I just straight-up screwed without the .psc or source files for these scripts? Link to comment Share on other sites More sharing options...
Greslin Posted April 1, 2017 Share Posted April 1, 2017 Decompile, my friend: http://www.nexusmods.com/fallout4/mods/3742/? Link to comment Share on other sites More sharing options...
WhiskeyRiver2 Posted April 1, 2017 Author Share Posted April 1, 2017 Ok, now how the hell do I use the decompiler? I have literally no idea what I'm doing here, and there's no instructions included (at least, none I can make sense of from either of the two ReadMe files). Link to comment Share on other sites More sharing options...
scrivener07 Posted April 1, 2017 Share Posted April 1, 2017 Like greslin said, Champollion is very reliable. Link to comment Share on other sites More sharing options...
scrivener07 Posted April 1, 2017 Share Posted April 1, 2017 You ninja'd me :smile:Unzip the Champollion exe somewhere on your computer then go up a directory so your looking at the folder that contains "Champollion.exe". Right click that folder and select "Open command window here". Now enter the command to interact with the decompile program. Champollion.exe "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\SomeFolderWithPexFiles" You type out "Champollion.exe" without the quotes and then pass the full path to the folder that contains pex files which can be anywhere on your computer.edit: The command is not recursive in the case there are sub-folders. Link to comment Share on other sites More sharing options...
WhiskeyRiver2 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) Huh, seems simple enough... And then to edit the resulting file, I'd use something like Notepad++ (which I've had for ages), right? Edit: I'm not seeing an "Open command window" prompt when I right-click the directory I extracted Champollion to. Edited April 1, 2017 by WhiskeyRiver2 Link to comment Share on other sites More sharing options...
scrivener07 Posted April 1, 2017 Share Posted April 1, 2017 https://www.sevenforums.com/tutorials/27778-open-command-window-here.htmlMake sure you right click ON the folder. Edit: If you want to execute the commands with a batch script you can also use something like this, obviously edited to your needs. CALL "D:\Games\Steam\SteamApps\common\Fallout 4\Tools\Champollion\Champollion.exe" "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\SomeFolderWithPexFiles" CMD /k The first line is the same as you would on the command line and the second line keeps the command window open after the command has been run.Save the code above to a text file and change the file extension to .bat as in something like "MyChampScript.bat" Link to comment Share on other sites More sharing options...
WhiskeyRiver2 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) Oh, it's Shift+Right Click, not just right click.... *facepalm* Now to figure out how to tell it to put the .psc in a specific place... Edit: Nevermind, I see it just dumps it straight into the root FO4 directory. Nifty. Edit 2: Good news - now I know how to decompile scripts. Bad news - either my hunch on why the script(s) weren't working with the new cans is wrong, or I'm just an idiot and can't read Papyrus worth a damn. Edited April 1, 2017 by WhiskeyRiver2 Link to comment Share on other sites More sharing options...
scrivener07 Posted April 1, 2017 Share Posted April 1, 2017 I cant say anything about the papyrus source I cant see but I can help with changing the out directory for the decompiler. CALL "D:\Games\Steam\SteamApps\common\Fallout 4\Tools\Champollion\Champollion.exe" "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\SomeFolderWithPexFiles" -p"C:\Users\Scrivener07\Desktop\Out" CMD /k You can use the -p switch to set the out directory. For this example I changed it to output to a folder called "Out" on my desktop. Link to comment Share on other sites More sharing options...
WhiskeyRiver2 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) OK, turns out I could have avoided all this.... Just noticed a few minutes ago that there are placeholder entries in the .esp that're (mostly) set up already. Just finished building out a set and confirmed that they work like they should. Trying not to facepalm too hard at my own stupidity, never thought to check for that sort of thing. Edit: Thanks for the help though. Always happy to learn something new. Edited April 1, 2017 by WhiskeyRiver2 Link to comment Share on other sites More sharing options...
Recommended Posts