Help - Search - Members - Calendar
Full Version: Skyrim CK Experimenting
Chorrol.com > Mods > Skyrim Mods
Pages: 1, 2, 3, 4
mALX
QUOTE(SubRosa @ Oct 1 2016, 07:49 PM) *

It was a lot of work, but I was able to make the Winterhold Home I made for my grown up Sofie and Lucia's games and make it Hearthfire/adoption compatible. This article details how.

I also had to use the Hearthfire Multiple Adoptions mod, and use the Bless House spell it provides to set the home as my official house. I tried it without the mod, but the game would not give me the option to adopt. My guess is that there is a setting somewhere that tells the game what your house is, and with a modded house that never gets updated.


Yeah, I used that list as a guideline in making my house mod; but used all vanilla or modded items so someone that didn't have Hearthfire might still be able to use the mod - (actually, at the time I made the mod I didn't have Hearthfire myself so kind of had to, lol). I didn't know about the "setting the house as home" for the adoptions issues till later on, and didn't know how to fix it.

I just really wish they had made cuter children in Skyrim, (like they made for Fallout 3).



ghastley
QUOTE(SubRosa @ Oct 1 2016, 07:49 PM) *

My guess is that there is a setting somewhere that tells the game what your house is, and with a modded house that never gets updated.

The problem is that the vanilla DLC method of completing the adoption is connected to the "I have a house in xxx" dialogs, and each of those tests for the Hearthfires or vanilla homes, making it hard to extend. If they'd used a Formlist that could be added to, then it would have been a lot easier.

Hearthfires was definitely not designed for extensibility or mods. There are way too many places where they put in fixed-size lists instead of using formlists, and there's a lot of code that has "If Lakeview ... else if Windstad ..." rather than "if house.InList(xxx)".

They also missed a lot of opportunities for global settings. There could have been a single "PlayerHasHouse" Boolean to control things, but the code usually tests ownership of each known house individually. It's a lot less efficient, and once again, harder to extend. I had to clone a lot of scripts that should have just been re-usable because of this poor style. The flags for site ownerships are held in each house script, so those all have to be properties of anything that wants to test them.
mALX
QUOTE(ghastley @ Oct 2 2016, 09:59 AM) *

QUOTE(SubRosa @ Oct 1 2016, 07:49 PM) *

My guess is that there is a setting somewhere that tells the game what your house is, and with a modded house that never gets updated.

The problem is that the vanilla DLC method of completing the adoption is connected to the "I have a house in xxx" dialogs, and each of those tests for the Hearthfires or vanilla homes, making it hard to extend. If they'd used a Formlist that could be added to, then it would have been a lot easier.

Hearthfires was definitely not designed for extensibility or mods. There are way too many places where they put in fixed-size lists instead of using formlists, and there's a lot of code that has "If Lakeview ... else if Windstad ..." rather than "if house.InList(xxx)".

They also missed a lot of opportunities for global settings. There could have been a single "PlayerHasHouse" Boolean to control things, but the code usually tests ownership of each known house individually. It's a lot less efficient, and once again, harder to extend. I had to clone a lot of scripts that should have just been re-usable because of this poor style. The flags for site ownerships are held in each house script, so those all have to be properties of anything that wants to test them.



Can the scripts be altered by a mod without breaking the DLC? Either adding your house to that list or as you said - simplifying it to point to a list rather than each particular house?

I am kind of reminded of some of the issues with ownership in Oblivion; though I can't remember if it was horses or Inn rental rooms - just remember I had to go to numerous places and add something I made to a list in order for it to work right in the game.

ghastley
Yes, it's possible to change the scripts, but then another mod can change them again and wipe your changes out. And I was creating multiple mods, so I'd probably do that to myself.

I had those problems with the Orc Child mod. The various other "extra kids" mods overwrote base files I was using, and so broke mine. I ended up cloning all she uses as uniquely hers.

The only safe things to do are use the vanilla assets unchanged, or supply a completely new one. I've always had issues of some variety when changing a base asset.

Sometimes you have no choice. You may have to replace a skeleton with an enhanced one to get wings on the player, as chargen requires that all playable races use the same one. If you want female Orcs to walk like women, you have to change the race template, etc.

mALX
QUOTE(ghastley @ Oct 16 2016, 08:29 AM) *

Yes, it's possible to change the scripts, but then another mod can change them again and wipe your changes out. And I was creating multiple mods, so I'd probably do that to myself.

I had those problems with the Orc Child mod. The various other "extra kids" mods overwrote base files I was using, and so broke mine. I ended up cloning all she uses as uniquely hers.

The only safe things to do are use the vanilla assets unchanged, or supply a completely new one. I've always had issues of some variety when changing a base asset.

Sometimes you have no choice. You may have to replace a skeleton with an enhanced one to get wings on the player, as chargen requires that all playable races use the same one. If you want female Orcs to walk like women, you have to change the race template, etc.


Oh, I understand. I guess then you would be stuck having to make patches every time another mod overwrote your changes or something?

I really don't enjoy Papyrus at all. I Loved the C++ or whatever Oblivion used, but ... just plain hate Papyrus.

ghastley
I've had a number of (XBox1) users of my mods complain about not getting couriers, and I've just had the same problem myself in a game where none of my Hearthfires mods is loaded. The general issue that the couriers just don't appear, so I went looking for an article anywhere that laid out the process, and provided a systematic approach to finding out what went wrong. Of course, there isn't one, so I'll have to do it myself.

---

Most couriers will be using the built-in WICourier quest, which gets started by the ChangeLocation event. The Story Manager will check if there's anything in the mail that needs delivering. If there is, it starts the quest to spawn a courier within range of the player and he seeks you out and delivers.

So the first thing to do was see if the WICourier quest is running. Usually it's not, either because the player didn't trigger the ChangeLocation yet, or it didn't fire when it should. That doesn't tell you anything. But the quest variables include the ID of the "mailbox" container that quests add their letters to, so you can use "showinventory" on that to see what's in the mail. There's also a global WICourierItemCount that will be non-zero if you have pending mail. It's probably worth checking both, as discrepancies between those could be a clue to any problem. The Story Manager start condition checks the count, rather than looking in the container. The actual content provides a clue as to which quest broke something.

There's also a possibility that the courier couldn't catch the player and timed out. That will be apparent from the quest showing a stage of 200 from its last attempt. Usually he spawns on the road ahead of you, and there's no problem, but the devs did allow for the exceptions.

If there's nothing to deliver, then you need to check the quests that should have sent one. You need some details about the quests themselves, as some will have a letter already in the inventory of the sender from the start of the game, and others will create it in a quest fragment right at the point where it's sent. So the presence of the letter's ID in the quest variables doesn't always mean anything. But if it's "NONE", that probably does.

There are settings to enable logging of Script and Story Manager processing. Both are likely to be needed - the script log will show failures in the quest script that adds the letter to the mailbox, and the SM log will show if the courier quest was started when it should have been, and hopefully why not.

And none of this can be done on XBox1, where the SM is easily subverted by one mod failing to pass on the event to other mods.

Renee
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.

Edit: oh yah, and i got cake. cake.gif See?
Lena Wolf
Hey Renee, I'm not entirely clear what you are trying to do. An NPC gets killed in his sleep by what? A bear? A lightning? Divine intervention? And why is that important?

Or, you say, may be an NPC gets killed when the player character goes to sleep. Now, that makes more sense. But this is easy to do. Check any quest that does something when you go to sleep - in Oblivion I'd say for example when Lachance visits you after you killed an innocent person. I imagine there's something similar in Skyrim too. Then just put in your own content at that point (instead of inviting you into the Dark Brotherhood, you are being dragged off to jail for murder, for example).
Renee
An NPC gets killed by script. It's important because there's supposed to be some mystery. Who exactly killed this fellow? Nobody knows at first, so my character initially gets accused & imprisoned. 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.

QUOTE
I imagine there's something similar in Skyrim too. Then just put in your own content at that point (instead of inviting you into the Dark Brotherhood, you are being dragged off to jail for murder, for example).


Correct, I have had a look at the Dark Brotherhood sleeping scenario, but that involves teleporting the player-character to that cabin (I forget its name), not anybody getting killed while the player is sleeping. 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.

I mean... there's the chance I am forging new ground here. laugh.gif That I am on my own. Once again.
macole
QUOTE(Renee @ Jan 13 2022, 10:02 AM) *

An NPC gets killed by script. It's important because there's supposed to be some mystery. Who exactly killed this fellow? Nobody knows at first, so my character initially gets accused & imprisoned. 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.
(snip)

Is there an interaction between player and NPC prior to the NPC’s murder? 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.
Lena Wolf
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
Renee
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


Renee
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







Renee
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
ghastley
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.
Renee
Nah, there's only the one script.
Renee
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.
Renee
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.
Lena Wolf
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?
Renee
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 is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2025 Invision Power Services, Inc.