View Single Post
Old 04-03-2012, 05:27 AM   #7
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 565
Also (atleast for KOTOR2 that is) putting ", TRUE" behind the journal entry number allows lower entries from overriding the higher entries. Which can be very handy in non-linear quest progressions.

Example (from Kotor2 though);
Code:
void main()
{
int nDxnOpen;
if(GetGlobalNumber("500OND_Civil_War") > 1) nDxnOpen = 1; else nDxnOpen = 0;
int nDanOpen;
if(GetGlobalNumber("602DAN_End") > 0) nDanOpen = 1; else nDanOpen = 0;
int nDxnEst = GetGlobalNumber("301NAR_Geeda_Dxn");
int nDanEst = GetGlobalNumber("301NAR_Geeda_Dan");

int nJournal = GetJournalEntry("NewTradeRoutes");

if (nJournal == 0) return;

if(nDxnEst == 1 && nDanEst == 1)
    {
        AddJournalQuestEntry("NewTradeRoutes", 33, TRUE);
        return;
    }
if(nDxnEst == 1)
    {
		if(nDanOpen == 0)
		{
			AddJournalQuestEntry("NewTradeRoutes", 13, TRUE);
			return;
		}
		if(nDanOpen == 1)
		{
			AddJournalQuestEntry("NewTradeRoutes", 21, TRUE);
			return;
		}
    }
if(nDanEst == 1)
    {
		if(nDxnOpen == 0)
		{
			AddJournalQuestEntry("NewTradeRoutes", 31, TRUE);
			return;
		}
		if(nDxnOpen == 1)
		{
			AddJournalQuestEntry("NewTradeRoutes", 12, TRUE);
			return;
		}
    }
if(nDanOpen == 1 && nDxnOpen ==1)
     {
        AddJournalQuestEntry("NewTradeRoutes", 22, TRUE);
        return;
     }
if(nDanOpen == 1)
     {
        AddJournalQuestEntry("NewTradeRoutes", 21, TRUE);
        return;
     }
if(nDxnOpen == 1)
     {
        AddJournalQuestEntry("NewTradeRoutes", 12, TRUE);
        return;
     }
AddJournalQuestEntry("NewTradeRoutes", 11);
}
Hassat Hunter is offline   you may: quote & reply,