WARNING about the new way scripts work!

Post » Sun Jun 17, 2012 5:29 pm

ok, I just discovered this, so sorry if this is obvious to most people but it was NOT obvious to me.

If you open a vanilla Skyrim script and edit it, IT IS CHANGED FOREVER (unless you back it up first) because the files are saved outside of the esp file you are working with.

BE VERY CAREFUL not to "experiment" with a vanilla script unless you have the script file backed up first!

I did this, then closed my CK and the ESP file without saving the esp, but when I next opened the CK the scripts were still changed even though I did not save that session.

This is very different from Oblivion, the scripts were copied to the esp file and you would change that copy of the script there in the esp file not on your hard-dive.

Now maybe this is only for the CK and not for the game, I do not know that yet. Meaning the script is saved to the hard dive for the CK to work with but for the game it then gets saved into the ESP, I mean it would have to I guess...

I hope I am somehow wrong about this, but I thought I would post what I saw happen just in case...
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Mon Jun 18, 2012 2:15 am

I don't (think) that's the case. Scripts are saved in your \Skyrim\Data\Scripts\Source (and there is a Backup and temp folder as well).
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Mon Jun 18, 2012 1:59 am

ok, so why did the test script and the altered script show up in the script manager when I restarted the CK?

Is it just reading it from the temp folder? But why would it, that is going to make the script manger very cluttered with junk if that is the case.

I don't (think) that's the case. Scripts are saved in your \Skyrim\Data\Scripts\Source (and there is a Backup and temp folder as well).
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Sun Jun 17, 2012 2:22 pm

The compiled files are the same ones used by the game, so yes, any changes you make will persist into your game if you leave compiled files laying around. The PEX files are easy enough to deal with. You can just delete any you didn't intend to change since all the ones the game came with are inside of a BSA. The source code though, yeah, you need to be careful about that. Should you need the vanilla files back, you can have Steam do a validation check on the CK's cache files. Just be warned this will ALSO wipe out anything you DID intend to change along with it. So if you change something and want it to stay changed, back those up as well. I bit myself in the ass on that once during the beta and am not keen on doing it again :P
User avatar
Dark Mogul
 
Posts: 3438
Joined: Tue Feb 20, 2007 11:51 am

Post » Sun Jun 17, 2012 8:34 pm

OH yeah I SSSsoooooo knew something like that was up... wow scary....they need to make that a big warring in the wiki. I guess i will do that tommorow if no one else does it first and I am allowed to do so (is the wiki open to the public to edit?), I am 3 hours past my bedtime now and cannot think very well right now.

sleep time for me....

The compiled files are the same ones used by the game, so yes, any changes you make will persist into your game if you leave compiled files laying around. The PEX files are easy enough to deal with. You can just delete any you didn't intend to change since all the ones the game came with are inside of a BSA. The source code though, yeah, you need to be careful about that. Should you need the vanilla files back, you can have Steam do a validation check on the CK's cache files. Just be warned this will ALSO wipe out anything you DID intend to change along with it. So if you change something and want it to stay changed, back those up as well. I bit myself in the ass on that once during the beta and am not keen on doing it again :tongue:
User avatar
Averielle Garcia
 
Posts: 3491
Joined: Fri Aug 24, 2007 3:41 pm

Post » Mon Jun 18, 2012 3:54 am

The wiki is open for anyone to edit, yes.

You can always restore the uncompiled scripts via Steam's "Verify Tool Cache Integrity" functionality (via the Creation Kit's properties), and deleting any compiled scripts will cause Skyrim to use the default ones in the BSA again.

I've set up an SVN repository for my Scripts folder so I can track any changes made by me or patches, as well as having a history.

Cipscis
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am

Post » Sun Jun 17, 2012 5:27 pm

While I'm sure this is a great functionality in some way, it mostly seems like a hassle...
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Mon Jun 18, 2012 3:28 am

Wow, that is a major issue. Perhaps a dev will step in here and explain how their development systems are setup so that we can more easily work around this issue.
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Sun Jun 17, 2012 6:41 pm

The wiki is open for anyone to edit, yes.

Sorry, where is the wiki? I can't find any links in pinned threads or elsewhere.
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Mon Jun 18, 2012 1:28 am

http://www.creationkit.com
User avatar
Rudy Paint fingers
 
Posts: 3416
Joined: Sun Nov 11, 2007 1:52 am

Post » Sun Jun 17, 2012 7:09 pm

http://www.creationkit.com
http://www.creationkit.com
Thanks!
User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Sun Jun 17, 2012 11:58 pm

Wow, that is a major issue. Perhaps a dev will step in here and explain how their development systems are setup so that we can more easily work around this issue.

Our file setup is the same as what is installed with the Creation Kit, though we use a third party version-control system at the studio. As mentioned, Papyrus scripts exist outside of the plugin/master file data, which means that a change to any base-game script will persist across any plugin you may be working on. It's recommended that you back up the PSC source file of any script you wish to modify. If you get in a situation where you simply want to restore all your source scripts to their original state, a re-install of the Creation Kit will overwrite the contents of your Skyrim/Data/Scripts/Source directory.

As a rule of thumb, it may be wise to add new/additional scripts to objects rather than modifying pre-existing scripts - when possible. You can delete scripts from objects at the base object and reference levels, which is a plugin-based change.

It's important to remember that Papyrus isn't a new version of scripting from previous editors - it's completely new, and transitioning will require some effort for those used to the legacy systems. It certainly took us some time to acclimate, too! Please take some time to go over thehttp://www.creationkit.com/Differences_from_Previous_Scripting that have been written for you.
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Sun Jun 17, 2012 2:47 pm

Where are the PEX files? I would like to delete them (the ones I may have made as a test) as I am not sure what mess I made while trying to get familiar with the scripting manager.

I did a key word search on my DATA folder and only found the pcs files.

Also, why did the test PCS files get compiled (according to the script manger) as I NEVER clicked on the file to compile it myself and I do not have Notepad ++ set up yet to compile. But the script manager says my test script called aadpTest is complied YES and has source YES ???

I do not think I understand this issue enough (where the script changes are saved to your game even if you do not save your ESP file) to edit a warning into the Wiki on this subject. Someone else should do this.



The compiled files are the same ones used by the game, so yes, any changes you make will persist into your game if you leave compiled files laying around. The PEX files are easy enough to deal with. You can just delete any you didn't intend to change since all the ones the game came with are inside of a BSA. The source code though, yeah, you need to be careful about that. Should you need the vanilla files back, you can have Steam do a validation check on the CK's cache files. Just be warned this will ALSO wipe out anything you DID intend to change along with it. So if you change something and want it to stay changed, back those up as well. I bit myself in the ass on that once during the beta and am not keen on doing it again :tongue:
User avatar
Logan Greenwood
 
Posts: 3416
Joined: Mon Jul 30, 2007 5:41 pm

Post » Sun Jun 17, 2012 11:14 pm

I did a key word search on my DATA folder and only found the pcs files.

Then you have only changed the sources and not compiled them.

The compiled scripts that shipped with the game are in "Skyrim - Misc.bsa" The Script Manager only tells you that those scripts are already compiled (that's to make sure you don't forget to compile your own scripts.)


Scripts work now like in most other games: Sourcecode and compiled script are separated and you don't need to share your sourcecode if you'd like to keep your knowhow for yourself.
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Sun Jun 17, 2012 11:01 pm

Thanks Joel. Does the version of the CK you guys use have actual buttons in it for the VCS, so you can stay int he tool to check things in and out?

Scripts work now like in most other games: Sourcecode and compiled script are separated and you don't need to share your sourcecode if you'd like to keep your knowhow for yourself.
Hmm, I never thought of it like that. That is unfortunate, I liked looking at other people's code to get ideas on how to do things. The old method was also useful in that if you had a HD crash, and lost all your work, you could just download your mod from a site and have all your source code again. I hope someone comes up with a really good decompiler.
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Sun Jun 17, 2012 10:33 pm

You can delete scripts from objects at the base object and reference levels, which is a plugin-based change.

So you say. I've tried to do that, deleting the original script and inserting a modified one, which finally made it work like I wanted it to. Somewhat. There's still oddities however, it'll return two of an item rather than one, for example. So I changed my script to not do anything, and went ingame to try it out, and it worked exactly like it had in vanilla skyrim, even though that script shouldn't be used by the object anymore.
So yeah, how, -exactly- does it work? And do anyone have some advice about how to make only my version of the script run?
User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm


Return to V - Skyrim