×
Меню
Индекс

MSFD Adding to the journal and testing journal entries

 
[no fix] Journal, "Journal_ID", Index_enum    
 
     Journal, MG_BCShroomsCombat, 10
 
This adds a journal entry to your in-game journal. The journal entry must have previously been set up in the dialogue editor. Index references which part of a journal topic is added. Beware of using simple names for journal topics, adhere to Bethsoft’s two letter standard (see above example) – otherwise the journal entry might show up as a regular conversation response, just like any other, if the topic title shows up in a conversation!
 
 
[no fix] SetJournalIndex "Journal_ID" index_enum    
 
     SetJournalIndex "MG_BCShroomsCombat" 99
 
SetJournalIndex will set the index to the specified value, whether or not an entry exists for that index. This can be used to restart quests or repeat sections (by setting the index backwards), or for temporary storage of simple flags that don't need an own journal entry. However, it should not be used to finish quests, as the quest will not be removed from the active quests list (Journal does not have this problem, so it is to be preferred for finishing quests).
 
Note: If the index set does not have a valid journal entry (i.e. that index isn't defined in the "info" section of the dialogue window), the value will be lost when a savegame is reloaded (the index will revert to the last valid entry given). Therefore this can also be used to detect if the player has reloaded the game:
 
if ( ( getjournalindex "dummy" ) != 100 )
   Messagebox "You just reloaded, Cheater!!!"
   setjournalindex "dummy" 100
endif
 
Where "dummy" is any journal topic that has no text for index 100.
 
The best thing is that it's most easy to use this in dialogue: Send the player to the "test of courage", and set the journal index in dialogue-result. When the player comes back, and the index differs, then the player has failed the test. (Info on this function provided by JOG).
 
[no fix] ClearInfoActor
 
This is a function that is used in the results section of a dialogue response – using this function will stop the response from appearing in the PC's journal (under "Topics"). Useful to avoid cluttering the topic with useless information. Note however that if all responses for a topic use ClearInfoActor, the topic will still appear in the topics list in the journal, but clicking it will take the player to a blank page.
 
[no fix] GetJournalIndex, "JournalID"          (returns short)
 
If ( GetJournalIndex, MG_BCShroomsCombat == 10 )
 
This function returns the index of the current journal entry for that journal topic (meaning the last index given, or the last index given for which an entry exists in the case of SetJournalIndex and a reloaded savegame). This is very convenient for keeping track of quest advancement, and to have a script react according to what parts of the quest have already been performed.
 
Sample Script: Here is a short script demonstrating the use of both functions from the game:
 
Begin attack_slave
 
short nolore
 
If ( GetDeadCount "Vorar Helas" > 0 )
     return
endif
 
if ( GetJournalIndex "MV_SlaveMule" < 102 ); if PC has not yet reached a certain point
     If ( GetDistance, "Rabinna" < 512 )
          Rabinna->AiWander 0 0 0 0 0 0 0         
          StartCombat, "Rabinna"    
          Journal "MV_SlaveMule", 102  ; add journal entry
     endif
endif
 
End