Your English seems pretty solid to me! A few corrections needed here and there, but definitely better than most people (and you got the punctuation nailed, so that's a huge plus).
I appreciate you being just as interested and willing to just theorize other ways to go about it. That's what really gets me interested in looking into something. Most people are just like "cool, I'll try that" and then you never hear from them again.
As far as
IncrementStat <stat key> [amount], it should allow you to create a new custom stat and increment it every day (or whatever your event trigger is). I'll write up a small example below of my theorized idea on how to use a stat (and not an NPC) to track time since an event.
One issue I foresee with my theory is that it won't work on current saves because it'll be dependent on the stat already being available and already set to something. It'll also not work for people who use any cheats/cheat mods that change the day (since you could, in theory, set the day to before you saw the event and now the stat incorrectly thinks it's still incrementing days). Your idea of using the visibility of an NPC would probably work, since the game seems to think it's tracking "since this event happened" and not "since this event trigger was available".
Anyway, here's my idea:
JSON:
{
"Action":"EditData",
"Target":"Data/TriggerActions",
"Entries":{
// Increment a new stat called leahEventCounter until it reaches 50 as long as the player has seen Leah's event and they haven't received special mail
"dyanosis.test_event":{
"Id":"dyanosis.test_event",
"Trigger":"DayStarted",
"Condition":"PLAYER_HAS_SEEN_EVENT Current 50, PLAYER_STAT Current leahEventCounter 0 50, !PLAYER_HAS_MAIL Current dyanosis.leah_mail_item",
"Actions":[
"IncrementStat leahEventCounter 1"
]
},
// Repeat the above event under the same conditions. For, probably, infinite loop protection, you can't have a trigger mark itself as unapplied (aka repeating)
"dyanosis.repeat_test_event":{
"Id":"dyanosis.repeat_test_event",
"Trigger":"DayStarted",
"Condition":"PLAYER_HAS_SEEN_EVENT Current 50, PLAYER_STAT Current leahEventCounter 0 50, !PLAYER_HAS_MAIL Current dyanosis.leah_mail_item",
"Actions":[
"MarkActionApplied Current dyanosis.test_event false"
]
},
// Send mail once leahEventCounter has reached 50, player hasn't gotten the mail yet, and they've seen Leah's event.
"dyanosis.send_leah_mail":{
"Id":"dyanosis.send_leah_mail",
"Trigger":"DayStarted",
"Condition":"PLAYER_HAS_SEEN_EVENT Current 50, PLAYER_STAT Current leahEventCounter 50 50, !PLAYER_HAS_MAIL Current dyanosis.leah_mail_item",
"Actions":[
// Action to send/add mail here
]
}
}
}
The conditions read as "Player has seen Leah's event, the Player's
leahEventCounter stat is in a given range (either 0 - 50 or 50 - 50), and Player has not seen or received a specific mail item". I'm not sure how to do mail with CP. I do mail through MFM, which can use the same GSQs (Game State Queries) to check for things as well.
My theory is that the above
should work, but I have no clue. But, like I said, it wouldn't work on old saves or saves that have time cheat mods as it only starts counting from the moment it's allowed to run once. Which also means it would screw up if you used it for 40 days but then removed it and played for a few days, then re-added it and allowed it to run for the last 10 days.
Your way, according to your testing, seems to count from the event seen time, not from when it first triggers, so it seems like the more consistent way to do things.
Though a suggestion to Pathoschild to add something like this to CP where we can check on a variable that tracks "time-since-some-event-or-thing" would be nice. I don't know that the game actually tracks when you saw the event, just that you did.