PDA

View Full Version : Module Modification XML Formatting Question



afd1366
January 22nd, 2009, 11:18
Based on good advice located in other threads here in the Armory, I've begun experimenting with the modification of a basic ruleset module. I decided to start small by adding new feats. This has gone well, but I have a rather basic xml question: What must be done to achieve a text-wrapping effect in the "prerequisites" field? Because I am adding feats with regional prerequisites, the string of text can become rather long. The new feat loads fine when I check it, but sometimes requires that the pop-up box on the FGII tabletop be opened to maximum width to fully read the text. I have experimented with several variations with no success. I am sure there is a simple solution, but I'm pretty new to xml.

Here is an example of a feat entry in my modified "basic rules" module that results in the problem (the text in bold is the text I'd like to wrap-around in the pop-up box):

<bullheaded>
<name type="string">Bullheaded</name>
<type type="string">GENERAL</type>
<benefit type="formattedtext">
<p>You receive a +1 bonus on Will saves and a +2 bonus on Intimidate checks.</p>
</benefit>
<prerequisites type="string">
Regions: Damara, Dragon Coast, the Great Dale, Moonshaes, Narfell, Nelanther Isles, Rashemen, Vaasa, Western Heartlands, gold dwarf, gray dwarf, shield dwarf.
</prerequisites>
</bullheaded>

Note that required indentations are present though not reflected here and that when I run a check on the form of the client.xml containing the entry it is found to be "well-formed."

Any suggestions would be greatly appreciated!

Tenian
January 22nd, 2009, 11:23
To add line wrapping to a text field, you have to change the ruleset, not the module.

You would need to find the class that is used to display feats, then locate the field that displays the prerequisites and add a <multilinespacing>#</multilinespacing> tag to it.

# is the height of each line in pixels.

afd1366
January 22nd, 2009, 22:25
Thanks. However, I think I'll just live with the big boxes!

Foen
January 23rd, 2009, 06:32
I think there is also the possibility of adding return characters \r to string field data, but I believe it only works if the windowclass has the multiline tag, as Tenian suggests.