Jump to content

Looking For The Quest With The Dungeon Dialogue Bits


Mud

Recommended Posts

Got another dialogue related question here. I'm trying to find the quest with the dialogue your followers will randomly say when approaching a dungeon entrance or entering someplace foreboding. Like the FemaleYoungEager's "Look at that, a cave. Who knows what could be down there?" line, the "I've got a bad feeling about this." line when entering a boss room, the "Wow! Would you look at that." line... I can't seem to find any such lines in the generic dialogue quests.

 

On that note, without scripting, can I limit a line to only play when first entering a cell? I've got a handful of lines like "Sorry to intrude" that would fit well when entering a house, but I can't simply assign it as idle dialogue or it might be called to play well after entering a room.

Link to comment

It's either in WICommentary1, WICommentary2 or WICommentary3.

 

 

 

On that note, without scripting, can I limit a line to only play when first entering a cell? I've got a handful of lines like "Sorry to intrude" that would fit well when entering a house, but I can't simply assign it as idle dialogue or it might be called to play well after entering a room.

Not really. You could let them say the line every 24h or more to simulate this behavior.

Link to comment

Ah, there they are. FollowerCommentary1-3, but close enough. Thanks once again!

 

Yeah, my current implementation is a 24 hour reset on the lines, but I'm really not satisfied with that, for several reasons. First being that I'd really prefer the lines to play much less often than that, but entering any reset period longer than 24 hours just makes it revert to 24, and second being that I wanted it to be more random. Like a 10% chance every time you entered a house, and then having a reset timer to ensure it doesn't trigger again too soon after the first one. But it seems like I'd need scripting to do that, and if I were able to script I'd have just gone and created a custom recruitment system for this rather than making edits to the vanilla quests...

Link to comment

Well w/o scripts you can't do that. You could do set a condition function GetRandomPercent <= 10 that would make say them the line every 24h AND if the RNG rolled a value in range from 0 to 10.

 

To make it like you want it there is no way around scripts.

Link to comment

Yeah, which then runs into the issue of that random chance being polled at times other than when first entering the cell. Well, butts.

 

I'll have to make do with a 100% chance and 24 hour reset for the time being. Maybe when I'm not so busy with work I'll have more chances to learn basic scripting. Maybe make the follower part of her own recruitment system, too.

Link to comment

What you are asking, is simple in theory but it isn't simple to do it. The idea is to put every NPC into a faction to be used in a Condition Function to exclude the NPC from ever saying this line again as long as you are in the same location. The second step is to clear the faction everytime we leave the location. First you need PapyrusUtil. Then you need to create a faction, we call them TestGreetedPlayerFaction.

 

Then you need a Quest Alias for the player where we attach a script.

 

TestPlayerChangedLocationScript

ScriptName TestPlayerChangedLocationScript Extends ReferenceAlias
Faction Property TestGreetedPlayerFaction Auto

Event OnLocationChange(Location akOldLocation, Location akNewLocation)
    Int i = 0

    While(i < StorageUtil.FormListCount(None, "Test.NPCHasGreetedPlayer"))
        Actor NPC = StorageUtil.FormListGet(None, "Test.NPCHasGreetedPlayer", i) As Actor
        NPC.RemoveFromFaction(TestGreetedPlayerFaction)
    EndWhile
EndEvent

In the actual dialogue you put a script in the Begin or End Fragment.

akSpeaker.AddToFaction(TestGreetedPlayerFaction)
StorageUtil.FormListAdd(None, "Test.NPCHasGreetedPlayer", akSpeaker)

In the dialogue you set up the Condition Function like this: GetInFaction TestGreetedPlayerFaction != 1.

 

Done and enjoy! Only thing you need to do is to fill the properties in the Property Window of those two scripts.

Link to comment

Oh wow, thanks! I think I understand a little of that.

 

So then I'd use this together with the usual dialogue conditions, like being in a location considered a house, being a part of CurrentFollowerFaction, the 24 hour reset period, and so forth? Would assigning a 10% chance for it to play still properly add then remove the follower from the faction when the 10% chance doesn't proc?

 

 

Could it be easier than I thought to make a follower with custom dialogue, though? I'm seeing a few custom voiced followers that have nothing but TIF script fragments bundled with them. Perhaps I should take a look under the lid to see what those do.

Link to comment

The script in the dialogue will only be triggered if it has met all conditions (Or to make it more simple: If the dialogue line is spoken). So if you have set a random percentage chance and it failed, the script will not be executed. Therefore the NPC will not be added to the GreetedFaction in this example.

 

Most custom followers use the vanilla follower system and therefore only need to add them to the faction CurrentFollowerFaction to have access to all the commands a standard follower can offer. If you want more, you need your own scripts most times.

 

Actually I see there I've forgotten a line in the first script. This should do everything right:

 

 

ScriptName TestPlayerChangedLocationScript Extends ReferenceAlias
Faction Property TestGreetedPlayerFaction Auto

Event OnLocationChange(Location akOldLocation, Location akNewLocation)
    Int i = 0

    While(i < StorageUtil.FormListCount(None, "Test.NPCHasGreetedPlayer"))
        Actor NPC = StorageUtil.FormListGet(None, "Test.NPCHasGreetedPlayer", i) As Actor
        NPC.RemoveFromFaction(TestGreetedPlayerFaction)
    EndWhile
 
    StorageUtil.FormListClear(None, "Test.NPCHasGreetedPlayer")
EndEvent

 

If you don't understand something from this code, just ask. I will try to answer your questions.

Link to comment

Ah, my question was more about making it recognize that it's only supposed to attempt to be played on that OnLocationChange event - let me see if I have this right.

 

I have to make a new quest in order to use this, is that right? In this new quest, I add the dialogue as a new Idle dialogue, with the script and appropriate conditions applied? Does the script then make it so the dialogue attempts to be played only on that location change event?

Link to comment

It was in regards to the previously mentioned problem about having the line play at times other than when first entering the cell, if I didn't have a script available and just assigned it a 10% chance to play as idle dialogue with 24 hr reset period.

 

Basically meaning, does the script make it so the OnLocationChange event is the only possible time the line can be played? If it doesn't play upon first entering the house, it won't try to play it while I'm just hanging around the place?

Link to comment

That's exactly it. What I wanted to be able to do here is separate from the first question about the dungeon dialogue bits. I want to give the follower a number of lines that could only be said upon first entering a cell, as they don't make sense being played at any other time. Houses mostly, but there's also a handful that'd be good for places like caves and dwarven ruins. She'll be the only one who can say them, which I was planning on achieving by assigning these lines only to the dialogue quest I've created for her. I also want them to only be said while following, so I was going to give them the CurrentFollowerFaction condition. Finally, I don't want them to be said too often, so I wanted to make them only have a 10% or so chance of playing each time I enter a qualifying cell.

 

So I can see the OnLocationChange event makes the follower eligible to say this line once I enter the cell, but I also need it to be the ONLY time they can say the line, and I don't quite understand scripting well enough to see if it already does that.

 

Sorry if I'm making it too wordy, I have a habit of doing that.

Link to comment

Ok, let's make an example. You go into the Sleeping Giant in Riverwood with your follower. And you want that your follower does the following:

  • Get a random chance to say a line about the Location (In your case 10% chance)
  • If above is true, then the follower should say something about the Sleeping Giant
  • The follower should never repeat this dialogue if he had already had spoken it

If the 10% chance is not met and one day you and your follower enter again the Sleeping Giant, should a dice rolled again to say the dialogue line?

Link to comment

The first two are right. But I do want the line to be repeatable. What I don't want is to enter, have the line not trigger, then go to waste some time in the cell and suddenly hear her speaking the line well after I entered the cell.

 

So the moment I enter the cell should be the only time the game tries to play the line, whether the 10% chance succeeds or fails, until I leave and enter again. Does the script already do that?

Link to comment

I thought about your problem and I think I have the solution for you. The best part about it: It shouldnt even need a script :) But it might be a bit hard to explain.

 

Okay here we go:

 

First you need to seperate your dialogues in a scene. Make a new Quest, put your Follower into a Quest Alias.

Go to Scenes. Check 'Begin on quest start' and 'Stop quest on end'. Add a new actor and select your follower quest alias. Add 'New Phase at End'. Now under Actor, right-click, select new action, dialogue. Put your dialogues there.

 

Now you need an entry in the Story Manager Node 'Change Location Event'. There you put it in a new Stacked Quest Node. Name it as you wish. Now in your node right-click, add quest. Add the quest you made for the dialogues as described above. Add those condition: GetRandomPercent NONE <= 10. And other conditions you want to use, It would be a good idea to check if your hireling is in the CurrentFollowerFaction (if you use this faction) to make sure the quest will only be started when he/she is following you.

 

What this does: Everytime you enter a new location, there is a 10% chance that this quest will be started. If it is started it will start the scene in the quest and the appropiate lines of dialogues will be spoken.

As long as you are in the same location, the quest will not be triggered again.

Link to comment

Hmm... interesting! Thanks a bundle, that sounds like exactly what I want! Would I need to do one of these for each different type of location I have lines for? One for houses, one for caves, and etc?

 

 

Incidentally, I was thinking about that script - could something similar to what I want be done if the script itself was given a percent chance to trigger instead of the dialogue?

Link to comment

No you don't need to add more quests in the Story Manager but if you have alot of such dialogue lines, you could to organize them (Like Bethesda did with the WICommentary1 to WICommentary3 quests). So this is completely up to you.

 

For your second question: No, it would have not worked with the script I posted. Well, not as simple as with the Story Manager. There is no way to check if a dialogue couldn't be triggered when its condition did not matched. You only can do something when a dialogue has been triggered and that's what the purpose of my scripts were. But I have written them under a false assumption :)

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use