PDA

View Full Version : Modifying Calendar module not working anymore?



Targas
June 21st, 2017, 10:53
I made quite some effort to add all those Pathfinder bank Holidays into the calendars.mod pack, or more precisely into db.xml.
However if I activate the module and choose the Pathfinder calender, the changed/added bank Holidays are simply not there.
It's just displaying the Default bank Holidays, which is weird. Is there a new place where the 'calendars.mod' file is now ?
I can't find it in the vault and there is only one in modules .... I'm stuck.

Zacchaeus
June 21st, 2017, 11:28
As far as I know there's only the Calendars.mod file in the modules folder. I don't know which one of them is the Pathfinder calendar but I suppose it's possible that something in the ruleset is over-riding the calendar.mod; but I think that is unlikely.

One possible explanation is that you didn't zip up the module correctly (i.e. zip up the contents of the 'calendars' folder not the folder itself). The other thing is you might also have made an error somewhere in the XML. Try just changing one thing (like just a name rather than adding in a bunch of new stuff) and see if that change comes through.

Targas
June 21st, 2017, 12:15
I tried changing a single word, but it's not using the change- So my guess is, the 'calendars' file is drawn from a different place - but which ?
You can try it yourself and would very likely end up with the same result. Any ideas ?


As far as I know there's only the Calendars.mod file in the modules folder. I don't know which one of them is the Pathfinder calendar but I suppose it's possible that something in the ruleset is over-riding the calendar.mod; but I think that is unlikely.

One possible explanation is that you didn't zip up the module correctly (i.e. zip up the contents of the 'calendars' folder not the folder itself). The other thing is you might also have made an error somewhere in the XML. Try just changing one thing (like just a name rather than adding in a bunch of new stuff) and see if that change comes through.

Andraax
June 21st, 2017, 12:40
I tried changing a single word, but it's not using the change- So my guess is, the 'calendars' file is drawn from a different place - but which ?
You can try it yourself and would very likely end up with the same result. Any ideas ?

It's impolite to ask someone who is making a suggestion of things to try to "try it [themself]". Regardless, I did. I edited my calendars.mod, added a new holiday, and did a calendar reset and then reselected the calendar. New stuff showed up just fine. Most likely, you are not making changes to the file in the configured data directory, or you have an "unpacked" file that is over-riding your module, or you zipped the module up incorrectly. Have you checked all those?

Targas
June 21st, 2017, 12:49
I tried changing a single word, but it's not using the change- So my guess is, the 'calendars' file is drawn from a different place - but which ?
You can try it yourself and would very likely end up with the same result. Any ideas ?
I checked the Update and Install Log. The file Calendars is written in capital letter C, however the file is with lower letter c. After resetting the calendar in the calendar menue, it works. So it seems to be a bug in the Software IMHO.

Andraax
June 21st, 2017, 13:16
You do realize that the calendar module is only read when you do a reset and reload, right? It's not re-read every time the VTT starts up... You can actually close the module once it's been loaded into the calendar. Seems to me that the software is working exactly as designed in this regard.

Trenloe
June 21st, 2017, 15:54
I checked the Update and Install Log. The file Calendars is written in capital letter C, however the file is with lower letter c. After resetting the calendar in the calendar menue, it works. So it seems to be a bug in the Software IMHO.
calendars.mod is just a filename. What FG reads for the library module name within Fantasy Grounds is detailed in the definition.xml file within the module .mod zipped file. In this case, the name of the module is "Calendars" - this is just the module name, it has no bearing on whether data from this module is visible in FG or not. Once the module is activated, the data contained in db/xml within the module is made available in the Calendar activation window if a calendar hasn't been selected already for that campaign - this is based off the data within the <calendar> tag in the module db.xml. There could be many different modules containing <calendar> data, the name of the module filename is not relevant, what FG uses is what is contained within an activated module containing <calendar> data.

Where are you making your custom changes? If you're making it to calendars.mod then FG will be overwriting this when FG runs an update.

I'd recommend you make a copy of calendars.mod (name it something like my_calendars.mod), change the <name> data within the definition.xml file (again, something that doesn't clash with the default) and then use this module as your calendar module within your campaigns. It won't be overwritten by any FG updates.

Targas
June 22nd, 2017, 05:57
I'd recommend you make a copy of calendars.mod (name it something like my_calendars.mod), change the <name> data within the definition.xml file (again, something that doesn't clash with the default) and then use this module as your calendar module within your campaigns. It won't be overwritten by any FG updates.

Many thanks to your comprehensive feedback. I did create an own .mod as proposed by you above, which works quite nicely.

YAKO SOMEDAKY
June 23rd, 2017, 14:12
Since I never moved on the calendar, I wonder if I put the current year the days of the week fit to stay the same as our calendar? Because from what I saw in our calendar today is June 23rd Friday and in the calendar of Fantasy Grounds June 23rd is a Monday

Andraax
June 23rd, 2017, 14:38
Since I never moved on the calendar, I wonder if I put the current year the days of the week fit to stay the same as our calendar? Because from what I saw in our calendar today is June 23rd Friday and in the calendar of Fantasy Grounds June 23rd is a Monday

The "standard" Gregorian calendar functions built in correctly identify June 23rd, 2017 as Friday. You may have an extension loaded (such as my "alternative Gregorian calendar functions" that I wrote for someone) that is changing the calculations.

YAKO SOMEDAKY
June 26th, 2017, 03:00
Andraax indeed my calendar module was in trouble but I already fixed it and it is working correctly :)

Andraax
June 26th, 2017, 03:56
So, you had modified the standard Gregorian calendar? Because the one distributed works correctly....