Hi,
How are you updating and checking the field value? Runtime values are stored in Lua. Are you accessing the Lua value or the original dialogue database value?
You can use
Lua.Run() to get and set DialogueCount:
Code: Select all
Lua.Run("Conversation[5].DialogueCount = Conversation[5].DialogueCount + 1");
int count = Lua.Run("return Conversation[5].DialogueCount").asInt;
Or, to get the value using the
DialogueLua class:
Code: Select all
int count = DialogueLua.GetConversationField(5, "DialogueCount").asInt;
(There isn't an equivalent DialogueLua function to set conversation fields.)
If you print out the save data, it will probably have a form similar to the text below. Here, you can see that it stored the conversation fields: (Conversation[1] highlighted in blue.)
Variable={Alert=\"\", enemiesKilled=0, hasLaunchCodes=false, password=\"\", Actor=\"\", Conversant=\"\", ActorIndex=\"\", ConversantIndex=\"\"}; Item[\"Get_the_Launch_Codes\"]={Name=\"Get the Launch Codes\", Description=\"Your squad has infiltrated the evil Emperor's weapons factory to intercept launch codes to stop the mega-weapon aimed at your homeworld.\", Success_Description=\"You get the launch codes and can redirect the weapon away from your homeworld.\", Failure_Description=\"\", State=\"unassigned\", Is_Item=false, Track=true, Trackable=true, }; Item[\"Enemy_Attack\"]={Name=\"Enemy Attack\", Pictures=\"[]\", Description=\"Sergeant Graves wants you to halt the enemy advance by taking out five of them.\", Success_Description=\"You defeated the enemy soldiers.\", Failure_Description=\"\", State=\"unassigned\", Is_Item=false, Trackable=true, Track=true, Entry_Count=1, Entry_1_State=\"active\", Entry_1=\"[var=enemiesKilled]/5 killed\", };
Conversation[1]={Title=\"Private Hart\", Description=\"This conversation occurs between the Player and Private Hart, who explains the main quest (Get the Launch Codes). Nodes' Conditions fields branch the conversation based on the current quest state.\", Actor=1, Conversant=2}; Conversation[2]={Title=\"Sergeant Graves\", Description=\"This quest runs the Enemy Attack quest.\", Actor=1, Conversant=3}; Conversation[4]={Title=\"Dead Enemy\", Description=\"This conversation demonstrates how to use the dialogue system for other kinds of interaction (searching a body). The first node moves the camera to the \\\"Down\\\" angle on the body over 1 second. The last node moves back to the original position.\", Actor=1, Conversant=5}; Conversation[5]={Title=\"Terminal\", Description=\"This conversation is for the computer terminal where the player can download the launch codes to complete the Get the Launch Codes quest. It overrides the Default Sequence to delay instead of playing voiceover (see below).\", Actor=1, Conversant=4}; Conversation[6]={Title=\"Enemy Barks\", Pictures=\"[]\", Description=\"These are one-liners barked by Enemy NPCs.\", Actor=1, Conversant=6};