Create persistent memory stores
1. Create array variables named stm_tester and ltm_tester for the first character. Give them empty arrays as their starting values.
2. Create a short- and long-term array for each other playable character, using that character’s actual ID after the underscore.
3. Create the display arrays memory_stm_active and memory_ltm_active.
4. Create the string variable memory_topic for the currently chosen topic.
5. Add memory_tools from Chapter 12. Its remember function stores an ID and caption once, under the active character’s memory key.
6. Call its refresh function after a character switch and after restoring a saved game, so the visible lists match the active owner.
| Store | Meaning |
|---|---|
| stm_ + character ID | Short-term observations deliberately remembered by that character. |
| ltm_ + character ID | Longer-term story events learned by that character. |
| memory_stm_active / memory_ltm_active | Display copies for the currently controlled character. |
| memory_topic | The selected topic ID, not a piece of physical inventory. |
The sample short-term list keeps the most recent ten entries by dropping the oldest. That is a simple workshop policy. Use an explicit replacement choice if your puzzle needs the player to decide what to forget.
