latitudegames / Scripting

61 stars 16 forks source link

Question about state.memory.context #2

Open varkarrus opened 4 years ago

varkarrus commented 4 years ago

Is there a maximum length for this variable? like how normal memory has a limit of 1,000 characters? Or can you set it to longer without (major) issues?

pierrevanhulst commented 4 years ago

Thanks for implementing that feature, it opens a lot of doors!

I have questions too. Let's say I'm tracking the level of exhaustion of a character, and also have situations where the character can get their legs broken. If the character falls under a certain level of exhaustion (numeric variable), I use state.memory = { context: 'You are exhausted and can hardly take any physical actions' }. Thus, my first question: is there a way to keep the user memory memory along with the state.memory.context, or does it always replace it?

I tried to output the content of state.memory.context after setting it in a previous action, but it was empty, and so was the memory variable. How do we know what is registered in state.memory.context? How do we replace / remove its content? For instance, how could I add the "Your leg is broken, and you cannot run anymore" line to the exhaustion line above?