What file do I have to change to build me a vertical version? I would also likely omit months and years to free screen estate as these are used so seldom that I can use the calendar.
Printable View
0.10 PF2RPG: "Script Error: [string "FFAL/scripts/FFAL_data_library_common.lua"]:29: attempt to index field '?' (a nil value)"
And when I hit the Event button I am still greeted with an all empty window. When I then create an event it is set to 000000 for date/time instead of the current time.
Deleting an event does not delete the corresponding Calendar entry.
It would be nice if Clock Adjuster would save the last used values over different sessions.
i'm not finding any FFAL folders in my extensions, nor in the pfrpg2 (pfrpg is just built off pfrpg2 it seems), and can not replicate this error message. is there something else that could be conflicting with it? is there an extension you were using that you're not now which could have left something behind in your database?
i'll see about getting the values to stay over sessions, and will see about events starting with the current date created.
i have no intention to make deleted events delete calendar records yet, as i would like to keep calendar records when i might not want to keep events. though maybe i could create a button to bring up the list of calendar logs instead, for faster access.
Thanks for the support.
I think FFAL might be the field search extension, which I accidentally enabled again despite it not working properly with PF2. I will check tomorrow, sorry for the confusion.
FFAL is Field Filters for All Libraries extension.
Yes, I accidentally activated it. Here is the correct console error that happens when FG is closed with Clock Adjuster being active:
"Script Error: [string "scripts/manager_time.lua"]:350: attempt to index global 'DB' (a userdata value)"
Ah thanks guys. Ok yeah, I need an onClose() function to remove the handler I guess. I’ll add that to my list of things. Might have an update tonight, don’t know for sure, but I might have something simple figured out for travel tracking. We’ll see I guess. :D
added a travel manager. as well as a few fixes and adjustments.
once i know things are all worked out, i'll figure out a way to make adjustment easier. it's a bit of a pain to alter 5 different extensions with some unique properties to each at the moment. If you would like to take a wack at it yourself, you'll need to create a new framedef in the graphics_frames.xml file for any new frame graphics.
then, you'll want to go to the desktop_panels.xml and remove anything to do with year or month from the <windowclass name="chattime"> control. (look for currentmonth, currentyear, addmonth, addyear, and if using the CoreRPG one, you'll also look for upmonth and upyear. all those controls and scripts lines must be removed or at least have the tag <invisible /> added to the control.
then, your remaining controls for chattime need to be set up the way you want. each <anchor> section is what you want to look at. currently, i have them all attached to the right of the one on the left of it, or if it's the farthest left (currenthour, addhour, uphour, maybe adv6AM depending on the ruleset) then it's attached to the one above it, or to the insidetopleft of the frame. you can cut and paste the entire controls to make things easier for yourself, so put addminute underneath of currentminute for example, so that you can easily scroll up and down to see/copypaste the name of the control to the anchor.
examples:
Code:<windowclass name="chattime"> -----the clock adjuster we see on the desktop
<frame>fieldlight</frame> ----the name of the frame created in graphics_frames.xml
<size width="230" height="90" /> ---the size of the clock adjuster in pixels
<placement> ----how far in pixels from the top and left it is when created
<position>
<x>10</x>
<y>30</y>
</position>
</placement>
<sizelimits> ----the size the clock adjuster can be in pixels
<size width="230" height="90" />
<!--<dynamic /> -->
</sizelimits>
<noclose /> ---can not close the sheet
<sheetdata>
<label name="currenthour"> ---------our control for the current hour
<anchored position="insidetopleft" width="20"> -----its anchored position to the frame with a width set in pixels
<left anchor="left" offset="20" />
<top offset="8" />
</anchored>
<frame name="fieldlight" offset="7,5,7,5" />
<stateframe>
<hover name="fieldfocus" offset="7,5,7,5" />
</stateframe>
<font>calendarbold</font>
<color>000000</color>
<center />
<tooltip textres="desktop_currenthour_tooltip" />
<script> -------------------our script. leave the ones for current time alone but for the others,
remove anything to do with controls you have deleted.
function onInit()
if DB.getValue("calendar.newcampaign") == nil or DB.getValue("calendar.newcampaign") == 0 then
local nYear = DB.getValue("calendar.current.year", 0);
if nYear == nil or nYear == 0 then
DB.setValue("calendar.current.year", "number", 1);
end
local nMonth = DB.getValue("calendar.current.month", 0);
if nMonth == nil or nMonth == 0 then
DB.setValue("calendar.current.month", "number", 1);
end
local nDay = DB.getValue("calendar.current.day", 0);
if nDay == nil or nDay == 0 then
DB.setValue("calendar.current.day", "number", 1);
end
local nMinute = DB.getValue("calendar.current.minute", 0);
if nMinute == nil then
DB.setValue("calendar.current.minute", "number", 0);
end
local nHour = DB.getValue("calendar.current.hour", 0);
if nHour == nil then
DB.setValue("calendar.current.hour", "number", 0);
end
Interface.openWindow("calendar", "DB");
DB.setValue("calendar.newcampaign", "number", 1);
end
DB.addHandler("calendar.current.hour", "onUpdate", onSourceChanged);
DB.addHandler("calendar.current.day", "onUpdate", onSourceChanged);
nDay = DB.getValue("calendar.current.day");
onSourceChanged();
local nDateinMinutes = TimeManager.getCurrentDateinMinutes();
DB.setValue("calendar.dateinminutes", "number", nDateinMinutes);
end
function onClose()
DB.removeHandler("calendar.current.hour", "onUpdate", onSourceChanged);
DB.removeHandler("calendar.current.day", "onUpdate", onSourceChanged);
end
function onSourceChanged()
local nHour, sPhase = CalendarManager.getDisplayHour();
setValue(string.format("%2d", nHour));
window.currentphase.setValue(sPhase);
if nDay ~= DB.getValue("calendar.current.day") then
CalendarManager.outputDate();
end
nDay = DB.getValue("calendar.current.day");
end
function onWheel(n)
if not Input.isControlPressed() then
return false;
end
CalendarManager.adjustHours(n);
local nDateinMinutes = TimeManager.getCurrentDateinMinutes();
DB.setValue("calendar.dateinminutes", "number", nDateinMinutes);
return true;
end
</script>
</label>
Whenever I close FG I get this errorPF2e version.Code:Script Error: [string "scripts/manager_time.lua"]:350: attempt to index global 'DB' (a userdata value)