PDA

View Full Version : [DCCRPG] Equipment Module Records with Strange Display Issue



leozelig
November 15th, 2016, 02:21
I added a Damage Type field for items, and I have made the desired changes to ref_equipment for module files. I am seeing this weird overlapping display of the Damage Type label when no data is entered for damage type. The field uses the string_columnh template (defined in CoreRPG), which means that the field should be hidden when no data is present. If I change it to string_column, it displays properly (no overlap) but is not hidden. Here is a snipped of the ref_equipment code and module file entries...

ref_equipment

<windowclass name="ref_weapon_stats">
<script>
function onInit()
type_label.setValue("[" .. type.getValue() .. "; " .. subtype.getValue() .. "]");
end
</script>
<sheetdata>
<anchor_column name="columnanchor" />

<hs name="type" />
<hs name="subtype" />

<label_column name="type_label">
<anchored>
<top relation="relative" offset="7" />
</anchored>
<font>reference-b-large</font>
</label_column>


<line_column />

<label_column name="cost_label">
<static textres="ref_label_cost" />
</label_column>
<string_column_left name="cost">
<readonly />
</string_column_left>

<label_column_right name="weight_label">
<anchored to="cost" />
<static textres="ref_label_weight" />
</label_column_right>
<number_column_right name="weight">
<anchored to="cost" />
<readonly />
</number_column_right>

<line_column />

<label_column name="damage_label">
<static textres="ref_label_damage" />
</label_column>
<string_column name="damage">
<readonly />
</string_column>

<label_column name="dmgtype_label">
<static textres="ref_label_dmgtype" />
</label_column>
<string_column name="damagetype">
<readonly />
</string_column>

<label_column name="range_label">
<static textres="ref_label_range" />
</label_column>
<number_columnh name="range">
<readonly />
</number_columnh>

<line_column name="line_desc"/>

<ft_columnh name="description">
<separator>line_desc</separator>
<readonly />
</ft_columnh>
</sheetdata>
</windowclass>


module data

<weapon>
<battleaxe>
<name type="string">Battleaxe</name>
<cost type="string">7 gp</cost>
<damage type="string">1d10</damage>
<range type="number">0</range>
<type type="string">Weapon</type>
<description type="formattedtext">content removed</description>
</battleaxe>
<blackjack>
<name type="string">Blackjack</name>
<cost type="string">3 gp</cost>
<damage type="string">1d3/2d6</damage>
<damagetype type="string">Nonlethal</damagetype>
<range type="number">0</range>
<type type="string">Weapon</type>
<description type="formattedtext">content removed</description>
</blackjack>
<dagger>
<name type="string">Dagger</name>
<cost type="string">3 gp</cost>
<damage type="string">1d4/1d10</damage>
<range type="number">10</range>
<type type="string">Weapon</type>
<description type="formattedtext">content removed</description>
</dagger>


Anyone know why this isn't working? Screenshots below...

16352

This one displays properly, but only by chance...

16353

leozelig
November 15th, 2016, 02:25
The code above has string_column for "damagetype" - here is the alternative form using string_columnh, in case it's not obvious...



<label_column name="dmgtype_label">
<static textres="ref_label_dmgtype" />
</label_column>
<string_columnh name="damagetype">
<readonly />
</string_columnh>

Trenloe
November 15th, 2016, 03:56
You need to call the control the same name as the label minus "_label". So should be "dmgtype" not "damagetype".

leozelig
November 15th, 2016, 12:51
That did it - thank you Trenloe!