PDA

View Full Version : Auto-calculating by days (custom profile fields)


kelly1357
04-30-2012, 10:18 PM
Is there a mod or does anyone know of a way to auto-update numerical values based on the number of days passed?

I'm trying to create two custom profile fields that reflect the age of a user's character, in both months and years, but the in character calendar is not based on real time, so one month would need to auto-updated every, say, 17 days.

Any advice?

kh99
05-01-2012, 06:39 PM
Well, you might be able to do it the same way that birthdays are done. That is, the birth date is stored then age is calculated using the current date and birth date. You don't have to use real dates for the "current" date. In fact if you're working with the same months as in real life you could probably fake the years if you wanted by adding/subtracting some constant before doing the calculations (otherwise the year will have to be between 1970 and 2034 for the date functions to work).

kelly1357
05-09-2012, 11:29 PM
Hmm. Okay, thanks.

Where would I find the code to modify the birthdays?

I have absolutely no clue how to do any of that, but my friend does - we just need to know where to find it.