In case you're interested, I think you can do all this with eventing (and maybe a little scripting), no plugin required~
There are two concepts at play here:
- Store the last time gold was added, and
- Add gold based on how much time has elapsed since then.
Part 1 depends on how you want to measure time, here's a couple of examples:
- Real-time:
...I've assigned a time value to a variable using Control Variables > Script:
Code:
Math.floor(Date.now() / 1000)
Date.now() gets the milliseconds since midnight on 1 Jan 1970. More details here:
the Date object (MDN).
- Game time: Control Variables > Game Data > Other > Play Time; this is measured in seconds and will increase every frame of gameplay during that playthrough, including in menus etc.
Part 2 can be done with an event. The example below is for a Parallel-trigger event, but if you're OK with getting the gold via Action Button or something (e.g. when you next talk to the NPC) then a similar approach applies, just remove the wait time at the end.
😮💨
Get the current time (however you're doing that), then check it against the stored time; if the difference is large enough, add the gold and update the stored time; finally, wait a little and check again later. Example with two variables (and a whole bunch of comments):
Spoiler: Event example
Code:
◆Comment:Just in case! Check if timestamp not yet set
: :(Best done once, in a separate event, e.g. when you make the original investment)
◆If:Time = 0
◆Comment:OK, set it
◆Control Variables:#0020 Time = Math.floor(Date.now() / 1000)
◆
:End
◆Comment:Get difference between time now and stored time
◆Control Variables:#0008 Temporary = Math.floor(Date.now() / 1000)
◆Control Variables:#0008 Temporary -= Time
◆Comment:Check if difference is more than 15 minutes (900 seconds)
◆If:Temporary ≥ 900
◆Comment:Divide by 900 to get how many intervals have elapsed (rounds down automatically)
◆Control Variables:#0008 Temporary /= 900
◆Comment:Update timestamp~
◆Control Variables:#0008 Temporary *= 900
◆Control Variables:#0020 Time += Temporary
◆Control Variables:#0008 Temporary /= 900
◆Comment:Multiply by gold per interval
◆Control Variables:#0008 Temporary *= 75
◆Comment:Add gold!
◆Change Gold:+ {Temporary}
◆Comment:Testing message...
◆Text:None, Window, Bottom
: :You got \v[8] gold!
◆
:End
◆Comment:Now wait 60 frames (run event once per second)
◆Wait:60 frames