It'll be a long-term project, but the core areas I'll need help with are:
- defining the AD&D rule set using XML (example below)
- understanding how to use Perl/Gtk2, since the documentation is sorely in need of... well... existing
- monster/NPC AI for battles
I've looked at how DungeonForge stores its data, and I think using XML is probably going to be easier than coming up with some special format. I'm not an XML purist -- I'm not a czar of the DTD -- but I figure the data would be stored like so:
<spell class="mage">
<name>Sleep</name>
<level>1</level>
<message>%t is put to sleep</message>
<sounds>
<cast>DEFAULT</cast>
<hit>enchanted.midi</cast>
</sounds>
<images>
<cast>DEFAULT</cast>
<hit>DEFAULT</hit>
</images>
<friendlyfire>0</friendlyfire>
<combatonly>1</combatonly>
<cumulative>1</cumulative>
<castbyparty>1</castbyparty>
<canscribe>1</canscribe>
<autoscribe>0</autoscribe>
<candispel>1</candispel>
<throwvs>spell</throwvs>
<throwresult></throwresult>
<target type="square">
<count dice="" sides="" bonus="" perlevel=""/>
<range dice="" sides="" bonus="" perlevel=""/>
</target>
<duration units="">
<length dice="" sides="" bonus="" perlevel=""/>
</duration>
<casttime></casttime>
<abilities>
<ability>sleep</ability>
</abilities>
<effect>
<attr>ASLEEP</attr>
<amount>1</amount>
<units>absolute</units>
<targeting>target</targeting>
<cumul>1</cumul>
<worksif>
<true>$TARGET->hit_dice() < 5</true>
<false>$TARGET->is_undead()</false>
</worksif>
</effect>
</spell>
Something like that.
My biggest stumbling block when it comes to XML is determining what should be an attribute of an element (like the "class" type in the spell element) and what should be the data of an element (like the name of the spell in the name element).
_____________________________________________________
Jeff
japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and
perl
hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.