topic disappears while talking

Post » Fri Nov 06, 2009 5:07 pm

i'm working on dialogue and the npc keeps forgetting the topics. i thought once a npc learned a topic it should stay there. i said hi, it added topic, i asked about topic, npc told me story, i asked again, npc told me what to get and updated journal to next step then topic just disappears. i have a response for when you talk to npc before next step is finished so she should talk to me. if i force journal to next step in console, topic reappears but dont want it to do that. i want it to stay there for the entire game. and can you add or remove items to a player during a quest or does that end it? tried to give player money and take stuff from inventory but it erased the topic too? help please!
User avatar
Andrew Lang
 
Posts: 3489
Joined: Thu Oct 11, 2007 8:50 pm

Post » Fri Nov 06, 2009 3:59 pm

Try saving, quitting, and then reloading the game. That usually works, if not, I dont know how to help you, but heres a link that might be useful
http://cs.elderscrolls.com/constwiki/index.php/NPCs,_Horses,_and_you...
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Fri Nov 06, 2009 5:08 pm

How much dialogue are we talking about? You could try posting it here if is isn't too much. If you want to convert your dialogue to text for easy posting, you can try http://code.google.com/p/mlox/wiki/Tes3cmd (if you don't mind using a command line tool that is. Download tes3cmd 0.37l http://code.google.com/p/mlox/downloads/list).:

tes3cmd dump --wrap --type info --match "topic:my topic" "my plugin.esp" > dialog.txt

Substitute your topic and plugin name in there in the appropriate places and you can post the contents of dialog.txt here.
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Fri Nov 06, 2009 3:55 pm

i'm working on dialogue and the npc keeps forgetting the topics. i thought once a npc learned a topic it should stay there. i said hi, it added topic, i asked about topic, npc told me story, i asked again, npc told me what to get and updated journal to next step then topic just disappears. i have a response for when you talk to npc before next step is finished so she should talk to me. if i force journal to next step in console, topic reappears but dont want it to do that. i want it to stay there for the entire game. and can you add or remove items to a player during a quest or does that end it? tried to give player money and take stuff from inventory but it erased the topic too? help please!

The topic still exists, but the filtering conditions for any of your entries is not being satisfied. This is why the topic becomes available again after you update the journal through the console. It sounds like the NPC is offering the player a quest. When the player accepts the quest the journal updates there are no entries available for that journal entry. Presumably when the player retrieves the quest items the journal is updated to the index that allows the quest to be completed. That entry exists but the journal is not yet set to that value.

There are two approaches you can take to resolve the problem:

1) Have some method to updating the journal after the player finds the items. If the items are acquired through dialog with another NPC, dialog results could update the journal. If the items are unique, you can place a script on them that checks for being in the player's inventory and update the journal. Place script on one item that checks for all. Or you could launch a global script from dialog results with the NPC who offers the quest. The script checks for the items in the player's inventory, updates the journal and then is stopped.

2) Filter a dialog entry for the journal index of the quest active and add filters for the items (e.g. Item: food_kwama_egg_01 >= 5). If the player has the items, the topic will be available and the journal can update from dialog results. You can have two entries for the active journal index: one if the player has the items and another if the player does not. That way the topic is always available if that is what you want.

It sounds as if this is intended to be ongoing and not a one-time quest. If that is the case, you will want to go with the second option, and have an entry for the 'terminal' journal index that still checks for the items. If the player has the items, the transaction takes place, but there is no journal update (since that happened the first time through for the player).

I hope that I have interpreted your situation correctly. If not, or if my explanation was not clear, post again with a little more information for us.
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Fri Nov 06, 2009 3:57 pm

its a lot of dialogue. so that probably won't work. i already saved, closed, reopen, all sorts of stuff and its still disappearing in game. i wont post all the dialogue but i'll make it super shortened and i tell you what i did. (new armor is the topic that disappears)

1 npc says hi want to help me with my work? adds topic my work with the function of only saying first time player talks to npc - and that works
2 click my work and she tells you she's working on a new armor type- add quest to journal with result box and adds topic new armor
3 click new armor she says she needs some stuff - updates journal to 2 and the topic disappears (never mind here i fixed this one)
4 ask about new armor again and i want her to take the stuff and give you money but NOT end the quest and then tell the player to return in 24 hours so in the result box it updates the journal to step 3, adds 5000 gold and takes all the stuff she wanted from you

i tried to add two more responses after that - one was: "no not yet" with the variables journal >= 3 and local - localdayspassed < 1
and the other: "im ready" with the variable journal >= 3 and local - localdayspassed >=1

but when i did the previous step (taking the stuff and giving money and tell you to return in 24 hours) the topic disappeared and wouldnt come back even if i waited 24 hours. so i deleted that step all together (all you did is return with the stuff and ask about the new armor) and if you cilck it twice in a row it will respond like 24 hours has passed and move on so that much of the dialogue is correct obviously. but i dont want that so i tried to make you wait again with the variables up there and the topic disappeared again and wont come back until i force the journal to the next step and add the stuff i need in console again. (next step you need more stuff for her) i must be doing days passed wrong?
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

Post » Sat Nov 07, 2009 5:17 am

Does the NPC in question wear a script that declares a local short variable localdayspassed? I suspect not, and that is why the filtering conditions of both entries cannot be satisfied resulting in the topic not being available. If you are going to use this local variable as a dialog filter for your NPC the variable must be declared in a local script attached to the NPC. Even that is not enough. The script must monitor the passage of time and update the variable as appropriate. The NPC Kaye uses such a script to delay the offering of Imperial Cult quests in the event that the player does not complete the current quest. The script name is WaitOneDay. It is poor written, but it will give you the idea if you want to look at it.

If this a new NPC, it should be easy to write and attach a similar script to him/her. If it is an existing NPC, it might be better to devise another approach than to make changes to him/her. A global script started from dialog results could track time and a global variable could be toggled when the time is up for use as a dialog filter. These are just a few suggestions as to how the matter might be resolved.
User avatar
Alexxxxxx
 
Posts: 3417
Joined: Mon Jul 31, 2006 10:55 am

Post » Sat Nov 07, 2009 2:08 am

i dont know anything about script writing and didnt know you needed one to make a player wait 24 hours. thats why i tried to do everything in variables and result box. but my npc is new so i can put a script on her to make the player wait when they get to that point in the quest? i will look at kaye but i really dont understand scripts much. i will try though. thank you for all your help :thumbsup:
User avatar
Aman Bhattal
 
Posts: 3424
Joined: Sun Dec 17, 2006 12:01 am

Post » Fri Nov 06, 2009 6:32 pm

If the NPC is new (not one of Bethesda's original NPCs) you can attach a script to him/her with abandon. If it is an official NPC they you would be inviting conflicts with other mods - it is not a certainty, but a possibility worth tying to avoid. In the latter case, a global script with a global variable for a dialog filter would be the safer way to go. If that is the approach you want to take then we can help you implement it. For now I will offer a local script you can attach to the NPC:

Begin nax_OneDayDelay; short noLore ; optional dialog filter if you want to limit your NPC's conversationshort workCompleted ; 0 = no work, -1 = work in progress, 1 = work completedshort currentDayif ( workCompleted == -1 ) ; set through dialog with NPC when job offered    if ( currentDay != Day ) ; set through dialog with NPC when job offered        set workCompleted to 1    endifendifEnd nax_OneDayDelay


When the player commissions the NPC to make the new armor you set workCompleted and currentDay in dialog result:

set workCompleted to -1 ; in progress
set currentDay to Day

You filtered your in-progress response for the topic 'new armor' for Local: workCompleted = -1. The next (or any subsequent) day that the player visits the script will update workCompleted to 1. You filtered the dialog entry that offers the player the completed armor commission for Local: workCompleted == 1. In dialog results for that entry you set workCompleted back to 0 for the next time the player wants new armor.

set workCompleted to 0 ; reset

It is worth taking the time to develop some proficiency in scripting. Do it slowly, studying official scripts and those from other mods. There are a number of guides and resources available such as:

http://www.tamriel-rebuilt.org/files/tuts/MWSFD90_Word.zip

http://www.uesp.net/wiki/Tes3Mod:Modding

There are many tutorials linked from the pinned threads at the top of this forum, and of course you are always welcome to post questions you have in this forum. There are many capable members of our community who are willing to help.
User avatar
Emma Louise Adams
 
Posts: 3527
Joined: Wed Jun 28, 2006 4:15 pm


Return to III - Morrowind