Can't select variable for GetVMQuestVariable. Trying to crea

Post » Mon Jun 18, 2012 11:31 am

I haven't modded a Bethesda game since I added a simple house to Balmora in Morrowind and followed to scripting tutorial to make a teleportation ring. I understand most of the basic systems, but I'm not a programmer so while I get the gist of scripting, the syntax is beyond my grasp. Please excuse me if what I'm trying to do is extremely idiotic.

I'm trying to follow http://www.gamesas.com/topic/1011099-tutz-companionfollower-tutorial/ I don't know if the same steps would even work for Skyrim because, again, I'm not very good with scripts. I've followed it well enough till this part:

Once saved, open up your quest (that we setted up the dialogue in earlier) and next to "script" and select your script.
Now we are ready to conditionalize our packages and dialogue - and link them together.
Let's do it.

Open up your Follow Package. Hit the "Conditions" tab. In "Condition Function", find "GetQuestVariable". Hit the parameters button (should say "INVALID, UNKNOWN") and change the quest to your quest. Set the variable to "Status". Press okay.
So, 1 = following, 2 = waiting, 3 = sandboxing.
We only want this package to run, and to be followed, when "Status == 1". So set the "Comparison" to "==" and set the "Value" to 1.
That's it - this package will only run when "Status" from your quest is equal to 1.

Right-click on your "condition" that you just made and hit "Copy Condition".

I think I've properly added the script to my quest. I'm stuck on the package. I tried using GetQuestVariable but it gave me an error and didn't allow me to select a variable. http://www.gamesas.com/topic/1344421-getquestvariable-dialogue-condition/page__p__20267115__hl__getquestvariable__fromsearch__1#entry20267115 said he fixed it by using GetVMQuestVariable instead. Indeed, that doesn't produce an error like GetQuestVariable, but the variable is stuck on NONE. Is there a way to set my variable to Status? Is that companion tutorial even viable in Skyrim?

Thanks for any help you can give.
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Mon Jun 18, 2012 3:12 pm

You need to use the http://www.creationkit.com/Variables_and_Properties#Getting_Properties_of_a_quest_script keyword in your ScriptName declaration for stuff in your script to be accessible to conditions.

Cipscis
User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm

Post » Mon Jun 18, 2012 8:42 pm

You need to use the http://www.creationkit.com/Variables_and_Properties#Getting_Properties_of_a_quest_script keyword in your ScriptName declaration for stuff in your script to be accessible to conditions.

Cipscis

Thanks for the response. I read that a couple of times in the original thread and thought I added it correctly, but I probably didn't.

Scriptname InfFoxCompanionScript extends Quest conditional
{ScriptName InfFoxCompanionScript extends Quest conditional

short Status ;1 = following, 2 = waiting, 3 = sandboxing
short DoOnce

begin GameMode
if (DoOnce != 1)
set Status to 3
set DoOnce to 1
endif
end}


I'm not really sure why the Scriptname line is repeated, but I can't get it to compile without it. What am I doing wrong?
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Mon Jun 18, 2012 11:51 am

Skyrim has a whle new scripting language, compared to Fallout 3--the instructions in that tutorial really won't work at all, beyond a few of the basic concepts like dialogue topics and infos.

There are a few threads here about creating companions--hold on a sec and I'll find one and link it here...
User avatar
megan gleeson
 
Posts: 3493
Joined: Wed Feb 07, 2007 2:01 pm

Post » Mon Jun 18, 2012 9:47 pm

You've got your entire script wrapped in curly braces - {} - which means it's all a comment.

It wouldn't compile because it's not written in Papyrus. That script is written in the language used by previous games. I recommend you read what the wiki has to say about http://www.creationkit.com/Category:Papyrus before you go any further.

Cipscis
User avatar
~Sylvia~
 
Posts: 3474
Joined: Thu Dec 28, 2006 5:19 am

Post » Mon Jun 18, 2012 3:16 pm

Skyrim has a whle new scripting language, compared to Fallout 3--the instructions in that tutorial really won't work at all, beyond a few of the basic concepts like dialogue topics and infos.

There are a few threads here about creating companions--hold on a sec and I'll find one and link it here...

Ha, unfortunately it's the dialogue stuff I understand and the scripting I don't. I'd appreciate a link.




You've got your entire script wrapped in curly braces - {} - which means it's all a comment.

It wouldn't compile because it's not written in Papyrus. That script is written in the language used by previous games. I recommend you read what the wiki has to say about http://www.creationkit.com/Category:Papyrus before you go any further.

Cipscis

I didn't realize curly braces did that too. I only knew about the semicolon. Thanks.
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm

Post » Mon Jun 18, 2012 8:58 pm

http://www.gamesas.com/topic/1343766-characters-to-followers/ Instructions mostly in the second post.

There are a few other threads on the topic, too, if you search in this forum for "followers." The vanilla follower system isn't great, but getting an understanding of how it works is a good introduction to the new scripting language and game systems like aliases and properties, in case you ever want to extend the vanilla system, or create your own.
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Tue Jun 19, 2012 12:55 am

I didn't realize curly braces did that too. I only knew about the semicolon. Thanks.
Curly braces being comments (specifically documentation functions - the Creation Kit uses them as tooltips) is new to Papyrus, so don't worry about not knowing that before.

The idea is that these comments should be used after a declaration of something that you think needs extra documentation. You'll probably see them be used mostly after ScriptName declarations, and in non-native scripts that are quite complex and/or extended by other scripts.

Cipscis
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Mon Jun 18, 2012 10:15 pm

Hey, I'm stuck again.

Open up your quest if you don't already have it up. Enter the "Topics" tab and select your "Follow" topic. At the bottom of the Quest Editor window, you should see two boxes - "Result Script (Begin)" and "Result Script (End)".
In each box you can put a script that will run at the beginning of the response or at the end (obviously depending on which box you put the script into).
In the "Result Script (End)" box, paste the following script:


set MyCompanionQuest.Status to 1

OldAndyRef.evp

I know where to put that, but I'm having trouble translating it into Papyrus. I've checked out http://www.creationkit.com/Variables_and_Properties, but it's a little confusing.

I know I need to use the end Papyrus fragment box to set the variable of my quest script. I've come up with something like this independent of the fragment box, which compiles, but I can't figure out how to get it to work with the fragment box. I also don't even know if it's right.

Scriptname NewScript extends TopicInfoQuestScript Property ref autoEvent FollowDialogue()ref.QuestScriptStatusVariable = 1EndEvent

I've also seen stuff like

GetOwningQuest().SetStage(10)

on http://www.creationkit.com/Bethesda_Tutorial_Dialogue, but I'm not sure if that's what I want. Obviously I don't want to set the stage of the quest, I want to set the variable, but maybe it's close to that.

What do I need to read up on? It's hard to search for an answer when you're not sure what to call it. Thanks.
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm


Return to V - Skyrim