So I found some bugs when creating custom dice. Nothing mission critical here, but it would be nice if you could adress them some time:
- special characters do not work; you already included some special characters (see http://www.ecsoftwareconsulting.com/node/103), but many others (in my case: german umlauts and the minus sign) are missing.
- When the number of placeholders %% doesn't match the number of expression for a face, the import routine gives an error. Unfortunately, the error message includes the whole dice set, not just the face in question (preferrably with a line number). This makes finding the right face a bit of a hassle, especially if you work with custom probabilities :)
Generally it would be nice to have a separat program to create and check the xml-files for custom dice. Right now I create the xml-files on my desktop, then transfer them to sd-card, import them, check the error messages, go back to desktop -> loop until done.
Oh, and when I try to create a custom die in the application, when I enter the dice set name and then hit ok, it gives me an error message saying "Unable to save these changes. At least one die must be defined."
CU
FLo
Opportunities :)
Thank you for taking the time to report these.
The only characters that require substitution in XML are those that might confuse the parser, which is why the quotes, less-than, and greater-than have these special codes.
If you are getting an "Invalid Character Found" error, the info at the following link can explain it better than I. XML Encoding
I haven't tested with a variety of encoding options, so I can't say for sure that the XML parser provided by Android will handle these situations properly. If you have an example XML file, that might help me better understand. You may have to email it to me, though as posting it in the forum can be problematic.
1. You were right, I was
1. You were right, I was using the wrong encoding. After switching from ANSI to UTF-8, it worked. Thx.
4. After some more trial&error, I was able to figure out how to add a dice in the app itself. Here is the problem: You have to use the "menu" key and from other apps I'm used to call settings or information about the app with that button, but not main functionality. Maybe you want to add a "Add Dice" and "Add face" button to the UI, that should clear things up.