Asmor said:
You've given me some ideas I'll look into. Unfortunately, I simply do not have access to the details for the powers. All I have is what's in the .dnd4e file, which isn't much...
Hm. Yeah. But the burst/blast thing is a real killer for its usability - for example, the two players of mine who most need it are arguably the wizard and the swordmage, both of whom have lots of each.
In terms of distinguishing between utility and attack powers, a couple of notes from perusing the XML by hand:[sblock]First, although it will not help for racial powers, it appears that you
can effectively tell at what level a power was gained, in a meaningful way. If the <Level> object includes a <RulesElement> gained by retraining, then that RulesElement contains an attribute
replaces="nNnNnnN". The contents here match the
charelem gibberish code corresponding to the power which they no longer have. Thus you can tell what effective level something was gained at by following that chain back. I'm guessing that you can usually do the same for powers gained from feats, most of which are either (a) a Channel Divinity power, or (b) literally or effectively (cf. Spiked Chain Expert and its kin) a power-swap feat.
If you care enough to do so.
However, I'm not sure it's necessary. I assume you wrote your code to discard the <Weapon name="Unarmed"> that the character builder inserts into the power descritions, yes? Because the Firepulse power, my example here of an attack power with no associated weapon, does actually have its attack stats listed in the <Power> block. However, because it's got no associated weapon, the only "Weapon" entry is the unarmed one. So if you tweak it from
(ignore the <Weapon name="Unarmed"> entry) to add
(...except if it's the only <Weapon> listed for that power), then you should catch Dragon Breath, Firepulse, Earthshock and so forth just fine.[/sblock]
This still doesn't cover the Burst/Blast thing, though, just the question of what's an attack. I have a good (and hopefully easy) idea for this. Add a "?" button beside the powers, and/or a menu item "Add info about this power" or the like. (A right-click context menu with "Use", "Recover", "Add info" and similar would actually be ideal here.) This brings up a panel which allows the user to enter at least the following information:
- Is this a utility power or an attack power?
- What is the area of effect of the power - which could include the following radio buttons:
- Single Attack Roll
- N attack rolls (which covers Twin Strike etc) - note that by the rules these almost always call for separate damage rolls, unlike bursts / blasts.
- Burst [M]
- Blast [N].
Both of the latter then trigger the target-selection grid I described, either [2M+1]x[2M+1] or [N]x[N] as appropriate, when the power is used.
(This would, of course, be a perfect opportunity to allow them to enter more information than this, such as customizing various details, but I'd leave that on the TBD list for now.) Now, before you worry about the data storage for this additional information, read on. The perfect solution follows at the end of this post.
Asmor said:
[Re: the RNG...] I've noticed something similar, but didn't do much testing so just chalked it up to randomness. I'm using the Mersenne-Twister algorithm, which is supposed to be good...
In my experience virutally all RNG issues are coding bugs with what you do with it after the RNG, not with the RNG itself. An innocent scaling error being Ceiling'd into the 1-20 range, for example. Best way to test it is just to insert a nice big for loop, tally d20 outcomes exactly as though they were being reported to the player, and take a look at the distribution that results.
Asmor said:
[Re: skinning] I appreciate the offer but I'll pass. I'm apparently really weird in my disdain for custom look-and-feels... I hate skinned applications, and my first order of business when using one is to try and find a Windows theme...
I may have miscommunicated here. I'm with you - I loathe the whole fetish for custom skinning by the users. However, where I disagree with you is on wanting a plain vanilla Windows interface; I strongly prefer it when the designer himself ties the aesthetics to the function as much as possible, creating a pleasing interface whole. The Character Builder is actually not a bad example here, quite mild in its deviations from vanilla yet enough to let me tell at a glance which application I'm looking at, and to keep my mindset from being jarred out of the gaming groove. It's like flavour text on powers... technically it adds nothing, and yet it matters.
But if, as the designer, you want the single look&feel to be vanilla Windows, so be it. If I
really decide I care, I'll beg the source code and learn enough .Net to give myself a version that pleases me more.
------------
Now. Biggest and coolest idea I've hit for you yet.
Screw the .dsq format. Write state information, and other provided information, to the .dnd4e file directly. How? Easy.
Use the Journal.
You can name a Journal entry anything you want (I've just done a text one up labeled "Digital Squire Data"). You can't put XML inside it directly - it parses the brackets into < and > objects, which I'm very glad to see in general. But you can put text-form data of any other kind you like, in there (it even preserves redundant whitespace and carriage returns), and I'm not (so far) seeing a length limit.
This means that the player can take the character away, level them up, and come back... and Digital Squire will still have their damage, powers spent, and so forth tracked from where they were. Presto.
This also makes far, far easier the "User entered data" about powers I mentioned above. The .dnd4e file isn't giving you something? Let the user enter it once, and then store it in the Digital Squire Data journal entry.
Later on, in fact, you might opt to write a master "Fill in all necessary extra information using DDI" button, which goes through and identifies all powers without (e.g.) a Number of Rolls entry inside your private data, and does a DDI Lookup and string-parse on each of them to extract that information in the background. But frankly this is a bonus, not a necessity, as long as we're able to tell DSQ what it needs to know to handle the powers properly in play.