LiSE icon indicating copy to clipboard operation
LiSE copied to clipboard

Alternative access methods for historical data

Open clayote opened this issue 9 years ago • 2 comments

Currently the only convenient way to access historical data is to set the game clock to the time of interest and look up the value of some stats at that time. This is inadequate for answering questions like: Have these two ever met? And when?

A logical way to answer the first question would be to construct sets out of all the values of location that each party ever had, and take the intersection. To do that, you have to iterate over previous values of location. There isn't any convenient way to do that right now, and there should be.

That's still not sufficient for getting the time when two stats were equal. You still need to be able to iterate for that purpose, but you don't merely want to iterate over the values -- you need something like a list of each party's location one tick ago, two ticks ago, three, ... even if there are runs of the same location over and over. Maybe even some specialized methods for eg. "What was the value of x when y was equal to z?" although, with iterable history, it would not be hard for the user to write that themself.

A lot of games deal with this sort of problem by setting some flags when two characters meet. That requires foresight as to what sorts of information needs to be stored in flags -- not a problem if you've got an adventure-game-style script, but LiSE games will have a lot of procedural logic, and flag management could get really hairy.

clayote avatar Jun 05 '15 16:06 clayote

I have a little bit of this in the query module now, but it's not very well tested.

clayote avatar Jan 03 '17 02:01 clayote

Aggregate functions are important too; "how many times was I at such-and-such a place?"

clayote avatar Jun 07 '17 11:06 clayote