Vanilla scripts vs new scripts

Post » Fri Nov 16, 2012 6:59 pm

Hey guys, why do some people use vanilla scripts and others create new ones?

For example OnRead(), why bother making your own if what you want is simple and already has a vanilla script?

Can using vanilla ones break them some how? Or is it just habit to make your own?
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Fri Nov 16, 2012 3:09 pm

What do you mean? I use both. I use a lot of the default vanilla scripts (DefaultSceneStart, etc), and if it's too specific or I don't know of a vanilla one that meets my needs, I make my own.
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Fri Nov 16, 2012 1:31 pm

Well all of the tutorials I've seen mate, and posts I've read, lean towards making a new script. Even just for OnActivate or OnRead and things like that.

I've though about just using a vanilla script that does the job, but was worried if I add something extra, like if and endif etc, would that change every script that uses that vanilla script?
User avatar
Jon O
 
Posts: 3270
Joined: Wed Nov 28, 2007 9:48 pm

Post » Fri Nov 16, 2012 8:50 am

OnRead is an event and, while merely activating a reference to a BOOK form will make the player read it, nothing else will happen when it's read unless its script has an OnRead event which will run whatever code is in the event . *Nobody has made their own events as they'd not be triggered unless as a function is from a script.

*SKSE is working on it
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Fri Nov 16, 2012 5:54 pm

OnRead is an event and, while merely activating a reference to a BOOK form will make the player read it, nothing else will happen when it's read unless its script has an OnRead event which will run whatever code is in the event . *Nobody has made their own events as they'd not be triggered unless as a function is from a script.

*SKSE is working on it

Thanks mate, I know that. Was just worried if say I add a script, and choose whichever one has OnRead, then edit that script with my event and stuff, does that script then get changed for any object that uses that same vanilla script I started with?
User avatar
Celestine Stardust
 
Posts: 3390
Joined: Fri Dec 01, 2006 11:22 pm

Post » Fri Nov 16, 2012 9:43 am

Thanks mate, I know that. Was just worried if say I add a script, and choose whichever one has OnRead, then edit that script with my event and stuff, does that script then get changed for any object that uses that same vanilla script I started with?
Yeah, altering a vanilla script will alter the behavior of anything the script is glued to which is why it's a far better practice to make your own script that you can tailor it to your needs.
User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am

Post » Fri Nov 16, 2012 9:52 am

Or you can put it so: It is perfectly OK to use a vanilla script, but it is potentially very dangerous to edit a vanilla script (especially for a published mod). It's something like editing the base object vs an instance (more ore less).
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Fri Nov 16, 2012 4:06 pm

Ok chaps thanks for the posts :) I was right to prefer making new scripts, luckily I have only been testing scripts in test ESP file rather than my actual mod.
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Fri Nov 16, 2012 5:35 pm

there are many reasons for this, it is some times faster to create a new script than go thru all of beth's scripts to see if you can find one that does what you want.
Also people create new scripts so that they can learn how to script by them self.
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm


Return to V - Skyrim