# Timed LUA callbacks (if low impact)

**URL:** https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560
**Category:** The Drawing Board
**Created:** [September 21, 2016, 12:26am UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560 "2016-09-21T00:26:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lucien](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@Lucien](https://discourse.cataclysmdda.org/u/Lucien)
#### Post date: [September 21, 2016, 12:26am UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560/1 "2016-09-21T00:26:42Z")

</div>

I was wondering, if it has been considered to add more LUA callbacks than the ones triggered at new player creation and new days. I know CIB mentioned it might be possible to have a per-turn callback, but I’m not sure on how that would impact performance. Maybe a per-minute and per hour? It doesn’t look that difficult to add them; would I put in a PR for such a thing, or is it proper to discuss here first?

---

<div class="post-metadata">

### Author: ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)
#### Post date: [September 21, 2016, 6:32pm UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560/2 "2016-09-21T18:32:18Z")

</div>

Impact would need testing. Wouldn’t be noticeable during normal play, but could be noticeable while sleeping and maybe also crafting.

Per-minute would be safe.

---

<div class="post-metadata">

### Author: ![Lucien](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@Lucien](https://discourse.cataclysmdda.org/u/Lucien)
#### Post date: [September 21, 2016, 8:14pm UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560/3 "2016-09-21T20:14:29Z")

</div>

That’s about what I figured, per-turn would be overload anyways. How hard would it be to get a per-minute in? Should I make a PR for that? I’m sorta new to the whole github system.

---

<div class="post-metadata">

### Author: ![Lucien](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@Lucien](https://discourse.cataclysmdda.org/u/Lucien)
#### Post date: [September 24, 2016, 4:03am UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560/4 "2016-09-24T04:03:12Z")

</div>

Ok, I’ve gone and put in a PR for it. I’ve given up and trying to compile this under VS2015 on windows, having not used VS in a decade. I think I’ll have to make a virtual linux box for further work…

---

<div class="post-metadata">

### Author: ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)
#### Post date: [January 5, 2018, 12:13am UTC](https://discourse.cataclysmdda.org/t/timed-lua-callbacks-if-low-impact/12560/5 "2018-01-05T00:13:18Z")

</div>

> <https://github.com/CleverRaven/Cataclysm-DDA/pull/21744>
