Editing Scripts

Post » Mon Dec 12, 2011 10:42 pm

So, I'm trying to make a patch mod that will alter the contents of a specific script. Basically I'm just trying to add some conditions to an existing script from an ESP file, then save the change in a separate patch.

I've created the patch mod file, assigned the masters properly, and copied the script as override via TES4EDIT.

What I'm trying to figure out if there's a way to actually edit the script contents with an expanded editing window via TES4EDIT, as opposed to just editing the "SCTX" line which is a bit awkward since you can only see one line of the script at a time. The other problem of course is that it doesn't actually result in the change getting compiled into the SCDA line, which means the change has no actual effect in game. If I click on the SCTX line in TES4EDIT I can get an expanded window, but it appears to be read only and I can't actually make any changes there.

What am I missing? Or is TES4EDIT just not an effective means of editing script contents and, if so, is there a better tool to use other than the Construction Set?

After spending quite a bit of time trying to figure out how to do this effectively, I made a backup copy of the original ESP file, edited the file directly, then copied that modified script as override to my patch, then went replaced my modified copy of the original ESP with the original unmodified copy. So, I was able to get something that did what I wanted, but at the same time it seemed like I needed to jump through a lot of hoops to get it. I couldn't edit the patch directly through the CS without it crashing on save, even when using the "esmify master" option in Wrye Bash, so I was looking for a way to do this in an external utility.
User avatar
Alada Vaginah
 
Posts: 3368
Joined: Sun Jun 25, 2006 8:31 pm

Post » Mon Dec 12, 2011 6:39 pm

Geez, that whole issue of not being able to use an .esp as a master was solved ages ago by Wrye Bash's 'esmify self' toggle, and has been totally squashed by the http://www.tesnexus.com/downloads/file.php?id=36370, which allows any esp you load to be used as a master and even setting masters as active file.
And of course you can't edit a script in TES4Edit and hope it compiles. Unless you can write in hexadecimal somehow, and figure the compiled size, and a lot of other things that the compiler does, so that us mere mortals can simply write commands in English in the CS script window and allow the human-machine protocols to do the rest :P
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Tue Dec 13, 2011 1:36 am

Geez, that whole issue of not being able to use an .esp as a master was solved ages ago by Wrye Bash's 'esmify self' toggle, and has been totally squashed by the http://www.tesnexus.com/downloads/file.php?id=36370, which allows any esp you load to be used as a master and even setting masters as active file.
And of course you can't edit a script in TES4Edit and hope it compiles. Unless you can write in hexadecimal somehow, and figure the compiled size, and a lot of other things that the compiler does, so that us mere mortals can simply write commands in English in the CS script window and allow the human-machine protocols to do the rest :P


Thanks, I'll take a look at the CS Extender. As mentioned, I had already tried the esmify self toggle but for whatever reason it wasn't working in this particular case without the CS crashing on save.
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Mon Dec 12, 2011 8:03 pm

Thanks, I'll take a look at the CS Extender. As mentioned, I had already tried the esmify self toggle but for whatever reason it wasn't working in this particular case without the CS crashing on save.

Another old bug, and another reason why the CS Extender is a gift of the gods given to us through the prophet ShadeMe :bowdown: . For historical records, if the CS was crashing on save when using esp as master it meant that you had to make an edit to anything in the Tamriel worldspace (I always moved a rock near the Abandoned Mine). It also meant you had to clean that afterwards, and that your mod would probably inherit a lot of dialogue, worldspace and/or cell dirty edits which had also to be cleaned in TES4Edit (and which an awful lot of people just left there)

Edit: I do sound like a Csixtender zealot, sorry, I hadn't read that last part where you explain you already tried with esmifying.
User avatar
Matt Gammond
 
Posts: 3410
Joined: Mon Jul 02, 2007 2:38 pm

Post » Tue Dec 13, 2011 1:45 am

So, I'm trying to make a patch mod that will alter the contents of a specific script. Basically I'm just trying to add some conditions to an existing script from an ESP file, then save the change in a separate patch.
Except from the fact that you can use the CSE, here's how I have used to do it:
1. Take a copy of the main esp file
2. Open the esp file as the active file in the CS and change the scripts there and save it. Now test that the scripts work as intended
3. Open TES4Edit, and copy all your changed scripts as override into a new esp, which will get the main esp as master.
4. Delete your changed main esp, and replace it with the original.
Done :)
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Mon Dec 12, 2011 4:59 pm

Except from the fact that you can use the CSE, here's how I have used to do it:
1. Take a copy of the main esp file
2. Open the esp file as the active file in the CS and change the scripts there and save it. Now test that the scripts work as intended
3. Open TES4Edit, and copy all your changed scripts as override into a new esp, which will get the main esp as master.
4. Delete your changed main esp, and replace it with the original.
Done :)


Yeah, that's essentially how I did it after some trial and error - the CS Wikis are a bit out of date on that. I figured there had to be an easier way. :)
User avatar
Brandon Wilson
 
Posts: 3487
Joined: Sat Oct 13, 2007 1:31 am

Post » Tue Dec 13, 2011 12:58 am

In answer to the original question, in TES4Edit shift + Left double-click the SCTX field (this also works for any editable field) to open a large text-editing box, make your edits, then click the OK button at the bottom of the window.

But since TES4Edit doesn't compile scripts, you still need to launch the CS or CSE to compile the script. So you might as well just use CSE to edit the script rather than use TES4Edit.
User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm


Return to IV - Oblivion