LordEntrails
August 3rd, 2025, 17:18
So I've got two drag and drop problems, and this is the first one I'm trying to resolve that I've dug in as far as I can and can't figure out what is going on.
I have created a library object type "Benefits". When I drag from the library list this object type to a window list it creates some sort of new object. The content of the original object is not retained/copied and you can see that the actual object type changes. No idea why this is happening. I've modeled the Benefits object off of the Item object which doesn't exhibit this behavior.
Here's a screen shot that shows what's happening (and this happens in other places like NPCs and not just the Character sheet).
64979
Here's the relevant code parts.
From dataLibrary.lua:
LibraryData.aRecords["skills"] = {
bExport = true,
aDataMap = { "skills", "reference.skills" },
sRecordDisplayClass = "skills",
sSidebarCategory = "player",
}
LibraryData.aRecords["benefits"] = {
bExport = true,
aDataMap = { "benefits", "reference.benefits" },
sRecordDisplayClass = "benefits",
sSidebarCategory = "player",
}
Here's the code from the Major NPC sub window where these are often dropped from (similar to the CS):
<list_text name="benefits_list">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="10" />
<right offset="-11" />
<top offset="35" anchor="bottom" parent="skills_list" relation="relative" />
<sizelimits>
<minimum height="20" />
</sizelimits>
</anchored>
<class>char_ability</class>
<datasource>.abilitylist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>benefits</class>
<class>abilities</class>
<field>*</field>
</acceptdrop>
<columns>
<width>150</width>
<fillwidth />
</columns>
</list_text>
Which seems to be the same as the code in the same window used for skills:
<list_text name="skills_list">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="10" />
<right offset="-11" />
<top offset="35" anchor="bottom" parent="defenses" relation="relative" />
<sizelimits>
<minimum height="20" />
</sizelimits>
</anchored>
<class>skills_charsheet</class>
<datasource>.skillslist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>skills</class>
<field>*</field>
</acceptdrop>
<columns>
<width>340</width>
</columns>
</list_text>
The benefits.xml file:
<?xml version="1.0" encoding="utf-8"?>
<root>
<windowclass name="benefits" copy="record_window_tabbed">
<frame>storybox</frame>
<placement>
<size height="387" width="350" />
</placement>
<sizelimits resize="both">
<minimum width="350" height="387" />
<dynamic />
</sizelimits>
<sheetdata>
<subwindow name="sub_main_content">
<anchored>
<left offset="14" />
<right offset="-24" />
<top offset="95" />
<bottom offset="-32" />
</anchored>
<class>benefits_content</class>
<activate />
</subwindow>
<scrollbarcontrol name="skills_scroll">
<frame name="scrollbar_base" offset="0,12,0,12" />
<bounds>-34,60,6,279</bounds>
<target>sub_skills_content</target>
<normal name="scrollbutton_normal">
<minimum height="scrollbutton_normal" />
</normal>
</scrollbarcontrol>
</sheetdata>
</windowclass>
</root>
The skills.xml file:
<?xml version="1.0" encoding="utf-8"?>
<root>
<windowclass name="skills" copy="record_window_tabbed">
<frame>utilitybox</frame>
<placement>
<size height="387" width="350" />
</placement>
<sizelimits resize="both">
<minimum width="350" height="387" />
<dynamic />
</sizelimits>
<sheetdata>
<subwindow name="sub_skills_content">
<anchored>
<left offset="11" />
<right offset="-23" />
<top offset="100" />
<bottom offset="-27" />
</anchored>
<class>skills_content</class>
<activate />
</subwindow>
<scrollbarcontrol name="skills_scroll">
<frame name="scrollbar_base" offset="0,12,0,12" />
<bounds>-14,63,6,446</bounds>
<target>sub_skills_content</target>
<normal name="scrollbutton_normal">
<minimum height="scrollbutton_normal" />
</normal>
</scrollbarcontrol>
</sheetdata>
</windowclass>
</root>
Not that I think it matters, but here the part from string.xml;
<string name="library_recordtype_label_skills">Skills</string>
<string name="library_recordtype_label_benefits">Benefits</string>
So what am I missing?
I have created a library object type "Benefits". When I drag from the library list this object type to a window list it creates some sort of new object. The content of the original object is not retained/copied and you can see that the actual object type changes. No idea why this is happening. I've modeled the Benefits object off of the Item object which doesn't exhibit this behavior.
Here's a screen shot that shows what's happening (and this happens in other places like NPCs and not just the Character sheet).
64979
Here's the relevant code parts.
From dataLibrary.lua:
LibraryData.aRecords["skills"] = {
bExport = true,
aDataMap = { "skills", "reference.skills" },
sRecordDisplayClass = "skills",
sSidebarCategory = "player",
}
LibraryData.aRecords["benefits"] = {
bExport = true,
aDataMap = { "benefits", "reference.benefits" },
sRecordDisplayClass = "benefits",
sSidebarCategory = "player",
}
Here's the code from the Major NPC sub window where these are often dropped from (similar to the CS):
<list_text name="benefits_list">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="10" />
<right offset="-11" />
<top offset="35" anchor="bottom" parent="skills_list" relation="relative" />
<sizelimits>
<minimum height="20" />
</sizelimits>
</anchored>
<class>char_ability</class>
<datasource>.abilitylist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>benefits</class>
<class>abilities</class>
<field>*</field>
</acceptdrop>
<columns>
<width>150</width>
<fillwidth />
</columns>
</list_text>
Which seems to be the same as the code in the same window used for skills:
<list_text name="skills_list">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="10" />
<right offset="-11" />
<top offset="35" anchor="bottom" parent="defenses" relation="relative" />
<sizelimits>
<minimum height="20" />
</sizelimits>
</anchored>
<class>skills_charsheet</class>
<datasource>.skillslist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>skills</class>
<field>*</field>
</acceptdrop>
<columns>
<width>340</width>
</columns>
</list_text>
The benefits.xml file:
<?xml version="1.0" encoding="utf-8"?>
<root>
<windowclass name="benefits" copy="record_window_tabbed">
<frame>storybox</frame>
<placement>
<size height="387" width="350" />
</placement>
<sizelimits resize="both">
<minimum width="350" height="387" />
<dynamic />
</sizelimits>
<sheetdata>
<subwindow name="sub_main_content">
<anchored>
<left offset="14" />
<right offset="-24" />
<top offset="95" />
<bottom offset="-32" />
</anchored>
<class>benefits_content</class>
<activate />
</subwindow>
<scrollbarcontrol name="skills_scroll">
<frame name="scrollbar_base" offset="0,12,0,12" />
<bounds>-34,60,6,279</bounds>
<target>sub_skills_content</target>
<normal name="scrollbutton_normal">
<minimum height="scrollbutton_normal" />
</normal>
</scrollbarcontrol>
</sheetdata>
</windowclass>
</root>
The skills.xml file:
<?xml version="1.0" encoding="utf-8"?>
<root>
<windowclass name="skills" copy="record_window_tabbed">
<frame>utilitybox</frame>
<placement>
<size height="387" width="350" />
</placement>
<sizelimits resize="both">
<minimum width="350" height="387" />
<dynamic />
</sizelimits>
<sheetdata>
<subwindow name="sub_skills_content">
<anchored>
<left offset="11" />
<right offset="-23" />
<top offset="100" />
<bottom offset="-27" />
</anchored>
<class>skills_content</class>
<activate />
</subwindow>
<scrollbarcontrol name="skills_scroll">
<frame name="scrollbar_base" offset="0,12,0,12" />
<bounds>-14,63,6,446</bounds>
<target>sub_skills_content</target>
<normal name="scrollbutton_normal">
<minimum height="scrollbutton_normal" />
</normal>
</scrollbarcontrol>
</sheetdata>
</windowclass>
</root>
Not that I think it matters, but here the part from string.xml;
<string name="library_recordtype_label_skills">Skills</string>
<string name="library_recordtype_label_benefits">Benefits</string>
So what am I missing?