Specifically, after restarting the map? Only using SetGameVar("variable name", value), GetGameVar("variable name").
I haven't heard about "Twilight of Darkness"; could you elaborate?
To make it clearer, here's an example: I have an array of arrays (a table in Lua), where the key is the player, and they have, for example, value1 and value2. I want to change these values during the game. This is easily done, but when the map is saved and then loaded, the array is, of course, empty (because I declare it somewhere in the script that runs when the map is loaded, and it, of course, redefines it to its initial state).
Usually, in such cases, the array initialization is written inside a function, and then something like an isset check is done. However, even there, the data is somehow recorded.
Regarding "Twilight of Darkness": it has a reputation system for the races, implemented through a quest. That is, it works like this: there is an objective named "orcs rep", which has an infinite number of progress stages, i.e., it is not completable (because it has a custom condition, as you know, it can only be completed by a script). And, in fact, when it is necessary to give this quest a certain amount of progress, i.e., increasing the reputation by 5 units will move the quest progress by 5 units. Due to this method, it can be conveniently displayed in the standard in-game quest menu. This is a working method (I checked, it is really possible to implement any reputation mechanics this way), but it seems somewhat illogical to use the quest functionality (which is not intended for this).