PDA

View Full Version : Creating new Calendar [2.9.1]



Roncorps
August 1st, 2012, 01:50
Hi,

I've looked through all the files in the 3.5.PAK for what was controlling the new calendar addon in 2.9.1, but I didn't find any info on what store the calendar DB.

I've used Notepad++ and with the search in files query, I've looked for info like Dark Sun or Golarion (name used for 2 calendar in the addon) but it didn't give me any result. I'm questioning myself as where are they located ?

Thanks !

P.S.: It is to create a custom calendar for my L5R extension.

Dakadin
August 1st, 2012, 03:00
The actual calendars are stored in a module. For 3.5E, the file name is 3.5E-calendars.mod. Just rename it to a .ZIP file and then you can unzip it to see the XML file for the calendar.

Roncorps
August 1st, 2012, 06:19
Ahhhh that's why I didn't found it ! Thanks a lot Dakadin =)

I'm gonna rip out everything's and create from his bone a new calendar module for L5R !

Roncorps
August 2nd, 2012, 02:42
Is there a way to pre-define log entry ? I ask because I saw that holidays are created as separate entity, like a totaly new month, but I don't want that. I want to have my normal 12 month calendar, but with holiday/log entry already entered without having to do them at hand in campaign (inside FG).

Phystus
August 3rd, 2012, 01:12
It's absolutely possible. Here's an example from the Forgotten Realms calendar:



<period12>
<days type="number">30</days>
<holidays>
<holiday1>
<duration type="number">1</duration>
<name type="string">Autumn Equinox</name>
<startday type="number">21</startday>
</holiday1>
</holidays>
<name type="string">Eleint</name>
</period12>


<Startday> defines the date of the holiday, of course.

~P

Roncorps
August 3rd, 2012, 02:10
Ohhhh didn't see that putting the holidays with the startday into a <period> would create what I want. I only saw the "holiday period only".

Thanks a lot Phystus !

Now, I just need to find how to change how the date is show because my calendar don't have lunarweek, so normally it say "<lunarweek>, 1st <month> <Year>" and show in the chatbox "The date is the <lunarweek>, 1st <month>, <year>'". I want to make it look like "The date is the 1st of <month>, <year>"

Phystus
August 4th, 2012, 17:05
So you don't actually have weeks, as such, and so no Mondays, Tuesdays, etc.?

Here's an idea.

** Important Disclaimer! ** I haven't actually tried this.

But if you created a 1-day week, with a blank name, it might work.


<lunarweek>
<day1 type="string"> </day1>
</lunarweek>

I'm not sure if that will really work or not, but it might be worth trying. Good luck!

~P

Roncorps
August 5th, 2012, 16:19
I created a 7 day blank <lunarweek>. My month have 28 days, so 28 / 7 = 4, so it's not huge row/column. I tried without lunarweek but the calendar is all mess up.

So, I got 7 days blank, everything's fine there, but at the top, FG calendar say ..........., 1st March, Year, Era. ......... = my blank lunarweek. I tried to look into the scripts of the calendar to see if I could make it say only the day number, month, year, era but no try worked right now. I'm gonna try some more this week,

Thanks for the support Phystus !

Dakadin
August 5th, 2012, 22:45
Look for the getDateString function in the manager_calendar.lua file. The return line looks like this:

return sWeekDay .. ", " .. sDay .. " " .. sMonth .. ", " .. nYear .. " " .. sEpoch;
Just change it to how you would like it to appear.

Roncorps
August 5th, 2012, 22:52
Heh, stupid me


return sWeekDay .. ", " .. sDay .. " " .. sMonth .. ", " .. nYear .. " " .. sEpoch;

I've wrote for 2 days, without seeing my error :


return .. sDay .. " " .. sMonth .. ", " .. nYear .. " " .. sEpoch;

Didn't work because of the .. . Thanks Dakadin to have opened my eye so by reminding myself of this line of code ! It's working perfectly now. Now, the chat calendar msg is done, I need to do the same to the calendar frame at the top where the date is show.

Edit : Done ! My calendar is all done when using the extension I'm building. No lunarweek but no problem with all the strings showed.