Jump to content

Scripting questions/help needed


Recommended Posts

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

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

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

https://www.sevenforums.com/tutorials/27778-open-command-window-here.html

Make 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

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

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

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

  • Recently Browsing   0 members

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