Tips on Codewriting for Truly Random
One of the problems I’ve run across while typing up the code is what program to use to write them up. While the program doesn’t save a file extension to the files it creates, they can easily be opened up in a word processor of nearly any sort. The problem comes in saving them.
I’ve noticed that Microsoft Word likes to tack on all sorts of annoying hidden code when you save a file. This makes it unusable by Truly Random when trying to load it. Notepad is great, but if you need to edit you’d better be comfortable in completely ignoring tabs to make the code easier to read. This also presents a problem while listing it on a site like this with the “code” html tag.
When it comes to typing up my code, I’ll use Word or Wordpad so I can have my editing ability, then I’ll copy and paste it over to any xml editor to save and check my brackets. I found a nice, easy to use freeware editor called XML Marker . This also allows me to save to a clean xml file with no hidden code.
When loading a newly created set into your app to test it, I recommend having your file open in your xml editor. This way, if any error messages are generated, you can easily cross-reference to your file and make the necessary corrections.
Finally, there is one bit of code you never want to forget while creating your own sets: the initial xml code line. This line goes before all others and tells the app what it is and how to read/recognize it. In anything you import or export, be it a dice set or group, it must appear on the top line.
One thing to keep in mind about this code, however, is that it does not agree with sites that use xml in their formats and tends to screw all sorts of code or format posting. While I’m sure there’s a way around it, it’s far easier simply to say “here’s the code, put brackets around it.”
So here’s the top-line code. Put brackets around it:
?xml version=“1.0” encoding=“utf-8”?
If you have any questions, thoughts, or help of your own, please don’t hesitate to ask or comment in the comments section. If you create a dice set or group of your own and would like to share it, I would be happy to post it on here with proper recognition (taking a cue from the Gaming Music “campaign” by DarkMagus ). This will give the community a one-stop-shop for user generated content.