LordEntrails
April 30th, 2025, 04:11
So I have three data objects that have inventory/equipment lists. Characters, major NPCs, and Starships. I can drag and drop items onto the Character sheet inventory list, but not the other two. All of them can manually add items via iadd buttons/functions. What am I doing wrong?
Here's the code for the fully working character sheet inventory:
<windowlist name="inventorylist">
<bounds>30,40,-49,-220</bounds>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<script file="campaign/scripts/char_invlist.lua" />
</windowlist>
Here's the code for major NPC:
<windowlist name="equipment">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="9" />
<right offset="-7" />
<top offset="35" anchor="bottom" parent="benefits_list" relation="relative" />
<bottom offset="-16" />
<sizelimits>
<minimum height="40" />
</sizelimits>
</anchored>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<columns>
<width>355</width>
<filldown />
</columns>
<script file="campaign/scripts/char_invlist.lua" />
</windowlist>
And here's the Starship (where I tried adding the acceptdrop, even though the character doesn't use it):
<windowlist name="inventorylist">
<anchored>
<left offset="11" />
<right offset="2" />
<top offset="186" />
<bottom offset="-9" />
</anchored>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>items</class>
<field>*</field>
</acceptdrop>
<columns>
<width>360</width>
<filldown />
</columns>
</windowlist>
(full code is in the frontierSpace ruleset on the forge, files charsheet_inventory.xml, sub_npc_major.xml, & ss_equip.xml)
Here's the code for the fully working character sheet inventory:
<windowlist name="inventorylist">
<bounds>30,40,-49,-220</bounds>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<script file="campaign/scripts/char_invlist.lua" />
</windowlist>
Here's the code for major NPC:
<windowlist name="equipment">
<frame name="frame_windowlist" offset="3,25,3,3" />
<anchored>
<left offset="9" />
<right offset="-7" />
<top offset="35" anchor="bottom" parent="benefits_list" relation="relative" />
<bottom offset="-16" />
<sizelimits>
<minimum height="40" />
</sizelimits>
</anchored>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<columns>
<width>355</width>
<filldown />
</columns>
<script file="campaign/scripts/char_invlist.lua" />
</windowlist>
And here's the Starship (where I tried adding the acceptdrop, even though the character doesn't use it):
<windowlist name="inventorylist">
<anchored>
<left offset="11" />
<right offset="2" />
<top offset="186" />
<bottom offset="-9" />
</anchored>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<allowcreate />
<allowdelete />
<acceptdrop>
<class>items</class>
<field>*</field>
</acceptdrop>
<columns>
<width>360</width>
<filldown />
</columns>
</windowlist>
(full code is in the frontierSpace ruleset on the forge, files charsheet_inventory.xml, sub_npc_major.xml, & ss_equip.xml)