How To Set Conversation Fields
Posted: Tue Dec 05, 2023 10:43 pm
Hi Tony, I'm trying to figure out the best way to dynamically change values like rewards for encounters in my game.
We thought giving the conversations a field for specific values would be a good way to house that information. Right now, I can get that information and put it into the conversation no problem. However, I'm struggling to set the value.
Just for testing I'm trying to set this value to 999.
I initally tried to use this code:
However, this returns this error
I've been looking around the forums and tried to ape the LUA implementation
This one doesn't throw any errors; however, this appears to have no effect.
I'm not super familiar with Lua code. I'm not sure what's going on with the syntax errors. Any push in the right direction would be greatly appreciated.
We thought giving the conversations a field for specific values would be a good way to house that information. Right now, I can get that information and put it into the conversation no problem. However, I'm struggling to set the value.
Just for testing I'm trying to set this value to 999.
I initally tried to use this code:
Code: Select all
DialogueLua.SetConversationField(4, "Civillian Bid", 999);
Code: Select all
string luaCode = string.Format("Conversation[{0}].{1} = {2}\n", 4, "Civillian Bid", 999);
Lua.Run(luaCode, true, true);
I'm not super familiar with Lua code. I'm not sure what's going on with the syntax errors. Any push in the right direction would be greatly appreciated.