Welcome Guest ( Log In | Register )

9 Pages V « < 7 8 9  
Reply to this topicStart new topic
> Skyrim CK Experimenting, Post Your CK Fun Here:
Lena Wolf
post Jan 13 2022, 07:11 PM
Post #161


Mouth
Group Icon
Joined: 18-May 21
From: Bravil



QUOTE(Renee @ Jan 13 2022, 04:02 PM) *

An NPC gets killed by script. emot-ninja1.gif This is easy to do in the CS... extremely easy. Just assign a Reference ID to the NPC in question, then put some script like

If (IsPCSleeping == 1) && (other random condition)
aaaNPCRef.Kill

EndIF


Something like that.

I need an example of somebody actually getting killed by script in the game, while the player sleeps, if there is one. I basically need that script, if there is one. If Beth has already done something like this, it makes the scripting process so much easier, you see.

Seems to me that you just wrote that script right there! goodjob.gif I don't know of any quests that do that on top of my head, but I did a bit of googling... have a look at this, don't know if that's what you're after:

Sleep and Kill video tutorial


--------------------
"What is life's greatest illusion?"
"Innocence, my brother."

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 15 2022, 02:17 PM
Post #162


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Lena: Ha, if only writing script for Skyrim were that easy! No, that script won't work for Skyrim. nono.gif I'd get error messages screaming at me. However, one thing the Creation Kit does right is it has a lot of presets for code, so that we don't always have to remember those scripts 100%. That's partially why Properties are used to define objects, I think.

I believe there has to be a way to make "kill an NPC via script" happen somehow. If I find out how to make this happen I will share it with the rest of the group.

I watched that exact video a few days ago, too. cake.gif I can probably use its main idea (using Sleep Events to cause X), but I'll have to figure out how to make it pwn an NPC instead.


QUOTE(macole @ Jan 13 2022, 12:23 PM) *

Is there an interaction between player and NPC prior to the NPC’s murder?


Yes there is.

QUOTE

I think it would be easier to start the script if there is an opening dialog option with the intended victim. I would imagine it working something like this:

1. Go to a certain inn, rent a room for the night,
2. spot the bar wench (SuzzieQueNPC1v1) and say, “Hey baby why don’t you come up and see me sometime.”
3. Retire to your room and go to sleep (disable SuzzieQueNPC1v1).
4. Next morning you wake up and find her (SuzzieQueNPC1v2) dead in the hallway, arrow in the back.
5. Search body to find a cryptic note warning you of something nefarious (activates guards).
6. Guards arrive and haul you off to jail.
7. You hear voices outside your cell Captain Renault orders you up against the wall and before you know it you’re caught up in the Oblivion Crisis or whatever crisis is at hand (Revenge of the Feyfolken).

Yeah I know, I have no idea of what I’m talking about but it sounds like the way PrinceShroob’s Main Quest Delayer starts the Oblivion MQ by simply get arrested in the Imperial City and choosing to go to jail (as long as “Scheduled for Execution” is not currently active). That may be of some help.


laugh.gif I'm laughing at "Hey baby..." while speaking to the bar wench. rollinglaugh.gif

Anyway, this will be for Skyrim, not Ob, so everything is a bit convoluted. I'm going to need to figure out how to make a script happen between steps 3 and 4 above, which causes that NPC to perish. See, because when I write the actual story, and all of this just happens (without console commands) it just makes me smile. smile.gif




--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Mar 13 2022, 10:37 PM
Post #163


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



QUOTE(Renee @ Jan 13 2022, 09:26 AM) *

Hello, anybody here?? unsure.gif I have this idea for a quest moment and need some help getting it implemented.

Basically, an NPC gets killed in his sleep, but not by another NPC and not by my character. Or... perhaps the NPC gets killed when my character goes to sleep. sleep.gif Question is: can anybody think of an example from one of Bethesda's quests when something like this happens? ... If so, then I'll be able to study how Beth did it.


Figured it out. This one was tough to figure, only because the answer was so elusive. unsure.gif but the solution is easy. Basically, Bethesda has multiple ways they do this. But they always use Aliases.

I had to give an NPC a Reference ID and then go into whichever quest I'm working with. Went into the quest's Alias tab and made an alias for that NPC. Used the Specific Alias toggle to find the NPC in the Render window and clicked on him.

Next I typed Alias_aaaChamanyAlias.GetActorReference().Kill() into a specific quest stage's Papyrus Fragment box, which is the Alias intro code ( Alias_ ) added to the Alias's name ( aaaChamanyAlias ) added to .GetActorReference().kill()

The stage will set while my character's sleeping, so altogether I've got

If Game.GetPlayer().GetSleepState() == 3
Alias_aaaChamanyAlias.GetActorReference().Kill()
EndIf









--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 13 2022, 02:53 PM
Post #164


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



I think maybe only ghastley might know the answer to this one, but anyone feel free to chime in with any ideas if y'all know anything.

I've got this very simple idea, or so it seems. I'm trying to set a quest variable via dialog in the Creation Kit for the old version of Skyrim. Doing this in Oblivion's Construction Set is so much easier. Start a new quest, open up its main script, and type

Short Status

as a variable. Now I could use Status in lines of code. For instance, I could type

Set aaaQuest.Status to 1

into the Topic tab's Result Script to move Status up to 1. Therefore, the NPC will say certain dialog when the variable is 0, but other dialog when it's at 1. I'm not seeing how to do this in the Skyrim CK. mad.gif Yet it must be possible because there's a function called GetVMQuestVariable.

Here's where I'm at so far.

1). I made a test quest in the Creation Kit, with two instances of dialog. First instance, the NPC says "Hello, you are on Var 1" and the second instance she's supposed to say "Welcome to Var 2".


2). I clicked on the Scripts tab and added a new script. So far it looks like this...

Scriptname aaaTestScript extends Quest Conditional

Int Property aaaTestProperty Auto Conditional


All of that compiles okay. Wonderful. I made sure the property's Int Value is 0.


3). I go back to the Player Dialog tab. For the Conditions window I've got

GetIsID Actor: NPCname == 1.00

GetVMQuestVariable Quest: aaaTestQuest == 0.00


I was able to choose aaaTestProperty for the quest variable, as well.


4). In the Papyrus Fragment box I typed:

Int aaaTestProperty = 1

which I assume is supposed to bump the VMQuestVariable up to 1. This compiles okay.


5). For the second instance of dialog ("Welcome to Var 2") I've got

GetIsID Actor: NPCname == 1.00

GetVMQuestVariable Quest: aaaTestQuest == 1.00


as conditions. I go into the game. The NPC says the first bit of dialog, "Welcome to Var 1" just fine, but then she drops the conversation, almost as though "Goodbye" has been flagged. Grrr....

So the problem seems to be the Int aaaTestProperty = 1 line. It doesn't seem to be bumping the variable to 1.



Edit: I also tried changing the second instance of dialog so that its VMQuestVariable == 0.00. In this case, both lines of dialog show up. Therefore, the Int aaaTestProperty = 1 bit of code compiles okay, but doesn't seem to do anything.

Edit 2: I tried changing Int to Float, so now that line of text is Float aaaTestProperty = 1 This also compiles. Back in the game, the lady now says BOTH lines of text. smile.gif Haven't had the time to fully test (had to get to work), but I'm assuming the variable's moving from 0 to 1.

Problem is, dialog immeditely goes back to the "zero" phase. She says the first line of text (VMQuestVariable is 0) she says the second line of text (now it seems to be 1), but when that's done the first topic + line of text shows up again.

I don't want that. I want the text to stay on the "one" phase: VMQuestVariable == 1.00, see what I'm saying? I want to be the one telling the variable where to go. I've always been able to get this to work in the Construction Set and GECK, and easily.



Trying to learn from this Creation Kit page, by the way, along with a few other pages, but it's slow going. verysad.gif

Int aaaTestProperty = aaaTestProperty +1

This post has been edited by Renee: Dec 15 2022, 09:40 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ghastley
post Dec 13 2022, 11:23 PM
Post #165


Councilor
Group Icon
Joined: 13-December 10



I think that you have two separate scripts, each of which has a variable aaaTestProperty and one of them is set to 0 and the other is set to 1. However, that should mean that one is being tested and the other set, and it doesn't fully account for your symptoms.

Check the scripts tab of the quest for multiple scripts.


--------------------
Mods for The Elder Scrolls single-player games, and I play ESO.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 13 2022, 11:47 PM
Post #166


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Nah, there's only the one script.


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 14 2022, 02:41 PM
Post #167


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Do you know any tutorials which go into variables and functions? I found one which is almost pERFECT, exactly what I'm looking for. But it's for Fallout 4, which happens to do one little thing different (it uses KMYQuest or something) which makes a one-line script possible. But do you know anything which goes into this sort of thing?

After awhile we get to the point where there are no tutorials, and then it's like we're on our own.


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 16 2022, 02:06 PM
Post #168


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Update on this, just in case anyone's in the same byte (get it?... byte?.... rolleyes.gif)

After studying a bunch of Beth quests in which VMQuestVariable is used, I've come to the conclusion they use this condition in a way-different manner than I'm trying to. VMQuestVariable gets called for a lot during the early Companions quests for instance. Always, it's used as something definite is happening: the player leaves a conversation, and VMQuestVariable shows up with a Get == 1. A scene commences between two Companions members, and again it pops up, again with ==1. And of course, I can't begin to grasp what causes the variable to return a 1 in the first place. rolleyes.gif Whatever Beth's doing makes no sense to me; wouldn't be the first time!

I can't find an example in which it's used during a script; that's the main thing. It always shows up as the result of some PC or NPC action. It's never the result of a pure script declaration, not from what I've seen.

I also never see this condition go backwards, never see it return a 0 after it's been a 1, the way they're using it. Definitely not like the old scripting days in which quest and script variables could go up and down. So VMQuestVariable seems to be useless (to me). I'm going to try using Faction changes to make my idea happen, I guess.

This post has been edited by Renee: Dec 16 2022, 02:12 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lena Wolf
post Dec 16 2022, 02:56 PM
Post #169


Mouth
Group Icon
Joined: 18-May 21
From: Bravil



Well, according to what I gleaned off the internet here and there, there's no such thing as a VMQuestVariable but instead there's a function condition GetVMQuestVariable where you can select which variable needs checking. See here for example. This idea is quite similar to Oblivion's GetQuestVariable condition in the dialogue. Could it be that you simply need to declare an explicit variable which you then would check?


--------------------
"What is life's greatest illusion?"
"Innocence, my brother."

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Dec 16 2022, 08:05 PM
Post #170


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Mmhmm that's one of the several dozen pages I found while googling, that GameSAS.com page. I did a lot of searching on this topic, looking for any random modder who's trying to use these sort of variables for Skyrim. Mostly, I came up with zilch. Nobody was able answer my query over at Nexus's forums.

Yes, GetVMQuestVariable is similar to GetQuestVariable (which is what Beth used to use for OB and FO3). GetQuestVariable is still buried in Skyrim's Creation Kit but it doesn't work for what I'm trying to accomplish. mad.gif The Creation Kit page for GetQuestVariable says "This function is deprecated and will not work in current versions of the Creation Kit (though it can still be found in a few conditions). Use GetVMQuestVariable instead."

There could be an explicit variable to declare. If so, I don't know how to phrase it, nor have I seen Beth do anything close to a simple script declaration.

I've pretty much moved on from trying to figure this out. Like I said, I'm experimenting with temporarily putting my character into a faction instead. See if that works. Just wanted to leave a note here just in case anyone else out there tries to figure the same thing, and gets all frustrated and stuff.

Thanks for your time, Lena cake.gif

This post has been edited by Renee: Dec 16 2022, 08:07 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

9 Pages V « < 7 8 9
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 19th March 2024 - 09:11 AM