Jump to content


Photo

SOLVED/UNSOLVED JOURNAL


  • Please log in to reply
8 replies to this topic

#1 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 15 July 2003 - 05:31 PM

In one state I would like to use both SOLVED_JOURNAL and then UNSOLVED_JOURNAL. However, only whichever one gets put last gets done.

Is there something I'm doing wrong or can I just not have both a Solved Journal and Unsolved Journal right after one another? It compiles without any errors but here's how my code looks:

IF ~~ THEN BEGIN Join_16
SAY ~Thanks for killing the bad guy!~
IF ~~ THEN DO ~ReputationInc(-1) JoinParty()~ SOLVED_JOURNAL ~Kill Bad Guy #1

We've killed Bad Guy #1.~ UNSOLVED_JOURNAL ~Kill Bad Guy #2

We now must find and kill Bad Guy #2.~ EXIT
END

#2 -Moonfruit-

-Moonfruit-
  • Guest

Posted 15 July 2003 - 06:50 PM

Not sure if this is exactly what you are looking for, but I use the following two caommands for adding quests and completed quests to the journal:

AddJournalEntry(@100,QUEST)
AddJournalEntry(@101,QUEST_DONE)

HTH

#3 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 16 July 2003 - 03:13 PM

Well, that works but not like I was hoping it would work. With SOLVED_JOURNAL and UNSOLVED_JOURNAL I can use literal strings and everything works, I just can't use both in the same place. However, when I go to --traify it, UNSOLVED_JOURNAL ~Journal Entry goes here~ gets changed to AddJournalEntry("Journal Entry goes here",QUEST) and the string does not get --traified. It just sits in the new .d file as is. Also, when you compile a .d file with AddJournalEntry("Journal Entry",QUEST) weidu doesn't like this and returns AddJournalEntry(0,QUEST) and nothing gets added to my journal.

So, my question now is: Is there any way for me to write a hard coded .d file that includes journal entries and have WeiDU --traify all strings including the journal entries?

#4 -jcompton-

-jcompton-
  • Guest

Posted 16 July 2003 - 08:43 PM

However, when I go to --traify it, UNSOLVED_JOURNAL ~Journal Entry goes here~ gets changed to AddJournalEntry("Journal Entry goes here",QUEST) and the string does not get --traified. It just sits in the new .d file as is. Also, when you compile a .d file with AddJournalEntry("Journal Entry",QUEST) weidu doesn't like this and returns AddJournalEntry(0,QUEST) and nothing gets added to my journal.

So, my question now is: Is there any way for me to write a hard coded .d file that includes journal entries and have WeiDU --traify all strings including the journal entries?

That sounds like a traify bug, but in the meantime you can always just start building the .tra file just with the journal entries and then use --traify# if necessary to skip over the range of .tra refs you used for the journal.

#5 weimer

weimer
  • Member
  • 1569 posts

Posted 17 July 2003 - 09:23 AM

I'm not sure exactly what the traify bug (if any) you are describing is, but ...

The Infinity Engine DLG file format does not allow multiple JOURNALs per transition. 1 transition (= "reply") gets at most one JOURNAL. If you want more JOURNALy goodness, put it in an ACTION.

WeiDU cannot change this game-engine-based limit.

#6 weimer

weimer
  • Member
  • 1569 posts

Posted 17 July 2003 - 09:28 AM

To make this clearer, new versions of WeiDU will give an explicit error message.

BEGIN FOO

IF ~~ THEN BEGIN s0
  SAY ~Hello~
  IF ~~ THEN REPLY ~Goodbye~ 
    SOLVED_JOURNAL ~j1~ 
    UNSOLVED_JOURNAL ~j2~
    EXIT
END

[test.d] PARSE ERROR at line 8 column 5-8
Near Text: EXIT
        You may only have one JOURNAL per transition.  Recovering.
[test.d] parsed
Adding FOO to internal list of available DLGs
[FOO.DLG] saved 1 states, 1 trans, 0 strig, 0 ttrig, 0 actions


#7 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 July 2003 - 09:51 AM

I'm not sure exactly what the traify bug (if any) you are describing is, but ...

When using UNSOLVED_JOURNAL ~Journal Entry~ and then attempting to --traify you end up with AddJournalEntry("Journal Entry",QUEST) in the new .d file and nothing in the .tra file. And when you go to compile the .d/.tra files you end up with AddJournalEntry(0,QUEST) so therefore nothing would get added to the journal in game.

#8 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 17 July 2003 - 10:10 AM

There must be something wrong with your code.

I coded up a quick example and it worked fine for me.

Example .d file:

BEGIN ~test~

IF ~NumTimesTalkedTo(0)~ jp1
SAY ~Hey, woo!~
IF ~~ THEN REPLY ~Oh, yeah.  Woo alright.~ UNSOLVED_JOURNAL ~This is my solved journal.~ EXIT
END

Then I used weidu to traify the dialogue file in the normal manner:

weidu --traify test.d --dout test1.d

Here's the resulting .tra file:

@0    = ~Hey, woo!~
@1    = ~Oh, yeah.  Woo alright.~
@2    = ~This is my solved journal.~

And the new .d file:

BEGIN ~test~

IF ~NumTimesTalkedTo(0)~ jp1
SAY @0
IF ~~ THEN REPLY @1 UNSOLVED_JOURNAL @2 EXIT
END

Compiling it worked fine and showed up as expected in NI.

This was all with V127.
Check out BG1Tutu.

#9 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 July 2003 - 02:25 PM

It took a while, but I finally got it to work. Yay!