In short, yes, this is approximately the way I'd do it.
day_of_birth
,
month_of_birth
,
year_of_birth
,
day
,
month
and
year
are all
exportable variables. Some quick maths, and you can easily calculate the number of days/months until the character's next birthday. So, starting from an
on_yearly_pulse
event, you could write some (probably rather annoying) code to trigger an event on their next birthday.
(Pseudocode: Has this char got the flag
birthday_search_started
or
birthday_events_are_set_up
? if yes, do nothing and exit. if no, set the
birthday_search_started
flag and continue. is their birthday in more than 30 days? if yes, check everything again in 30 days' time. if no, is their birthday in more than 5 days? if yes, check everything again in 5 days' time. if no, is it in 4 days? ... 3 days? ... ... ... is it today? if yes, set up a recurring birthday event for all future time, remove the
birthday_search_started
flag and set the
birthday_events_are_set_up
flag. This recurring birthday event can do whatever you like for attractiveness etc.)
Also, note that it's not
just historical characters who don't have an
on_adulthood_pulse
- it's also every single character that's generated by event. And there are lots of these: rebel leaders, random commanders, random women, even major plot figures like Seljuk and Temujin, etc etc etc. Some people are generated at quite old ages (eg. gurus are always 50+, and I think random theocrat successors also tend to skew quite old), so you can't assume that every newly-generated character (ie. who hasn't yet had a yearly pulse and therefore hasn't yet had any recurring birthday events) is young and attractive. However, it's not too bad if a random nobody is erroneously considered to be "attractive" for a few months, so I think my yearly-pulse strategy outlined above is acceptable.