1. #1

    Multi calendar extension

    Hi All,

    In addition to the modifier extension I have also written a modification to the calendar scripts found in the Rolemaster Classic ruleset. The modification allows for multiple calendars to be opened and closed within a single campaign whilst maintaining a campaign constant date. In other words I can open a calendar used by the lizard folk of the foetid swamps while travelling there, spend a few days and then return to civilised lands and the date has updated accordingly. I've also added some stuff around specifying BC/AD or the local equivalent and put in code for a zodiac/great cycle.

    I have also sorted the days so that different years can start on different days if, for example, the year has 365 days and the week has 7.

    I had a quick peek at the CoreRPG scripts and see that they are slightly different to the calendar scripts in RMC, but have not attempted to investigate what the differences are, so I don't know if it will work with CoreRPG derived rulesets. Similarly, I had no need of leap years and accordingly, did not code these in, so leap years will not work. If this is something that is important to people I might have another look at it.

    If you are interested, I have commented the code fairly extensively and have marked it with -- Code Added in the lua sections and <!-- Code Added --> in the xml. The files I altered were calendar.xml, manager_calendar.lua and calendar_period_list.lua.

    The extension needs the calendar module to be slightly rewritten. Every calendar defined needs an <offset>, which is the number of years different from some arbitrary constant year for the local calendar. If the offset is set to 0 then the calendar is defined as the master calendar (there is nothing particularly special about this, other than it can have a year 0). Optional tags include <bc> and <ad>, which are strings that define the terms used for positive and negative years, and <epochcycle><cycle#> which allows for the definition of things like the Chinese zodiac. This master calendar is needed in order to set negative years in the alternate calendars such that AD/BC or their equivalent can be used.

    The attached link leads to both the extension and a sample calendar module for you to try.

    I've been using this for a few months now and it seems stable - any comments will be gratefully received.

    Finally, none of this would have been possible without the original calendar extension. I'm not sure who the original author was, but I am greatly appreciative of their work.

    Cheers
    Chris
    Attached Files Attached Files

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    19,582
    Blog Entries
    1
    Well done Chris_Seal! 2 extensions in 2 weeks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in