Welcome to Gaia! ::

Reply Guild Recycle Bin
Quicksilver's Scripting Guide

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

llQuicksilverll

PostPosted: Thu Jul 14, 2005 7:38 am


So you wanna learn scripting huh? Well, its not that hard belive it or not, I can start you off, and from there you can play around with scripts of your own.

To begin lets make a simple script.

First we type "begin" and name our script,

Begin Script

like that. No problem.

now, this will be a short script with only one varible, so we add the var we want. Lets use OnPCEquip. Our script should now look like:

Begin Script

Short OnPCEquip


ok, now we want some "if"s. An "if" will check to see if somthing is true or false, and then execute an action.

Begin Script

Short OnPCEquip

If ( OnPCEquip == 1)


now we add an action

Begin Script

Short OnPCEquip

If ( OnPCEquip == 1)
ModReigion, "West Gash", 0, 5, 20, 0, 0, 70, 0, 5


ModRegion changes the weather chances for the RegionID. Used to get rid of, or add weathers to an area permanently. The values must add up to 100 or you will get odd results. (ModRegion, RegionID, clear_var, cloudy_var, foggy_var, overcast_var, rain_var, thunder_var, ash_var, blight_var)

Ok, now we have almost finished, all we need to do is end the "If" and our script.

Begin Script

Short OnPCEquip

If ( OnPCEquip == 1)
ModReigion, "West Gash", 0, 5, 20, 0, 0, 70, 0, 5
endif

End Script


So we finished the script, now what? Well, put the script on an eqipabble item, and try it out. It should make thunder storms much more common in the West Gash reigion. If anyone has anything else to add feel free.
PostPosted: Thu Jul 14, 2005 12:51 pm


What if you also added onto the current script, a script that would make it much more sunny in that area. Would it have thunderstorms in broad daylight, or would the script just not work.

Dr. Squirrel


llQuicksilverll

PostPosted: Thu Jul 14, 2005 1:05 pm


nope, you can only change current weather, weather percetiles. creating your own weather patter is a much harder mod.
PostPosted: Sun Jul 17, 2005 8:59 pm


Okay, from what I DID learn from the tutorial I downloaded on Morrowind Scripting, and this is something you didn't mention.

It's small, but you could also make it to where if you are NOT wearing a certain piece of armor, or wielding a certain weapon, than thunderstorms are more common.

By changing the number "1" to "0", it would mean false. So if the character was NOT wearing the armor that the script was put onto, thunderstorms would be more common.

In other words, and to clarify this for me as well, since I'm not entirely positive:

0 = false

1 = true

and any number above that, can be assigned its own value?


Is that correct?

Rukoric


Rukoric

PostPosted: Sun Jul 17, 2005 9:11 pm


And based upon ising the console in game, is it true, that you can use the commands in game, while making a script? Such as:

Begin Script

Short OnPCEquip

If ( OnPCEquip == 1)
Additem, "daedric_crescent_unique"
endif

End Script


____________________________

Specifically, this would be a fairly unstable mod, since it would give you one daedric crescent for every screenshot that runs across your screen.

Most computers these days, can run at least 70 a second, encumbering you in an instant.

But technically:

Wearing any armor that script was equiped to, would therefore give you a Daedric Crescent, correct?

"daedric_crescent_unique" is the ID of the Daedric Crescent, so this only thing this is relying upon, is if "Additem" is the proper command.

I know there's also a command that forces things to act only once, instead of every screenshot, or every time you select them. One such item, is a cave in Solsthiem, which I can't quite remember the name of.

I learned the command before I quit the tutorial, but I have forgotten, planning on not ever getting the chance to use it. But now I find that this is a lot simpler than I previously thought.
PostPosted: Mon Jul 18, 2005 1:29 am


Dr. Squirrel
What if you also added onto the current script, a script that would make it much more sunny in that area. Would it have thunderstorms in broad daylight, or would the script just not work.


You're asking if you put one script that had the "Sunny" variable at 100, and another script that had the "thunder" variable at 100?

No, as far as I know, you can only assign one script to an item. Although that doesn't change the fact, that you could assign both commands to a single script.

One would be sure to overwrite the other, or it would bring both scripts into calculation at the same time, totaling it up at 200, in which case, as mentioned above:
Quote:
The values must add up to 100 or you will get odd results.


I'm not sure quite what would happen, and I'm not willing to try it out. Yet...

Rukoric


llQuicksilverll

PostPosted: Mon Jul 18, 2005 1:44 pm


Sormani
Dr. Squirrel
What if you also added onto the current script, a script that would make it much more sunny in that area. Would it have thunderstorms in broad daylight, or would the script just not work.


You're asking if you put one script that had the "Sunny" variable at 100, and another script that had the "thunder" variable at 100?

No, as far as I know, you can only assign one script to an item. Although that doesn't change the fact, that you could assign both commands to a single script.

One would be sure to overwrite the other, or it would bring both scripts into calculation at the same time, totaling it up at 200, in which case, as mentioned above:
Quote:
The values must add up to 100 or you will get odd results.


I'm not sure quite what would happen, and I'm not willing to try it out. Yet...


you can only put one script on an item, but you can also put in scripting that causes other scripts to trigger.
PostPosted: Tue Jul 19, 2005 12:23 am


And what about the other questions?

Rukoric


Anriazna
Vice Captain

PostPosted: Wed Jul 27, 2005 8:40 am


@.@

...my brain hurts...
Reply
Guild Recycle Bin

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum