Aller au contenu

Photo

Quest not ending...


  • Veuillez vous connecter pour répondre
29 réponses à ce sujet

#1
Who said that I

Who said that I
  • Members
  • 492 messages

okay I managed to get the questing functional as per lexicon....but here is the issue I am walking into...

 

I wanted to make them persistent so I decided to simply write it all down, in theory it all works fine so far but it does not store the quest at all!

 

the pc can get threough the quest allright but I get to the point where it does not go to the part of the conversation that renders the player unable to do the quest again....

 

Okay so below I will place the scripts of the tutorial quest I made and hope someone can laugh and point out what I did wrong this time :S

 

(QG = Quest giver, PC = PC)

 

QG: Excuse me, could you help me get my doohickey back please?

PC+ Sure! Be right back!

 

Action taken tab:

 

//::///////////////////////////////////////////////

//:: FileName dlg_plott_02
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 7:08:27
//:://///////////////////////////////////////////
#include "pqj_inc"
void main()
{
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "iPlottQuest", 100);
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("QTT", 1, oPC, FALSE);
}
 

 

QG: Have you found the Doohickey yet?

 

Text appears when tab:

 

//::///////////////////////////////////////////////

//:: FileName dlg_plott_01
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 6:58:19
//:://////////////////////////////////////////////
int StartingConditional()
{
 
    // Inspect local variables
    if(!(GetLocalInt(GetPCSpeaker(), "iPlottQuest") == 100))
        return FALSE;
 
    return TRUE;
}
 

 

PC+ Yep!

 

TAW tab

 

//::///////////////////////////////////////////////

//:: FileName dlg_plott_03
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 7:11:58
//:://////////////////////////////////////////////
#include "nw_i0_tool"
#include "pqj_inc"
 
int StartingConditional()
{
 
    // Make sure the PC speaker has these items in their inventory
    if(!HasItem(GetPCSpeaker(), "itemPlottsDoohickey"))
        return FALSE;
 
    return TRUE;
}
 

 

 

OnActionTaken - tab

 

//::///////////////////////////////////////////////

//:: FileName dlg_plott_03b
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 15:57:33
//:://////////////////////////////////////////////
#include "pqj_inc"
void main()
{
    // Give the speaker some gold
    GiveGoldToCreature(GetPCSpeaker(), 1);
 
    // Give the speaker some XP
    GiveXPToCreature(GetPCSpeaker(), 1);
 
 
    // Remove items from the player's inventory
    object oItemToTake;
    oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "itemPlottsDoohickey");
    if(GetIsObjectValid(oItemToTake) != 0)
        DestroyObject(oItemToTake);
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "iPlottsQuest", 200);
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("QTT", 3, oPC, FALSE);
}
 

 

 

QG: Oh thank you so much for giving it back to me!

 

TAW- tab

 

//::///////////////////////////////////////////////

//:: FileName dlg_plott_01
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 6:58:19
//:://////////////////////////////////////////////
#include "pqj_inc"
int StartingConditional()
{
 
    // Inspect local variables
    if(!(GetLocalInt(GetPCSpeaker(), "iPlottQuest") == 200))
        return FALSE;
 
    return TRUE;
}
 

 

 

as you can tell I want to use the PQJ (Persistent Quest Journal) but only the quest entry remains persistent....how do I fix this?



#2
SHOVA

SHOVA
  • Members
  • 522 messages

local int does not save over module restarts.

 

What you want to use is GetCampaignInt, and SetCampainInt.



#3
meaglyn

meaglyn
  • Members
  • 807 messages

Or just use the quest state variable instead of using a different different variable...

i.e.

 if (!(GetLocalInt(GetPCSpeaker(), "NW_JOURNAL_ENTRY" + "QTT") == 3)) 

instead of

 if(!(GetLocalInt(GetPCSpeaker(), "iPlottQuest") == 200))

in that last TAW script. And check that variable for state 1 instead of checking "iPlottQuest" for 100 in the other one and remove all of the "iPlottQuest"  lines.



#4
Who said that I

Who said that I
  • Members
  • 492 messages

Or just use the quest state variable instead of using a different different variable...

i.e.

 if (!(GetLocalInt(GetPCSpeaker(), "NW_JOURNAL_ENTRY" + "QTT") == 3)) 

instead of

 if(!(GetLocalInt(GetPCSpeaker(), "iPlottQuest") == 200))

in that last TAW script. And check that variable for state 1 instead of checking "iPlottQuest" for 100 in the other one and remove all of the "iPlottQuest"  lines.

So if I add that the quest can be ended like it is supposed to? Since now it keeps going back to asking me if I got the item after I finished it and when restarting the module the journal entry is there but the quest itself is like gone....



#5
Who said that I

Who said that I
  • Members
  • 492 messages

it appears to be working thanks Meaglyn!


  • Zwerkules aime ceci

#6
Verilazic

Verilazic
  • Members
  • 162 messages

local int does not save over module restarts.

 

What you want to use is GetCampaignInt, and SetCampainInt.

 

Wat.

 

Wait, local ints still save if you save a single player game and reload it, right? Are you referring to persistence for a PW?


  • Who said that I aime ceci

#7
meaglyn

meaglyn
  • Members
  • 807 messages

Yes. Loading a saved game is not restarting the module really.



#8
Who said that I

Who said that I
  • Members
  • 492 messages

Wat.

 

Wait, local ints still save if you save a single player game and reload it, right? Are you referring to persistence for a PW?

yes, PW and no I am not loading a saved game of a module since the module I am working on is supposed to be a pw so wouldnt make much sense if I would XD



#9
Verilazic

Verilazic
  • Members
  • 162 messages

Okay thanks. For a second there I thought I would need to change my approach to scripting quests in my single player module. Sorry for the confusion.


  • Who said that I aime ceci

#10
Who said that I

Who said that I
  • Members
  • 492 messages

Okay, here I am suffering from yet another QUEST issue....

 

I want to make the PC deliver a letter from A to B. The A part is easy , pc gets the quest and then you go to B person.

 

But the B person only gives you the plotless response (Hello stranger)

 

I am using http://www.nwnlexico...=A_Simple_Questas my guide and the plotwizard as my model (since I know I will screw up otherwise since it is supposed to be counting down the textnodes)

 

who can help me please?



#11
Who said that I

Who said that I
  • Members
  • 492 messages

nvm fixed it :) 



#12
Who said that I

Who said that I
  • Members
  • 492 messages

okay here is the following quest issue I do not see my way around with...

 

I altered quests from the plot wizard to make them persistent, the journal tag has been changed as well and now it is persistent and working alright but on completion you get an error blank entry of the original quest/journal tag....

 

anyne know how to fix this problem?



#13
Who said that I

Who said that I
  • Members
  • 492 messages

So anyone know how to fix the quest journal entry error?



#14
meaglyn

meaglyn
  • Members
  • 807 messages

You haven't really posted enough information for us to help much. But usually when you get a blank entry it means you set the quest state to a value for which you do not have a journal entry.  Take a look at the states you are setting in your scripts and make sure you have an entry in the journal editor for each.



#15
Who said that I

Who said that I
  • Members
  • 492 messages
Not entirely sure what other info i can give here. But will try to explain again:

- i made the quests with plotwizard
-i altered the quests from plotwizard script settings to the scripts used in the lexicon.
- then changed the scripts into persistent scripts.
-deleted the older scripts from plotwizard.

Result:
- got an extra blank error entry upon completion of the quest. (Quest entry for the quest IS working and saved in conpleted list).

So this is what I did and what has happened...dunno what other info i can give....

#16
meaglyn

meaglyn
  • Members
  • 807 messages

Did you read the rest of what I wrote?  Have you checked that you are setting the states to values which are in the journal? And only the tag you are working on.

 

As to the rest of the info... well, in order for me to check the above I'd need all the scripts related to this quest and your journal file etc. So it would be better for you to do it.

 

So you are saying you have the expected entry in the completed list _and_ a blank one in the pending? Sounds like you have two journal quests with the same name and some script it still using the tag of the second one. I don't think you will get a single quest to be in both completed and pending states at the same time. 



#17
Who said that I

Who said that I
  • Members
  • 492 messages

Letter deliver quest:

NPC 1 

 

- (after completion)

//::///////////////////////////////////////////////
//:: FileName dlg_bug_01
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 19-9-2015 8:12:45
//:://////////////////////////////////////////////
int StartingConditional()
{
 
    // Inspect local variables
    if (!(GetLocalInt(GetPCSpeaker(), "NW_JOURNAL_ENTRY" + "LOVE") == 3))
        return FALSE;
 
    return TRUE;
}

 

 

 
- (During quest)
 
//::///////////////////////////////////////////////
//:: FileName dlg_plott_01
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 6:58:19
//:://////////////////////////////////////////////
int StartingConditional()
{
 
    // Inspect local variables
     if (!(GetLocalInt(GetPCSpeaker(), "NW_JOURNAL_ENTRY" + "LOVE") == 1))
        return FALSE;
 
    return TRUE;
}
 

 

 

- (Quest acceptation) 

//::///////////////////////////////////////////////
//:: FileName dlg_plott_02
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 17-9-2015 7:08:27
//:://///////////////////////////////////////////
#include "pqj_inc"
void main()
{
    // Set the variables
    SetLocalInt(GetPCSpeaker(), "iLoveQuest", 100);
    // Give "letter" to the PC.
 
// Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
 
    // Give "letter" to the PC.
    CreateItemOnObject("letter", oPC);
 
    // Update the player's journal.
    AddPersistentJournalQuestEntry("LOVE", 1, oPC, FALSE);
}


#18
meaglyn

meaglyn
  • Members
  • 807 messages

Those are some of them yes...  I assume you have some action taken scripts as well?

 

Are you using the conversation to set any journal entries directly?  You should not be when using PQJ.  Maybe you have one left over

from before?

 

Have you looked for extra things that assign journal entries? Do you have a second journal quest with the same name?  You are the one who needs to do this looking...



#19
Who said that I

Who said that I
  • Members
  • 492 messages
No i do not. What I did do though was rename the journal tag.

Right now still have the original scripts from the plotwizard for this quest

#20
meaglyn

meaglyn
  • Members
  • 807 messages

Ahh, well you may still have a persisted entry for the old one.   If it's persisted it will add a journal quest entry on restore and it may give you a blank one if there is no journal item with that tag.   I assume your answer was referring to the last of the questions I asked.

 

You could set that quest with the old tag to state 0 on client enter (after reloading persisted states).



#21
Who said that I

Who said that I
  • Members
  • 492 messages
BTVS_0001c_zpszysetpn3.jpg

This is what I get AFTER I completed the quest. Thought this screenie would possibly help with understanding said issue?

@maeglyn
How do I do that?

#22
meaglyn

meaglyn
  • Members
  • 807 messages

If that shows up on completion then you are setting an entry for a quest with tag p001 in one of your action taken scripts OR in the conversation node.   I assume that the tag of the Lover's Walk quest is not p001 anymore.

 

Please look at your conversation and make sure that the journal or quest entry field is not set on any of the nodes.  Take a look at your action taken scripts for the completion of the quest. (You have not bothered to post that one which I'd think would have some bearing.) Make sure you are not adding a journal quest entry for "p001" anywhere.

 

Since it only shows up on completion it is going to be one of the things I mentioned above rather than a persisted state of the old tag so don't worry about that.


  • Fester Pot aime ceci

#23
Fester Pot

Fester Pot
  • Members
  • 1 393 messages

Agree with meaglyn here.

Blank journal entries are exactly that, unspecified entires completely removed from the journal, incorrect tag of a journal, or unspecified number of a properly tagged journal entry.

Search your scripts wide for "p001". If you don't find that entry, it is most likely a journal entry located in a conversation under the Other Actions Journal tab.

FP!



#24
Who said that I

Who said that I
  • Members
  • 492 messages

Agree with meaglyn here.

Blank journal entries are exactly that, unspecified entires completely removed from the journal, incorrect tag of a journal, or unspecified number of a properly tagged journal entry.

Search your scripts wide for "p001". If you don't find that entry, it is most likely a journal entry located in a conversation under the Other Actions Journal tab.

FP!

 

 

If that shows up on completion then you are setting an entry for a quest with tag p001 in one of your action taken scripts OR in the conversation node.   I assume that the tag of the Lover's Walk quest is not p001 anymore.

 

Please look at your conversation and make sure that the journal or quest entry field is not set on any of the nodes.  Take a look at your action taken scripts for the completion of the quest. (You have not bothered to post that one which I'd think would have some bearing.) Make sure you are not adding a journal quest entry for "p001" anywhere.

 

Since it only shows up on completion it is going to be one of the things I mentioned above rather than a persisted state of the old tag so don't worry about that.

 

 

so basically (if I understand this right)  Deleting those scripts should fix the issue? Since now I even get it upon taking the quest (And no none of the original p001 scripts are in the conversation nodes)



#25
meaglyn

meaglyn
  • Members
  • 807 messages

I don't know what scripts you are talking about deleting...

 

In the conversation it is not scripts we were talking about. It would be, as FP said, the journal entry under the Other Actions tab.

 

If you want to show us the action taken scripts for the conversation maybe that would show something.