PDA

View Full Version : Reference_spells



ldyparadox99
May 1st, 2007, 11:12
Ok, so I've been plugging away to try to get my own d20 spells to show up in the d20 spells mod. I think I finally figured it out AND can get the module to show up inside the program (yay!). Now I'm having a problem with the reference_spells.xml.

Basically I need to insert mana and recast into how the spell description reads so it looks like this:
Spell Name
school
Level:
Mana:
Components:
Cast time:
Recast:
And so on and so forth...

However, it doesn't show up in the spell description when the game is running...and yes I did add the strings to the spell description in the module. I did it last week and got it to sucessfully show up...I've got no clue why it won't this time around. Below is the changes I've made in the reference_spells file:


<columnstringfield name="level">
<anchor>school</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>level</anchor>
<static>Level</static>
</columnfieldlabel>

<columnstringfield name="mana">
<anchor>level</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>mana</anchor>
<static>Mana</static>
</columnfieldlabel>

<columnstringfield name="components">
<anchor>mana</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>components</anchor>
<static>Components</static>
</columnfieldlabel>

<columnstringfield name="castingtime">
<anchor>components</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>castingtime</anchor>
<static>Casting time</static>
</columnfieldlabel>

<columnstringfield name="recast">
<anchor>castingtime</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>recast</anchor>
<static>Recast</static>
</columnfieldlabel>

<columnstringfield name="range">
<anchor>recast</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>range</anchor>
<static>Range</static>
</columnfieldlabel>

<columnstringfield name="effect">
<anchor>range</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>effect</anchor>
<static>Effect/target</static>
</columnfieldlabel>

<columnstringfield name="duration">
<anchor>effect</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>duration</anchor>
<static>Duration</static>
</columnfieldlabel>

<columnstringfield name="save">
<anchor>duration</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>save</anchor>
<static>Saving throw</static>
</columnfieldlabel>

<columnstringfield name="sr">
<anchor>save</anchor>
</columnstringfield>
<columnfieldlabel>
<anchor>sr</anchor>
<static>Spell resist.</static>
</columnfieldlabel>

And here is the spell description for the module:


<spell>
<name type="string"> </name>
<school type="string"> </school>
<level type="string"> </level>
<mana type="string"> </mana>
<components type="string"> </components>
<castingtime type="string"> </castingtime>
<recast type="string"> </recast>
<range type="string"> </range>
<effect type="string"> </effect>
<duration type="string"> </duration>
<save type="string"> </save>
<sr type="string">No</sr>
<description type="formattedtext"><p> </p></description>
<shortdescription type="string"> </shortdescription>
</spell>

Edit:

Ok, so I found the spell description in the d20 reference as well (which I had looked for last week and it wasn't there so I just modified the reference_spells instead and it worked..) and went ahead and added mana/recast to it and it STILL won't show up when the program is running. Again, it's probably infront of me but I can't see it...TIA...and here's the code from d20_reference:

<windowclass name="spelldesc">
<datasource name="spelldesc" />
<frame name="itembox" />
<dynamic minvmargin="10,15" />
<defaultsize width="350" height="500" />
<minimize icon="minimized_reference" />
<tooltip field="name" />
<sheetdata>
<windowopencontrol>
<icon normal="button_dragtarget" />
<bounds rect="10,10,20,20" />
<class name="spelldesc" />
<description field="name" />
</windowopencontrol>
<stringcontrol name="name">
<bounds rect="45,10,-15,20" />
</stringcontrol>

<group id="a">
<stringcontrol name="school">
<bounds hpos="15,-15" vmargin="10,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="b">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Level:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="level">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="c">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Mana:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="mana">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="d">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Components:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="components">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="e">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Casting Time:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="castingtime">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="f">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Recast:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="recast">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="g">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Range:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="range">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="h">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Target/Effect:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="effect">
<bounds hpos="115,-15" vmargin="5,0" />
<multiline spacing="15" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="i">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Duration:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="duration">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="j">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Saving throw:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="save">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="k">
<stringcontrol>
<bounds hpos="15,-15" vmargin="5,0" />
<static value="Spell resistance:" />
<font name="narratorfont" />
</stringcontrol>
<stringcontrol name="sr">
<bounds hpos="115,-15" vmargin="5,0" />
<font name="chatfont" />
</stringcontrol>
</group>

<group id="l">
<formattedtextcontrol name="description">
<bounds hpos="10,-15" vmargin="25,0" />
<font normal="chatfont" bold="narratorfont" italic="chatitalicfont" bolditalic="chatbolditalicfont" title="titlefont" />
<linkicon link="button_openwindow" emptylink="button_emptytarget" />
<selectioncolor value="#FFD296" />
</formattedtextcontrol>
</group>

<scroller>
<bounds rect="-63,-45,45,27" />
<target name="description" />
<button normal="button_scroller" pressed="button_scroller_down" />
</scroller>
</sheetdata>
</windowclass>

Goblin-King
May 2nd, 2007, 12:05
Did you make a copy of the d20 ruleset in a folder called something else? If you copy the files to "rulesets/d20" they will get ignored.

The d20_reference.xml file is a relic that made it into the initial distribution of FG2 somehow, and has hence been removed.

ldyparadox99
May 2nd, 2007, 14:02
Actually I've now narrowed my problem down to whenever I add a new spell description (in the spells module) for the eqd20 ruleset, the spell book will NOT appear in the library. I'm not sure what I'm doing wrong because everything is closed, everything that needs to be labeled eqd20 is labeled as such...and I can modify the rest of the eqd20spells.mod till the cows come home and it will show up activated in the library.

It's specifically adding a new spell or modifying an existing one that makes it disappear.

ldyparadox99
May 2nd, 2007, 19:36
Ok, think I figured it out. I'm not sure if this had anything to do with anything but once I deleted out the existing d20 spell descriptions (even though I needed some of them too) from the spell descriptions, the library showed up just fine, and with mana/recast showing in the program on spell descriptions.

I also noticed I was using apostrophies in a few spell names in the tags, which was perfectly legal in 1.5 but evidently is an invalid character in FG2 code.

At least I got it working.

Griogre
May 3rd, 2007, 06:18
Straight single apostrophies ie 'straight' are fine, it is the curved or slanted ones ‘curved apostrophes’ that xml does not like. xml is also ok with a - but not a long double em dash.

ldyparadox99
May 3rd, 2007, 08:58
Thanks ;-)

I'm starting to notice that 1.5 lead to some bad habits in my naming convention for tags since it allowed a lot of characters that 2.0's .xml doesn't like.

2.0 is also tons pickier on upper and lower cases (just posting this in case someone comes behind me with the same problem).

Progress is being made, so I'm quite happy with that. Just not happy with the hours, and hours, and hours of copy/pasting from the old spell desc file I have to do. Booo.

Pet