View Full Version : RMC reference & adventure Question
Veldehar
December 3rd, 2009, 10:19
So, I have a functioning reference_equipment table, very lovely... but when I click on the little box for the popup window I am pulling up the adventure_weapon window, rather than the adventure_equipment window I created. So the question is:
What directs the box to pull up one adventure file over another, and where is it?
Veldehar
Veldehar
December 3rd, 2009, 14:31
OK, I found my dunderhead error, but as soon as I switch that reference to equipment... neither adventure_weapon nor adventure_equipment is firing. Hmmmm. So... my brain hurts, heh heh.
As God is my witness I thought turkeys could fly.
Foen
December 3rd, 2009, 21:59
The list of entries in the reference module has a windowreferencecontrol (the little box) which looks something like this:
<windowreferencecontrol name="open">
<bounds>0,0,12,12</bounds>
<icon>
<normal>button_openwindow</normal>
<pressed>button_openwindow</pressed>
</icon>
<class>weapon</class>
<description>
<field>name</field>
</description>
</windowreferencecontrol>
As you found, the class tag needs to be changed so it doesn't point to a weapon window (with a type of 'weapon') but to your new window.
One of the key things to understand here (and apologies if you already know this) is that the file names don't matter, it is the windowclass names which are important: if you copied adventure_weapons.xml into a new file called adventure_equipment.xml, changed the new file layout but didn't rename the windowclasses, then you have just created two (conflicting) versions of a weapon window, not a new window to show equipment items.
To be completely explicit, adventure_weapons.xml contains a windowclass which begins as follows:
<windowclass name="weapon">
<frame>charsheet</frame>
This needs to be replaced in the new file with:
<windowclass name="equipment">
<frame>charsheet</frame>
It is this windowclass name that is used in the little box definition in the reference module.
Sorry if this sounds confusing, so please ask more questions if I haven't made it clear!
Stuart
Foen
December 3rd, 2009, 22:00
BTW, turkeys *can* fly - at least until they're stuffed and roasted...
Veldehar
December 3rd, 2009, 23:07
Wild turkeys are much better at flying, heh heh. Sometimes right into moving cars, LOL.
Wild Turkey on the other hand makes me fall over and awake with a headache.
I've got the windowclass set to equipment, but still no luck. I've eliminated every reference to weapon in the reference_equipment xml. Where is the "class" of the item actually set? Perhaps I am only assuming my data is properly classed as equipment, and am missing something horribly obvious, LOL.
Anyhow, another question while I got you on the hook... I was goofing around with drag and drop today, slipped the charsheet_weaponlist.lua call up into the inventory and was quite pleased to see some nice functionality there right off the bat. The only issue (which I really haven't dug too deep into yet) is a script error 11: attempt to index field 'open' [a nil value]. Any hints on how to kill that bugger?
Thank you much!
I'm getting real close to nailing all the functionality I want!
Veldehar
Foen
December 3rd, 2009, 23:11
Glad to be a helpful turkey.
Please would you post/PM some xml for me to review: it is hard to do this by description alone.
Foen
Veldehar
December 3rd, 2009, 23:54
Sent you a piece of the equipment code... but...
and I will just say "DOH!" on the lua error and leave it at that... I will slink away, LOL.
Veldehar
December 5th, 2009, 15:43
For anyone curious, I think the equipment issue has been remedied. So far anyhow! Now if it will just stay fixed! LOL.
Veldehar
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.