QUOTE |
- added several timekeeping properties to XmlDialog entries that allows you to control their activation based upon time of the day, day of the week, day of the month, or phase of the moon. These properties are: GameTOD - has values of the form hh:mm:ss, so 14:00:00 would be 2pm RealTOD - has values of the form hh:mm:ss RealDayOfWeek - has values Sunday, Monday, etc. Note, these are enums so when referring to them in property tests precede them with a #, like "RealDayOfWeek=#Monday" RealDay - has values 1-31 RealMonth - has values 1-12 MoonPhase - has values NewMoon, WaxingCrescentMoon, FirstQuarter, WaxingGibbous, FullMoon, WaningGibbous, LastQuarter, WaningCrescent There are a number of ways that you might use these new properties. By setting the Home property on an npc which will cause it to wander to that location. By setting Home at different times, you can have your npcs go to different places throughout the day. You could also have certain conversations that could only be carried out at certain times of the day, or days of the week. For example, setting the Condition field in an xmldialog entry to GameTOD>12:00:00 & GameTOD<16:00:00 would restrict its activation to between the times of 12 and 4pm - added an example of the use of these new properties in a .npc file timeofday.npc, and a spawner example that loads it up onto an npc in timeofday.xml. To test it out, just do an "[xmlloadhere timeofday.xml". The npc will respond with the day of the week in his banter, and if you respond with the keyphrase "hello", you will get different responses depending on the time of day (game time), and even the day of the week (he doesnt work on Sunday). |