Annoying dialogue issue - maybe not resolveable

Post » Wed Feb 16, 2011 5:46 pm

I have a dialogue topic where the player is asking an NPC how many stimpacks he has in his inventory. The response is based upon a getitemcount of stimpacks that is in his inventory using dialogue conditions. Screenshot here:

http://www.finhosting.fi/~fallout/screenshots/dialogueissue.gif . Note that it is top-level.

In addition, I have another top-level topic which allows the player to pass the NPC additional stimpacks.

The annoying thing is this.

I use the pass-NPC-additional-stimpacks option, and it works properly, and I can see through console that the additional stimpacks were added to the NPCs inventory. But if after I do that, when immedietely I select the "ask about stimpacks" dialogue option, it has not re-evaluated the inventory, and the response I get matches the stimpack count from before I passed him more stimpacks. If I then select the "ask about stimpacks" option a second time, it re-evaluates and reports the right number. So, in effect I have to ask twice if I add more stimpacks, or I will get a stupid answer.

One workaround I tried was thwarted due to something sorta goofy. I was able to make the pass-additional-stimpacks option a goodbye line, which would force the player to open dialogue anew with the NPC, which would force the re-evaluation to happen. But this had a problem. I *think* because this is both top-level and goodbye, it caused the dialogue to somewhat hang on exit (it is an unvoiced topic at this time). The game is forcing the player to click off on the goodbye line before dialogue will exit, and if the player does not click, it will sit forever. I decided that this situation was too ugly to keep.

Another thing I tried was specifying topics as the "choices" for the pass-additional-stimpacks dialog option, and trying to omit the "how many stimpacks do you have" question from that list. It seemed to ignore my "choices" list in this case - no matter what it was showing the original set of dialogue topics. I tried this both with "info refusal" selected and unselected, and it didn't care. I am not sure why it wouldn't show my choices, maybe I did something stupid?

I suspect that I could probably move this to be a nested topic and have it work alright because using "goodbye" might work properly, then. But I really need it top-level.

What I really want is to force this thing to re-evaluate the conditions of these topics first-shot. If anyone has any ideas, I'm all ears.
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Thu Feb 17, 2011 12:40 am

Hey, Tarrant, I'm pretty bad at understanding dialogue issues explained in text (I did look at your pic), but if I'm groking what you are saying this is how I would go about setting up what you are trying to do.


1st topic, How many stims do you have? Top Level, choice = pass additional stims

Response Topic, pass additional stims, Marked as Goodbye, is not marked Top Level (it doesn't need to be because it is attached as a choice so it just follows along after the 1st topic)

This should exit the menu no problem and then you would get the reevaluation you want.


This seems awfully simplistic to me though, so I think I must be missing what it is that you are trying to do.
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Thu Feb 17, 2011 4:40 am

Could you not define a quest variable to temporarily store the NPCs original stimpaks and then add the amount of passed stims to this variable. Then use that variable as a condition on the dialogue options? That said, putting your passed stims into second level dialogue with good-bye flagged seems like an easy solution too.
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Thu Feb 17, 2011 1:07 am

I use the pass-NPC-additional-stimpacks option, and it works properly, and I can see through console that the additional stimpacks were added to the NPCs inventory. But if after I do that, when immedietely I select the "ask about stimpacks" dialogue option, it has not re-evaluated the inventory...

Just force a re-evaluate of his inventory before it's possible to ask and get the wrong answer, by removing an equipped item.
I use a totally blank armor item with no model for this. (ie invisible using a spare body spot, or unused headwear spot)
Then just use the result script (end).. of the pass-stimpacks topic...
NPCRef.AddItem BlankArmor 1
NPCRef.EquipItem BlankArmor 1
NPCRef.RemoveItem BlankArmor 2
User avatar
Adam
 
Posts: 3446
Joined: Sat Jun 02, 2007 2:56 pm

Post » Wed Feb 16, 2011 5:36 pm

Hey, Tarrant, I'm pretty bad at understanding dialogue issues explained in text (I did look at your pic), but if I'm groking what you are saying this is how I would go about setting up what you are trying to do.


1st topic, How many stims do you have? Top Level, choice = pass additional stims

Response Topic, pass additional stims, Marked as Goodbye, is not marked Top Level (it doesn't need to be because it is attached as a choice so it just follows along after the 1st topic)

This should exit the menu no problem and then you would get the reevaluation you want.


This seems awfully simplistic to me though, so I think I must be missing what it is that you are trying to do.


I see what you're saying. I tried something a little bit simpler, it didnt quite work.

The tricky thing is that I'm trying to have the "pass additional stims" live top level, alongside the view stims. To achieve what I want using what you suggest, I could perhaps make 2 "pass additional stims" things, two seperate topics which look identical, one of which is top-level and one which is nested. The nested menu would in this case be identical in appearance to the top-level one. Maybe that could be made to work smoothly enough.

Could you not define a quest variable to temporarily store the NPCs original stimpaks and then add the amount of passed stims to this variable. Then use that variable as a condition on the dialogue options? That said, putting your passed stims into second level dialogue with good-bye flagged seems like an easy solution too.


Yes a solution like that could work, but that's getting all convoluted, I was hoping to have this work semi-normally.


Just force a re-evaluate of his inventory before it's possible to ask and get the wrong answer, by removing an equipped item.
I use a totally blank armor item with no model for this. (ie invisible using a spare body spot, or unused headwear spot)
Then just use the result script (end).. of the pass-stimpacks topic...
NPCRef.AddItem BlankArmor 1
NPCRef.EquipItem BlankArmor 1
NPCRef.RemoveItem BlankArmor 2


I am not positive that's exactly the re-evaluation type that is needed here but it's worth a try. When I think of re-evaluate, I feel like I am clicking the dialogue option and the dialogue function isn't caring to re-evaluate the conditions - - I have a hunch that its different from the NPC's inventory re-evaluating - but maybe it's not. But I will see.
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am

Post » Wed Feb 16, 2011 6:15 pm

I feel like I am clicking the dialogue option and the dialogue function isn't caring to re-evaluate the conditions..

Yup.. that's exactly what that little trick fixes. It's almost like the game hasn't received the 'inventory has been changed' flag, so it never bothers to do a real recheck of the quantities available, instead it just returns the previous value it had. Exiting menumode from their teammate container will also force a true re-eval. Both these ways will also fix the glitch where a smoking faction NPC will have a misaligned weapon in their hand and try to smoke their ciggy with it in the way. When this happens, the game doesn't even know the weapons not holstered or slung.
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Wed Feb 16, 2011 1:56 pm

Yup.. that's exactly what that little trick fixes. It's almost like the game hasn't received the 'inventory has been changed' flag, so it never bothers to do a real recheck of the quantities available, instead it just returns the previous value it had. Exiting menumode from their teammate container will also force a true re-eval. Both these ways will also fix the glitch where a smoking faction NPC will have a misaligned weapon in their hand and try to smoke their ciggy with it in the way. When this happens, the game doesn't even know the weapons not holstered or slung.


Bonedog, if I'm understanding you correctly, then can you do everything you are trying to accomplish without equipping an item? I've implemented something like this to get Charon to holster his weapon in my mod. I just add and remove one piece of ammo (in the Results Script) into his inventory with a dialogue "command" that tells him to holster his weapon. I did it this way because I couldn't figure out what makes followers have their weapons out at the stupidest times and it was driving me nuts but I knew that entering the trading menu fixed it (not trading anything with him just entering and exiting the menu).


@ Tarrant
I see what you're saying. I tried something a little bit simpler, it didnt quite work.

The tricky thing is that I'm trying to have the "pass additional stims" live top level, alongside the view stims. To achieve what I want using what you suggest, I could perhaps make 2 "pass additional stims" things, two seperate topics which look identical, one of which is top-level and one which is nested. The nested menu would in this case be identical in appearance to the top-level one. Maybe that could be made to work smoothly enough.


Yes, it would require two sets of topics because one set would be the top-level topic and the other set would be the responses. It might be too cumbersome as a solution to be workable for you, as it would require a lot more dialogue to be created, but the responses, ticked as a Goodbye, would exit the menu like you want.
User avatar
Ebony Lawson
 
Posts: 3504
Joined: Fri Feb 16, 2007 11:00 am

Post » Wed Feb 16, 2011 4:29 pm

Bonedog, if I'm understanding you correctly, then can you do everything you are trying to accomplish without equipping an item? I've implemented something like this to get Charon to holster his weapon in my mod. I just add and remove one piece of ammo (in the Results Script) into his inventory with a dialogue "command" that tells him to holster his weapon. I did it this way because I couldn't figure out what makes followers have their weapons out at the stupidest times and it was driving me nuts but I knew that entering the trading menu fixed it (not trading anything with him just entering and exiting the menu).

A lot of times merely adding or removing items from their inventory is enough to get them to recheck their numbers, but I've noticed that it's inconsistant in cells with a lot of activity and I don't always trust it. Using the 'removeitem from equipped state', however, works every time... same as the trade menu or OpenTeammateContainer 1. I use an invisible wearable item because if I have them equip it to a spot not used by other things (so nothing worn ever gets replaced), and if it's completely weightless with no model (so that it never even renders), it really doesn't matter one bit if I'm having them equip something or not. The advantage of using the equip method though, is that the player won't ever know it's been done (unlike accessing a dialog or opening a menu), and it's basically the equivalent to ripping down the NPCs pants from behind.. they have no choice but to recheck their status. It's like the EVP for stubborn inventory stats and quirky idle animations. Every one of my custom followers detect when I've exited their trade menu, and then automatically add, equip, and remove the invisible item on their own. They also do it in an OnLoad block, and since putting those into place I haven't seen one of them trying to smoke their pistol or wearing their rifle on their chest.
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Thu Feb 17, 2011 5:46 am

They also do it in an OnLoad block, and since putting those into place I haven't seen one of them trying to smoke their pistol or wearing their rifle on their chest.


Brilliant! That's a great solution. I hate it when they do their weapon shenanigans.
User avatar
Strawberry
 
Posts: 3446
Joined: Thu Jul 05, 2007 11:08 am

Post » Wed Feb 16, 2011 3:38 pm

I agree its a great method Bonedog - simple and reliable.

This is going in my permanent book - I just need to find that body slot to use for my mod!

Cheers

Miax
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am

Post » Thu Feb 17, 2011 3:46 am

I agree its a great method Bonedog - simple and reliable.

This is going in my permanent book - I just need to find that body slot to use for my mod!

Cheers

Miax


I'm trying it first with just the ammo trick I've used for Charon's weapon and it seems to be working fine. I figure I'll move to the armor trick if it turns out to be too unreliable in really busy areas later on, but I didn't want to have to decide on a slot for the armor. I am currently working on Clover as a playmate for Charon and the ammo trick fixed the weapon out problem right away. I've been dragging her in and out of the PFalls door all afternoon just to be sure (and because it was soooo satisfying). I had Sydney and Charon with me and she looked great and they looked like the usual idiots with their weapons out. Then I took them all on a tour of Wasteland portals and it was still working. I cannot tell you, Bonedog, how happy you've made me. This silliness with weapons makes me crazy.

Tarrant, I'm sorry about the thread hijack. :) llama
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Thu Feb 17, 2011 4:08 am

Thanks.

This is going in my permanent book...

Make sure to put a note about how flexible using invisible wearables is. Try them for the player.. totally blank and weightless, but give them an inventory icon so you don't get the PIP OS no icon warning in the inventory window icon display. From there you can run any number of menus by hotkeying the item, and have it unequip itself after a choice is made.. menus anywhere from a single keystroke. Can also have it automatically unequip itself at the end of the OnEquip block.. I do this to summon (via PlaceAtMe) one of the Anchorage Spider Mines.. player faction of course. Can drop tons of them merely by tapping the hotkey.
User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Wed Feb 16, 2011 8:24 pm

Well,

I do have a piece of custom headgear I use for this purpose. I tried this and it's not helping in my case of dialogue.

Here's what it's process is, if it helps. It involves 2 NPCs not 1.

NPC1 has two top level options. One is for "how many stimpacks do you have?" and the other is "Let's trade equipment that you're using".

You click the "let's trade", and it does an openteammatecontainer on NPC number 2, not the one you are talking to.

You stick your items into NPC2's inventory and click okay. NPC1's object script detects the closure of the other NPC's teammatecontainer through a menumode block, and moves the items from NPC2 to NPC1.

Behind the openteammatecontainer, you can see where your dialogue options have not shifted to speak of.

When I put the additem/equipitem/removeitem code into the menumode block that is moving the items from NPC2 to NPC1, it makes no difference in that dialogue.

---

Now the idea of putting the code into an onload block on follower NPCs definitely got my attention. I'll be trying that to see if wristwatch weap situation is improved for having done it.

---

On the other thing. When I put other "choice" options into my trade-dialogue thingie, that option does not do anything at all. It doesn't matter if "info refusal" is checked off or not. Screenshot of failage dialogue choice: http://www.finhosting.fi/~fallout/screenshots/dialoguefail.jpg . In-game, when I pick the grey-highlighted dialogue option, I do not see "FollowersGroupEND" topic, I see all of the topics from before, unchanged, with conditions not updated.
User avatar
Tamara Primo
 
Posts: 3483
Joined: Fri Jul 28, 2006 7:15 am

Post » Wed Feb 16, 2011 4:31 pm

When I put the additem/equipitem/removeitem code into the menumode block that is moving the items from NPC2 to NPC1, it makes no difference in that dialogue.

My first thought is that menumode blocks only run when not in gamemode (ie- parts of the system are paused), and I'm fairly sure the equip trick needs to be done while in gamemode. If what you're wanting to do is all based off of one displayed conversation without exiting all menus and menumode to allow the halted parts of the system to catch up, then I'd have to think rattling the inventory with the equip trick probably won't work.

If you're stacking the inventory menu on top of the topic dialog, I can't see how one would get the dialog window underneath to update when it's not the active window. I would think the inventory window would need to be closed and the dialog display refreshed somehow before it would re-evaluate and reprint any changes made since the last time that text was displayed. I may be wrong on that, but I don't think windows that've had their focus stolen update until they get their focus back.
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Wed Feb 16, 2011 8:09 pm

My first thought is that menumode blocks only run when not in gamemode (ie- parts of the system are paused), and I'm fairly sure the equip trick needs to be done while in gamemode. If what you're wanting to do is all based off of one displayed conversation without exiting all menus and menumode to allow the halted parts of the system to catch up, then I'd have to think rattling the inventory with the equip trick probably won't work.

If you're stacking the inventory menu on top of the topic dialog, I can't see how one would get the dialog window underneath to update when it's not the active window. I would think the inventory window would need to be closed and the dialog display refreshed somehow before it would re-evaluate and reprint any changes made since the last time that text was displayed. I may be wrong on that, but I don't think windows that've had their focus stolen update until they get their focus back.


I am thinking along the same lines you are, on both points.

and I cannot make the trade line a goodbye line, at least while unvoiced? because it hangs and requires the player to click-off on the unvoiced <...> doohickey of mine. I don't know if voicing it would fix it, but maybe. sigh.
User avatar
Lance Vannortwick
 
Posts: 3479
Joined: Thu Sep 27, 2007 5:30 pm

Post » Thu Feb 17, 2011 2:38 am

I am thinking along the same lines you are, on both points.

and I cannot make the trade line a goodbye line, at least while unvoiced? because it hangs and requires the player to click-off on the unvoiced <...> doohickey of mine. I don't know if voicing it would fix it, but maybe. sigh.

Well... the reason I say that is, if you think about it, technically the function string and order you're attempting to do in that dialog wouldn't be that difficult to pull off using sequential ShowMessages, but it's only because there's a pass or two through the gamemode block in between those showmessages that would allow that to work. A topic dialog doesn't give you that half a second of gamemode in between selections, it holds ALL focus until the final exit... and that's where I think the update issue is ocurring for ya (referring to the errant GetItemCount numbers).

I would think one could get it to work if you set up the 'make the trade' topic so that it drops completely out of dialog before cueing the trade menu to actually swap those items, like with a short timer between them just as long as it takes for the dialog camera to pull out of focus. You could have the trade option that you select change the <..> that's displayed to another prompt, maybe to verify the choice while secretly ending all of it. Then you can detect the trade menu exit in a non-menumode block, hammer the equip trick, and then force dialog with the player again right away if needed. Doesn't flow quite as smoothly as a single conversation, but I bet it'd work, and I'd bet the item numbers you get would be correct. In essence, all you would be adding is a camera pan out before the trade menu, and a camera pan back in after it to resume dialog.. doesn't seem too distracting or invasive.
User avatar
TIhIsmc L Griot
 
Posts: 3405
Joined: Fri Aug 03, 2007 6:59 pm


Return to Fallout 3