Author Topic: Quest not ending...  (Read 771 times)

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« on: September 17, 2015, 03:35:05 pm »


               

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?



               
               

               
            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Quest not ending...
« Reply #1 on: September 17, 2015, 04:03:47 pm »


               

local int does not save over module restarts.


 


What you want to use is GetCampaignInt, and SetCampainInt.



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Quest not ending...
« Reply #2 on: September 17, 2015, 04:13:26 pm »


               

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.


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #3 on: September 17, 2015, 07:47:53 pm »


               


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


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #4 on: September 17, 2015, 07:57:59 pm »


               

it appears to be working thanks Meaglyn!



               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Quest not ending...
« Reply #5 on: September 20, 2015, 02:38:46 pm »


               


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?


               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Quest not ending...
« Reply #6 on: September 20, 2015, 07:27:31 pm »


               

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



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #7 on: September 21, 2015, 08:45:00 am »


               


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


               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Quest not ending...
« Reply #8 on: September 21, 2015, 05:20:59 pm »


               

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.



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #9 on: September 24, 2015, 09:27:53 pm »


               

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?



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #10 on: September 25, 2015, 03:24:43 am »


               

nvm fixed it '<img'> 



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #11 on: September 27, 2015, 02:54:36 am »


               

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?


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #12 on: September 28, 2015, 05:55:29 pm »


               

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



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Quest not ending...
« Reply #13 on: September 28, 2015, 06:18:04 pm »


               

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.


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Quest not ending...
« Reply #14 on: September 28, 2015, 06:30:29 pm »


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