UESP Forums

Discuss the uesp.net site and Elder Scrolls topics.
* FAQ    * Search
* Register    * Login
It is currently Mon Jun 17, 2024 3:58 am

Loading

All times are UTC

Post new topic Reply to topic  [ 25 posts ] 
Author Message
 Post subject: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 12:18 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 1:13 pm 
Offline
Warder
Warder
User avatar

Joined: Thu Nov 13, 2008 5:33 pm
Posts: 417
Location: Good ol' blighty
ES Games:
Platform:
UESPoints: 0
Okay a little question to get it going, is it a similar procedure with all scripting (i.e. oblivion) or does it change?
Im a bit of a beginner even when comes to modding to be honest, but im starting to pick up the basics :wink:

_________________
The Friend Of The Night of The Brotherhood
"I didnt just fill a crate full of C4 and blow it up when my whole team was in there, you and your crazy accusations..."
Self proclaimed king of earl grey.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 2:28 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
Thanks Caz. Modding isnt as hard as it seemed when it first began. The only things I havent figured out so far, to my knowledge, are Journal entries and scripting.

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 4:08 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0
Thanks for your new thread. I'm sure it'll help many.

I know I haven't done any of my homework = manuals or anything, but I take the boldness to ask, is this done with The Elder Scrolls Construction Set? Or is it done with any text editor, and saved in some special file type?

Looking forward to participate in this great game. :D

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 6:28 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
@Andere, as far as I know its only in the script editor in the construction kit.

@anyone, Idk if this is done through script or if I am missing something. I need Helseth's death to trigger 2 things: a spawning of an NPC in the throne room, and a jorunal entry

the entry is noted as "TR_Helseth_Dead" at Index 20
If someone could post the script I need to trigger that Journal entry I would really appreciate it.

And the spawning... I have no idea how to do that, but I know thats through scripting. If someone could post the formula for that, it would be awesome.

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 6:57 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 8:42 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
Thanks Caz, I will test that next time I am in the CS.

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sat Mar 13, 2010 9:46 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
Alright Caz, got another one for you.

I need 3 characters: Sotha_sil_living1, vivec_god2, and almalexia_battle2 to disappear whenever I leave the Heart chamber, and I need them to never come back.

Any ideas?

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sun Mar 14, 2010 3:07 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0
Attach a script to something - the door, perhaps? - using the command . You may want to use several if statements at once to make sure it happens at the right time (not before the death).
Do not attach it to the characters themselves, apparently that causes crashes. Have a go at writing it yourself ;)

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sun Mar 14, 2010 3:33 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0
Thanks Caz and Imperfect.

I downloaded some tutorials, and plan to start with "something" once I get my fingers off the game itself. I took part in a mod project for the game Freelancer, and it simply killed my playing - it went to "all work, no fun", and I'm not going to let that happen again.

Came to think, it would be wise to install a modding version of the game, in another partition? I have Windows XP Professional SP3, all updates, in partition C; then I have two other partitions, K and L. If I install MW in either K or L, will it have any consequences for the mod ( I hopefully manage to make :D )?

And, should I install everything up to Bloodmoon, plus MCP? Plus perhaps... what? In order to try to secure the compatibility, from the very start?

Please understand me, I suffer from the occupational disease of photographers, pedantry. Every dot and reflection has to be where I want them to be.

Finally, is the program Morrowind Script Editor v. 1.2 useable and reliable? I haven't tried it, no - no, but my earlier experiences with modding have shown, what you write is what you get, but various tools that make it all easier, aren't necessarily that reliable.

A lot of text once again, but I trust it will have an outcome. :roll: Like a Finnish proverb says,

It's good to live in Hope, said the tapeworm.

Thanks again m8s.

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Sun Mar 14, 2010 8:08 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
Alright. I know what you mean Andere, thats what this mod is turning into. I am working out a few small kinks. All thats left to do is fix Barenziah, who seems to not realize when her son is dead, and set those guys to disappear when I need them too.

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Wed Mar 17, 2010 4:34 am 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Wed Mar 17, 2010 1:21 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Wed Mar 17, 2010 3:15 pm 
Offline
Journeyman
Journeyman
User avatar

Joined: Tue Nov 25, 2008 4:52 pm
Posts: 278
Location: El Paso
ES Games:
Platform:
Status:
UESPoints: 0
I will use that. Coding for this is different than stuff I am used to, like html

I preffer the virtual part of the construction set, that I can see what I am doing. :P

_________________
"You there! Peasant!"
"Yes milord?"
"Destroy the Enemy Fortress!"
"...Okay :( "


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Fri Mar 26, 2010 1:21 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 12:01 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0
Hi Caz.

Thanks for your reminder PM, it got me working. :D

I tested the script, and it seems to work just fine. I'm a bit confused about two things, quite general by nature.

I have this tutorial Morrowind Scripting for Dummies. In their first example of writing a script, they create a Riddle Chest.

When I follow their instructions, everything goes well until the saving part. They don't mention saving an .esp file, but that's the only way I get the doors to function - if I don't save an .esp, and activate it in the game's Data Files, nothing happens, and the following time I open TES CS, there's no sign of the script - it has completely vanished.

Am I doing something wrong while saving?

They also ask to rename the object. My object is in_r_s_door_01, at Maar Gan Outpost. I renamed it to in_r_s_door_01b, but loading a game I got a warning, something like "can not find object in_r_s_door_01b". Of course, I know nothing about the principles of renaming... :?

But like I said, with an .esp it works.

Thanks and cheers.

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 1:46 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0
When modding you cannot modify the game directly, only create your own mod files, and they must be activated before starting the game. This is actually useful because take for example my case, when making a mod I somehow managed to shift a large part of the countryside without noticing. Sure, I had to delete my mod, but better that than reinstalling the whole game because you messed it up, aye? And this other time suddenly all the houses in Pelagiad disappeared (leaving only the doors), although my mod had nothing to do with that area... strange things have happened :P
So, a new .esp file for each mod. If you're making huge mods, it might be better to make several esps for it in case something goes seriously wrong (like mentioned above) and you won't need to start over.

Renaming objects. Well this is only for when you are creating new objects: entering a new one will make a new one, while leaving it unedited will write over the old one. In the case of your doors, you'd want to just add the script to as many doors in game as possible, without creating new ones, because in the visual part of the CS you can see that it would still be the original doors without scripts. You could always replace them all with your own doors, but thats just a load of unnecessary work.

Also, I wouldn't try adding the script to doors that take you to a different cell (into a building, for example). They are always "closed", so I don't know what would happen if you added that script to it. I can only think of one way to tell these kinds of doors apart: in the visual part of the CS, the normal doors look like doors from both sides, whereas the "teleporting" ones look like a door on one side, but on the other side it's practically invisible, as no texture has been added to the other side. Perhaps there's a different way to tell them apart without having to drag them all over and looking at them, but I can't think of one right now.

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 2:31 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 3:24 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 4:27 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0
Alright... trying to get somewhat deeper into the world of scripts, are those empty spaces essential?

Like when you write

If ( Menumode == 1)
return
endif

you have three empty spaces in front of "return".

They won't show in this message, but they show in a text editor, and the Script Edit of TES CS. There are three blanks in front of "r" of return.

Are they essential? If they are, I guess it's a matter of experience to get them right? "What a beautiful world", eh?
??? I mean, usually (?) empty spaces don't mean anything, and if you want to excerpt something it's by a ;.

I'm really getting interested in this. How I'm going to make my "Caldera Ebony Mine War", I don't know, but my toes get warm...

Cheers,

Andere

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 6:14 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Sun Aug 06, 2006 12:24 am
Posts: 2994
ES Games:
Platform:
Status:
UESPoints: 0
The three spaces is actually one hit on the tab key :wink: It's only purpose is to make the script easier to read; to see which "endif" belongs to which "if".


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 6:28 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Fri Mar 21, 2008 6:19 pm
Posts: 1518
Location: With Uncle Crassius and the Companion Cube
ES Games:
Platform:
Status:
UESPoints: 0
Just a note from a bit of an amateur scripter (did a bit of Flash programming):
DEFINITELY USE WHITE SPACE
If you come back to a script after a while, it can be really confusing to work out which stuff is triggered when and when whatever ends and oh my this "for" command actually ends here and not here and frig that changes everything.

_________________
BANG → !


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 6:40 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0
Correct, as they said it's just easier to read if you use tabs. :)

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Thu Apr 01, 2010 7:45 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Mon Mar 08, 2010 3:19 pm
Posts: 1603
Location: Helsinki, Finland
ES Games:
Platform:
Status:
UESPoints: 0
Ok, thanks friends.

I'll try to figure it out - without blowing the whole game up!

Ho-Ho, said Sancta Clause!

_________________
Life is a comedy to those who think, a tragedy to those who feel. - Jean Racine


Top
 Profile  
 
 Post subject: Re: Scripting - Basics and Help
PostPosted: Tue Apr 06, 2010 2:30 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Mar 29, 2008 3:04 pm
Posts: 564
ES Games:
Platform:
UESPoints: 0

_________________
Nord wisdom:
You don't know a woman until you've had a strong drink and a fist fight with her.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Sponsored Links

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group