temnix Posted September 14, 2016 Posted September 14, 2016 I asked this obliquely, and now directly: what are the basics of the journal for BGEE, past 2.0? Or the previous way journal worked, whatever it was. I could use an example of a simple quest. This is all about Weidu, you see. All I need to finish a little mod is to figure out what to write in the Weidu code so it creates one quest entry, then creates the quest-done entry and erases the first one. Help would be appreciated.
Roxanne Posted September 14, 2016 Posted September 14, 2016 Ingrediences: Your tra file, e.g setup-mymod.tra which among others contains the text for your journal entires and is located in the subfolder mymod/TRA/setup-mymod.tra@001=~My quest one The quest starts~ @002=~My quest one The quest is finished~ Your tp2 with this entryADD_JOURNAL @001 @002 USING ~mymod/TRA/setup-mymod.tra~ the triggersany actions defined in a script or dialogue file, whatever suits your mod To start AddJournalEntry(@001,QUEST) To end EraseJournalEntry(@001) AddJournalEntry(@002,QUEST_DONE) And yes, there are other ways to do it - this is just one possibility. However, with this method you get the entries in the desired part of the journal for previous EE versions and it should work in 2,3 once the Weidu is updated (currently in EE v2.3 you get all the entries unsorted in the *journal* pages and not in the *quest* pages even if you define them as quest.)
temnix Posted September 14, 2016 Author Posted September 14, 2016 This is incredibly helpful. Thank you.
temnix Posted September 15, 2016 Author Posted September 15, 2016 It seems that my praise was premature. The tp2 installed with errors, and I get completely wrong tlk entries for the quest.
Roxanne Posted September 15, 2016 Posted September 15, 2016 It seems that my praise was premature. The tp2 installed with errors, and I get completely wrong tlk entries for the quest. 7776.jpg Obviously your tra tp2 and d file references do not match to each other - I jist gave an example, you need to adapt it to the files you use in your mod (i.e. your path set for dialogues to look for translations does not match the tp2. (Do you have something like this at the beginning of your tp2 AUTO_TRA ~mymod/TRA/%s~ LANGUAGE ~English~ ~english~ ~mymod/TRA/setup-mymod.tra~) If you have traified dialogues the journal entries to reference will be in those d's not in the setup.....
temnix Posted September 15, 2016 Author Posted September 15, 2016 No, I don't have anything with translations. This is an English-only mod, and I changed the paths in your examples, of course.
Roxanne Posted September 15, 2016 Posted September 15, 2016 No, I don't have anything with translations. This is an English-only mod, and I changed the paths in your examples, of course. Yes, yes... But if you use e.g. the AddJounalEntry(@001,QUEST) in a d-file action, you need to tell Weidu where it finds the @001 text (even if you just have a single language only - you do that by the tp2 entries for tra path) Otherwise you need to use strngrefs or whole texts or other methods (like I said earlier, there are other methods, I just showed one for example without knowing what you already had or had not in your mod.)
temnix Posted September 16, 2016 Author Posted September 16, 2016 So what else do I need to write in the tp2 file for this method to work?
K4thos Posted September 16, 2016 Posted September 16, 2016 Here is a tutorial with everything explained step by step: http://gibberlings3.net/forums/index.php?showtopic=26671
Roxanne Posted September 16, 2016 Posted September 16, 2016 So what else do I need to write in the tp2 file for this method to work? Here is a tutorial with everything explained step by step: http://gibberlings3.net/forums/index.php?showtopic=26671 This is the full tutorial - however what temnix seems to be missing in his mod is actually to reference between his journal entires in the tra files to the triggers in his dialogue files. Your tp2 probably has a header part, before the first BEGIN where you put such stuff, eg. BACKUP ~tenmixNPC/backup~ AUTHOR ~tenmix@contact~ VERSION ~v0.1~ AUTO_TRA ~tenmixNPC/TRA/%s~ LANGUAGE ~English~ ~english~ ~tenmixNPC/TRA/setup-tenmix.tra~ BEGIN ~First component of tenmix mod~ lot of tp2 stuff COMPILE....blalalalal ADD_JOURNAL @001 @002 USING ~tenmixNPC/TRA/setup-tenmix.tra~
temnix Posted September 16, 2016 Author Posted September 16, 2016 Yes, it almost works now. Only the first entry that started the quest, the one I put it with AddJournalEntry(@1,QUEST) - this one doesn't get erased. I have EraseJournalEntry(@001) AddJournalEntry(@002,QUEST_DONE) in the finishing dialogue. The @002 appears alright, but the original stays.
Roxanne Posted September 16, 2016 Posted September 16, 2016 Yes, it almost works now. Only the first entry that started the quest, the one I put it with AddJournalEntry(@1,QUEST) - this one doesn't get erased. I have EraseJournalEntry(@001) AddJournalEntry(@002,QUEST_DONE) in the finishing dialogue. The @002 appears alright, but the original stays. If you use AddJournalEntry(@1 and EraseJournalEntry(@001 it cannot work, you need to use identical references. You can also use NI to see if STRREF gained from your entries are identical. Another reason for failure is when you modify the text of your journal entries in between. PS Weidu does not give you an error if you want to erase something that does not exist...
temnix Posted September 16, 2016 Author Posted September 16, 2016 Fuck, of course. I just saw it. Sorry.
temnix Posted September 16, 2016 Author Posted September 16, 2016 Nope. It wasn't that. I copied the text wrongly here, but it was okay in the d file. What it says in the quest-giving reply is, I'll give you the whole line: IF ~~ THEN DO ~SetGlobal("QEEBIEWAITS","GLOBAL",1) AddJournalEntry(@001,QUEST)~ EXIT And this is the quest-complete line: IF ~~ THEN DO ~AddexperienceParty(50) TakePartyGold(100) GiveItem("DUSTSC_#",LastTalkedToBy()) GiveItem("JUNKSC_#",LastTalkedToBy()) EraseJournalEntry(@001) AddJournalEntry(@002,QUEST_DONE) EscapeAreaDestroy(10)~ EXIT So? The tra hasn't changed since I created it.
Roxanne Posted September 16, 2016 Posted September 16, 2016 Nope. It wasn't that. I copied the text wrongly here, but it was okay in the d file. What it says in the quest-giving reply is, I'll give you the whole line: IF ~~ THEN DO ~SetGlobal("QEEBIEWAITS","GLOBAL",1) AddJournalEntry(@001,QUEST)~ EXIT And this is the quest-complete line: IF ~~ THEN DO ~AddexperienceParty(50) TakePartyGold(100) GiveItem("DUSTSC_#",LastTalkedToBy()) GiveItem("JUNKSC_#",LastTalkedToBy()) EraseJournalEntry(@001) AddJournalEntry(@002,QUEST_DONE) EscapeAreaDestroy(10)~ EXIT So? The tra hasn't changed since I created it. Actually this should work (at least from the code)....but - in my experience the journal operations have some delay in the execution. This is why I always use this .....EraseJournalEntry(@001) Wait(2) AddJournalEntry(@002,QUEST_DONE) Wait(2) EscapeAreaDestroy(10)~ EXIT Nothing I can prove, but it is worth a try. I found that combining journal operations with many other actions simultaneously may lead to one or other action not being executed correctly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.