Jump to content

General Questions about Scripting


Rigger1209

Recommended Posts

Hello there,

 

I´m new to the forum, so excuse me if I missed something, and I´d like to ask for some help.

 

I recently began to work myself into the GECK with a friend, in order to create a little storyline.

 

So I started getting myself comfortable with GECK and basic scripting in it wich I hadn´t done so far.(I already modded Morrowind a lot back in the day, so polishing up the basics like worldbuilding etc. was no problem)

 

And well I got stuck before I could really begin. Why? Well my main problem is that I have no idea where to acutally put a script. I assume there are many different ways to get to your desired result, but I´m not sure how to get there.

 

So what I´ve been looking for is some kind of overview how you would accomplish certain tasks. I can search the GECK Wiki for the single functions and getting them together will be another task. but lets say I would like to do some basic things, for example this:

 

I want a Quest to start, when a certain grave is searched by the player and a note in it is picked up. Where would I go from there? I can´t seem to figure out where the actual scripted trigger should be put.

 

Again behaviour should be:

 

1.Player opens container

2.Player picks up note

3.Player closes container

4.Quest starts

 

But would I put a script on the container wich would cause the quest to start or on the note (haven´t found a possibility to add a script to a note yet anyways by the way). Or after the game begins running again? (As far as I know about know the game stops when you are in any kind of menu, and are is in one of it´s basics states).

 

I´m still a bit puzzled here so maybe someone knows some good resources or could bring some light into this matter for me somehow.

 

Thank you very much in advance.

Link to comment
Share on other sites

Have you gone through the tutorial on the geck wiki? It answers most of your questions.

 

Yes of course I did, but I found it very specialized for the tutorial dungeon. I mean they do a scripted trigger. But they create a special object in the world for it. I have no idea how I could transfer this to my idea about it.

 

How would I trigger Quests with different things? Would I use a OnActivate blocktype when I activate the container to start the script? Or would I make an onAdd player and somehow link it to the note?

 

Sorry I really tried to figure my way into this by reading this tut but didn´t get too far :blush:

Link to comment
Share on other sites

There are a number of quests in the base game which start when you pick up a note. It may be that the visual notification of the quest happens once you close the container, but picking up the note is what triggers it. One way which I learned a lot about how to do things is to pick out one item from the base game which has the behavior I want, and study how it works. You can use the geck menu "edit -> find text" to search for a particular string, such as the text of a note, and go up from there.
Link to comment
Share on other sites

One way it might help to think about it is that "scripting" is not much more than console commands. There is some added stuff to get them to run at certain times under certain conditions. So familiarize yourself with what commands are available and try to mentally map those to what you want to do. Then you can learn about blocks, look at existing scripts, etc.. to get to where you want to go.
Link to comment
Share on other sites

Yeah I think that sounds reasonable. Will try to work myself trough some of them and see how it´s done there. Still some kind of an overview about this would be nice. So I´m still open for other suggestions/resources.

 

EDIT: I just began searching through the notes, and actually there are notes ingame wich behave like I wanted, but how to find them is a different topic... I mean they don´t have any scripts associated with them, and as long as I dont know if the note does something liek starting a quest I know of no way to determin that...

 

EDIT II: Okay thats a good perspective there I will keep that in mind, Quetzlsacatanango. So I would figure, that I´d have a script that checks the players inventory for a certain item, and if it´s found the quest starts. But where would I put the script itself? Or when would it be executed. I´m feeling like I´m missing somehthing rather basic here...

Edited by Rigger1209
Link to comment
Share on other sites

Hey there, I got another question.

 

So I figured it out so far, regarding my example from above. I made a script and made it the questscript, wich triggers the quest after picking up a certain note.

 

So this questscript works with a "gamemode" blocktype, and is checked every five seconds hence I didn´t change anything about the evalutaion time. At least as far as I understand it by now. Now my question:

 

Will all questscripts in the game that use this blocktype be evaluated every five seconds? Wouldn´t this be rather demanding regarding ressources? Or am I missing something?

 

thanks again and for the help so far

 

cheers

Link to comment
Share on other sites

This particular script you want to run once, when the user picks up the item. So it should use an "activate" block, not a "gamemode" block.

 

I agree with you that modders should make an effort to be efficient and prevent scripts from running all the time. You can see comments in the base game scripts where they have gone back afterwards and made changes to improve this, which can only be because they found this was a problem. However, many modders have told me that there is no reason to be concerned about this because modern machines are fast enough to do all this. So, YMMV.

Link to comment
Share on other sites

Will all questscripts in the game that use this blocktype be evaluated every five seconds? Wouldn´t this be rather demanding regarding ressources? Or am I missing something?

 

 

 

 

 

It looks to me like the question is if I change this in one script will this change the evaluation time in every other script that uses this type of evaluation? That should be a no it does not if that is what you are asking. Each script is uniquely named and is a stand alone script. That being said one script can be assigned to multiple objects and in that particular area yes any other object that calls on that one particular script will use the new evaluation time that you edited in.

 

The work around for that is simply rename your custom script with its own unique name and then assign it to your object/s and then only those objects you specifically assign your script to will be under the influence of your custom script.

Edited by deu58
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...