Jump to content

Editing a Script file


Recommended Posts

Posted

Hi.

 

I suppose the script is from a mod or it is a vanilla script (does not really matter.)

Many mods (and all vanilla stuff) come with the source script files.

They are files inside a subfolder called Scripts/Sources/ and the extension is .psc

 

They can be edited with any text editor, but then you need to compile them.

CK is the quickest way to compile a script (but not the best.)

 

But if you are missing the psc file, then you have two possibilities:

1) The mod (or vanilla stuff) is provided with a BSA archive: just uncompress it with a BSA tool and you get the scripts

2) There are only PSX files but not PSC files. In this case, the source is not provided, but usually, you can use a de-scripter (for example Orvid's Champollion) to re-create the PSC file (you will lose just the comments and the original name of internal variables.)

 

 

 

If you are not successful, just let me know, and I will try to help.

Posted

For source files you can just use a text editor.

Preferably one that can compile or build the pex script file which the game needs too.

I'm using Sublime Text, and I can definitely recommend it.

You need to build a script folder that contains all the scripts from the Vanilla game, from SKSE and from the utility and framework mods that you are using for this btw. Just follow the mod load order and copy the relevant script source files from the mods you are using beginning with the lowest priority mods. It's a bit of a hassle but not being forced to use the CK is a huge plus.

Don't start this text editor from inside you mod manager btw, that doesn't work.

 

If the source file is missing there are tools to convert the pex file back into psc format. Like this one here for example.

 

Oh, I see, CPU was faster. Well, two are better than one or something like that. ;)

Posted

But be warned
While decompile there is tweaks that needed for scene-quest-topic scripts. Because all decompiled scripts work well only for 'plain' ones, ones that have no 'fragments' that stored in .esm/.esp itself.
As example quest script.
1 I just commented all decompiled code
2 Open mod in CK
3 Go through all 'stages' entries with findind which fragment is used for stage. Use 'Advanced' tab for reading this.
4 Delete all stage script entries via CK. Or you get errors with stupid 'counter' complains. Save. CK will re-create script with errors message - just ignore.
5 Open script and move all previously commented to bottom with not touch to auto-generated code.
6 Uncomment properties first. And never before it's done open properties in CK - you'll loose them and have to refill by self.
7 With copy-paste insert decompiled code to fragments

Kind Regards

Posted

But be warned

While decompile there is tweaks that needed for scene-quest-topic scripts. Because all decompiled scripts work well only for 'plain' ones, ones that have no 'fragments' that stored in .esm/.esp itself.

As example quest script.

1 I just commented all decompiled code

2 Open mod in CK

3 Go through all 'stages' entries with findind which fragment is used for stage. Use 'Advanced' tab for reading this.

4 Delete all stage script entries via CK. Or you get errors with stupid 'counter' complains. Save. CK will re-create script with errors message - just ignore.

5 Open script and move all previously commented to bottom with not touch to auto-generated code.

6 Uncomment properties first. And never before it's done open properties in CK - you'll loose them and have to refill by self.

7 With copy-paste insert decompiled code to fragments

 

Kind Regards

 

thanx for the tips! yea I think I'm gonna break things before I get it right. luckily I backup things a lot. wut I'm trying to do is edit out the little dancing sequence Caesia does when you give her a gift. (not sure if you all know that mod)

 

  • 2 weeks later...
Posted

what are .TIF files in the scripts folder? i thoughgt .tif files were image files but these are not image files but script related files (i'm assuming?)

 

Are you sure they're files ending with a .TIF extension, rather than .PSC files that start with TIF__ as their name? TIF scripts are just fragment scripts for Topic Info dialogs.

Posted

 

what are .TIF files in the scripts folder? i thoughgt .tif files were image files but these are not image files but script related files (i'm assuming?)

Are you sure they're files ending with a .TIF extension, rather than .PSC files that start with TIF__ as their name? TIF scripts are just fragment scripts for Topic Info dialogs.

sry ur right.

 

so wut tool would u recommend if i just wanted to READ the script files?

Posted

 

so wut tool would u recommend if i just wanted to READ the script files?

 

 

Any text editor works even the standard windows text editor. I would recommend Notepad++ though.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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