PDA

View Full Version : Upcoming v3.2.2 Release



Moon Wizard
January 12th, 2017, 18:12
Just a heads up that we're looking to release v3.2.2 next week, unless any major issues arise. So, please start taking a look at any extensions, rulesets and content to make sure they work as expected on the new version. You can load the new version by switching to the Test channel via the FG Settings, and updating.

Regards,
JPG

ronalmb
January 12th, 2017, 21:18
Has the LibraryManager been renamed? My kingdom builder's onInit for adding a button to the sidebar used to use:


for kDefSidebar,vDefSidebar in pairs(aDefaultSidebarState) do
LibraryManager.setDefaultSidebarState(kDefSidebar, vDefSidebar);
end
for kRecordType,vRecordType in pairs(aRecords) do
LibraryData.setRecordTypeInfo(kRecordType, vRecordType);
end


But now that creates the following error:


Script Error: <snip> attempt to index global 'LibraryManager' (a nil value)

Moon Wizard
January 13th, 2017, 00:14
The LibraryManager code was folded into the DesktopManager code. Just replace LibraryManager with DesktopManager.

You can also now use DesktopManager.appendDefaultSidebarState("gm", <recordtype_string>)

Regards,
JPG

vodokar
January 13th, 2017, 01:42
If only it were that simple Moon. I've already tried both methods you described and still getting complete failure to load the sidebar. Damned is going to help me take a look at it sometime later in the week.

damned
January 13th, 2017, 01:55
Hi Moon Wizard this ruleset uses the alternate sidbar option by using manager_desktop.lua which you made available in 3.2.1 or 3.2.0
I havent looked at it yet - was planning to start 3.2.2 testing in earnest this weekend.

Moon Wizard
January 13th, 2017, 23:10
vodokar,

The solution I proposed should work fine for ronalmb's situation.

I took a quick look at the AD&D ruleset. The problem is that your AD&D ruleset is overriding the DesktopManager script in CoreRPG, which you shouldn't do. To do what you want, you should add these calls to the onInit function in data_library_adnd.lua, and then remove manager_desktop_adnd.lua completely (from base.xml and file).

Here's the code to put in data_library_adnd.lua - onInit call to mimic what you were trying to do when overriding DesktopManager. This should work in v3.2.1 also.

DesktopManager.showDockTitleText(true);
DesktopManager.setDockTitleFont("sidebar");
DesktopManager.setDockTitleFrame("", 25, 2, 25, 5);
DesktopManager.setDockTitlePosition("top", 2, 10);

DesktopManager.setStackIconSizeAndSpacing(47, 27, 6, 3, 4, 0);
DesktopManager.setDockIconSizeAndSpacing(100, 24, 0, 4);
DesktopManager.setLowerDockOffset(2, 0, 2, 5);

Also, in data_library_adnd.lua, I would recommend removing the setDefaultSidebarState completely. The default behavior for CnC is perfect for what you need.
GM mode is for live play on GM side, so class/race/spell is not needed generally, since characters are already done. Same for player mode. For PC creation mode, the notes do not get saved for campaigns, so these won't work as you might expect.

If you do all these, the changes will work in both v3.2.1 and v3.2.2.

Regards,
JPG

damned
January 14th, 2017, 00:50
vodokar,

The solution I proposed should work fine for ronalmb's situation.

I took a quick look at the AD&D ruleset. The problem is that your AD&D ruleset is overriding the DesktopManager script in CoreRPG, which you shouldn't do. To do what you want, you should add these calls to the onInit function in data_library_adnd.lua, and then remove manager_desktop_adnd.lua completely (from base.xml and file).

Here's the code to put in data_library_adnd.lua - onInit call to mimic what you were trying to do when overriding DesktopManager. This should work in v3.2.1 also.

DesktopManager.showDockTitleText(true);
DesktopManager.setDockTitleFont("sidebar");
DesktopManager.setDockTitleFrame("", 25, 2, 25, 5);
DesktopManager.setDockTitlePosition("top", 2, 10);

DesktopManager.setStackIconSizeAndSpacing(47, 27, 6, 3, 4, 0);
DesktopManager.setDockIconSizeAndSpacing(100, 24, 0, 4);
DesktopManager.setLowerDockOffset(2, 0, 2, 5);

Also, in data_library_adnd.lua, I would recommend removing the setDefaultSidebarState completely. The default behavior for CnC is perfect for what you need.
GM mode is for live play on GM side, so class/race/spell is not needed generally, since characters are already done. Same for player mode. For PC creation mode, the notes do not get saved for campaigns, so these won't work as you might expect.

If you do all these, the changes will work in both v3.2.1 and v3.2.2.

Regards,
JPG

Thanks JPG Im sure when you first made that feature available that the recommendation was to replace the whole file. Thank you for looking into it - it will help me with a couple of extensions :)

vodokar
January 14th, 2017, 01:08
Thanks, MoonWizard.

Removed manager_desktop_adnd.lua. data_library_adnd.lua now looks like:


function onInit()

DesktopManager.showDockTitleText(true);
DesktopManager.setDockTitleFont("sidebar");
DesktopManager.setDockTitleFrame("", 25, 2, 25, 5);
DesktopManager.setDockTitlePosition("top", 2, 10);
DesktopManager.setStackIconSizeAndSpacing(47, 27, 6, 3, 4, 0);
DesktopManager.setDockIconSizeAndSpacing(100, 24, 0, 4);
DesktopManager.setLowerDockOffset(2, 0, 2, 5);

end

Result is:

17429

So, it's back up and everything working, but a couple of the buttons are out of place on the bottom and appears I lost half of the standard buttons on top of the sidebar.

vodokar
January 14th, 2017, 01:14
Oops, nevermind. All 8 buttons on top are there, just confused me when they changed size and orientation.

damned
January 15th, 2017, 02:49
vodokar
DesktopManager.setStackIconSizeAndSpacing(47, 27, 3, 3, 4, 0);
DesktopManager.setLowerDockOffset(2, 0, 2, 3);

vodokar
January 15th, 2017, 03:33
That fixed the Upper Buttons. The Tokens and Library Button are still too far to the left. We are almost there, however. One of these days, I'm going to have to sit down and figure out how this particular code works.

damned
January 15th, 2017, 03:38
That fixed the Upper Buttons. The Tokens and Library Button are still too far to the left. We are almost there, however. One of these days, I'm going to have to sit down and figure out how this particular code works.

Ill look at those once I get thru the rest of my ones :)