PDA

View Full Version : Having some trouble with positioning in a simple extension.



Jwguy
September 3rd, 2015, 20:08
I've been wanting a field for keeping track of charges in magic items in 3.5e, so I decided to take a look at the Enhanced Items extension for the same ruleset, and try to create my own.

Here is my XML


<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<windowclass name="item" merge="join">
<sheetdata>
<subwindow_record name="main">
<script file="campaign/scripts/item_drop.lua" />
</subwindow_record>
</sheetdata>
</windowclass>

<windowclass name="item_main" merge="join">
<sheetdata>

<line_column name="divider7" />

<label_column name="charges_label">
<static textres="charges" />
</label_column>

<number_dropadd name="charge">
<anchored to="charges_label" position="right" offset="25,0" width="60" />
</number_dropadd>

<label_fieldtop>
<anchored to="charge" />
<static textres="charges" size="50%" />
</label_fieldtop>

<number_dropadd name="maxcharges">
<anchored to="charge" position="right" offset="10,0" width="60" />
<default>50</default>
<gmeditonly />
</number_dropadd>

<label_fieldtop>
<anchored to="maxcharges" />
<static textres="max_charges" size="50%" />
</label_fieldtop>

</sheetdata>
</windowclass>
</root>


Now, everything has gone smoothly, with the exception of the following little glitch. The "Charges" and "Max Charges" strings keep getting shoved up and into the divider:

https://i64.photobucket.com/albums/h178/Jwguy/FGErrorExt_zpsb6knrkmg.png

Now, I've tried a few things, such as anchoring the label column to the divider and positioning it to "bottom", and so on, but I can't seem to figure a means to get it positioned ever so slightly lower.

Anyone have any ideas?

Moon Wizard
September 4th, 2015, 01:30
All of the *_column templates are located in the CoreRPG rule set. You can use a good text editor to do a multi-file search over all the files once you unpack them. The rule set PAK files are just renamed ZIP files.

From there, you can look at how the they are defined for vertical offset, and specify a larger vertical offset to compensate for the extra room you need above the fields for the field top labels.

Regards,
JPG

Jwguy
September 4th, 2015, 03:59
Well, I got lucky. I copied the one relevant line I saw and pasted it in, and doubled the offset, despite not knowing what it'd do, and it seems to have worked. Thanks a bunch.

LordEntrails
September 12th, 2015, 05:14
Jw, what was the line you added? And where exactly?