PDA

View Full Version : Module causing crash--help please?



steev42
June 10th, 2009, 23:26
I've been working on getting the modules for my Pathfinder ruleset up and running for my players, particularly the Spells. I had it working fine, with one exception--the spell descriptions weren't actually showing up.

Examined the code, compared it to actual working modules, and noted that the descriptions are <description type="formattedtext">...</description> while I had in <description type="formattedstring">...</description>.

So, I did a find/replace of formattedstring to formattedtext, and loaded the new module up. And suddenly, when I try to open the module, FG crashes.

Can anyone help me figure out what's wrong? It's a pretty big file so I'd rather not paste it into the forum, but if anyone cares to take a look, I can email the module to you.

Thanks in advance.

Griogre
June 11th, 2009, 01:33
Why don't you paste up all of just one spell. One thing to make sure you are not getting confused by - There are *two* description attributes: description which is of type formattedtext and shortdescription which is of type string.

Depending on how you did your mass find/replace you could have screwed up all the shortdescriptions also changing them to formattedtext when they should be string types. That would probably cause a crash.

steev42
June 11th, 2009, 11:05
Sure, that I can do.



<BeastShapeI>
<name type="string">Beast Shape I</name>
<school type="string">transmutation (polymorph)</school>
<level type="string">wizard/sorcerer 3</level>
<castingtime type="string">1 standard action</castingtime>
<components type="string">V, S, M (a piece of the creature whose form you plan to assume)</components>
<range type="string">personal</range>
<effect type="string">you</effect>
<duration type="string">1 min./level (D)</duration>
<description type="formattedtext">
<p>When you cast this spell, you can assume the form of any Small or Medium creature of the animal type. If the form you assume has any of the following abilities, you gain the listed ability: climb 30 feet, fly 30 feet (average maneuverability), swim 30 feet, darkvision 60 feet, lowlight vision, and scent.</p>
<p>Small animal: If the form you take is that of a Small animal, you gain a +2 enhancement bonus to your Dexterity and a +1 natural armor bonus.</p>
<p>Medium animal: If the form you take is that of a Medium animal, you gain a +2 enhancement bonus to your Strength and a +2 natural armor bonus.</p>
</description>
<shortdescription type="string">You take the form of a Small or Medium animal.</shortdescription>
</BeastShapeI>




<DetectMagic>
<name type="string">Detect Magic</name>
<school type="string">divination</school>
<level type="string">bard 0, cleric 0, druid 0, sorcerer/wizard 0</level>
<castingtime type="string">1 standard action</castingtime>
<components type="string">V, S</components>
<range type="string">60 ft.</range>
<effect type="string">cone-shaped emanation</effect>
<duration type="string">concentration, up to 1 min./level (D)</duration>
<save type="string">none</save>
<sr type="string">no</sr>
<description type="formattedtext">
<p>You detect magical auras. The amount of information revealed depends on how long you study a particular area or subject.</p>
<p>1st Round: Presence or absence of magical auras.</p>
<p>2nd Round: Number of different magical auras and the power of the most potent aura.</p>
<p>3rd Round: The strength and location of each aura. If the items or creatures bearing the auras are in line of sight, you can make Knowledge (arcane) skill checks to determine the school of magic involved in each. (Make one check per aura: DC 15 + spell level, or 15 + half caster level for a nonspell effect.)</p>
<p>Magical areas, multiple types of magic, or strong local magical emanations may distort or conceal weaker auras.</p>
<p>Aura Strength: An aura's power depends on a spell's functioning spell level or an item's caster level. If an aura falls into more than one category, detect magic indicates the stronger of the two.</p>
<p>Lingering Aura: A magical aura lingers after its original source dissipates (in the case of a spell) or is destroyed (in the case of a magic item). If detect magic is cast and directed at such a location, the spell indicates an aura strength of dim (even weaker than a faint aura). How long the aura lingers at this dim level depends on its original power:</p>
<table>
<tr>
<td>Original Strength</td>
<td>Duration of Lingering Aura</td>
</tr>
<tr>
<td>Faint</td>
<td>1d6 rounds</td>
</tr>
<tr>
<td>Moderate</td>
<td>1d6 minutes</td>
</tr>
<tr>
<td>Strong</td>
<td>1d6x10 minutes</td>
</tr>
<tr>
<td>Overwhelming</td>
<td>1d6 days</td>
</tr>
</table>
<p>Outsiders and elementals are not magical in themselves, but if they are summoned, the conjuration spell registers.</p>
<p>Each round, you can turn to detect magic in a new area. The spell can penetrate barriers, but 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt blocks it.</p>
<p>Detect magic can be made permanent with a permanency spell. </p>
</description>
<shortdescription type="string">Detects spells and magic items within 60 ft.</shortdescription>
</DetectMagic>


Did two of them; the second has a table in it so I figured it was more complicated. I also have a couple with <ul><li>...</li></ul>, so if that's an issue, let me know that, too, please?

Thanks.

Griogre
June 12th, 2009, 21:40
I didn't see any problems with the spells. I had a second so I just threw those two spells in a 3.5 Foundation spell module and they were fine so I think your format is fine. If you are using a custom ruleset, though there *could* be a problem with it.

If you think the ruleset is ok that means your crash is likely coming from a bad character or a messed up spell format. The easiest way to look for this type of thing is to make a copy of your module files and then use those to find the problem and then go back and fix it in the real file(s). If you have a good editor with undo it helps too so you don't have to keep making copies from the original.

The idea is you keep halving the spell list until the module works. So you would go into your copy and delete half the spells in the <spelldesc> part of the module. Don't worry with the spell lists. Then make the new module and see if it crashes. If it doesn't then you know the problem was in the part you deleted. If the new module does crash then you know at least one problem is in the remaining spells.

Once you find which half of the spells crash the module keep halving the problem list until you figure out where the problem is.

The halving and halving (binary search) strategy works well, but one thing to keep in mind is you might have more than one problem. Once you do find the problem just go back to the original and do a search on it to find *all* the problems if there are more than one.

Foen
June 13th, 2009, 10:01
The other thing that can cause a crash is if you have changed the type of a database node: say you first defined spell.description as "string" and later make it "formattedtext" then the application will crash if you run the revised ruleset against an old campaign database. This also happens when you extend a definition (so ability.score, type=number, becomes ability.score.max, type=number) because the original left node has changed changed from a data type to a sub-node type.

To check this, just load up a new campaign using your ruleset and see if the problem persists.

Foen

steev42
June 13th, 2009, 17:44
Thanks for the help, guys. I figured it out--I had put in a test link in one of the spells (Beast Shape III), and had forgotten about it. When I was scrolling through the file grumbling about the time the divide-and-conquer method was going to take, I found it, removed it, and the file works now.

Now I just need to figure out how to do the links properly. :)