For those of you like me that get bored reading long documents, you might want to glance at the install, add_item wizard, and spell checking sections. ************************************ Jerusalem's Code Generator ************************************ I don't play Ancient Anguish. What is this? This is a database designed for Ancient Anguish wizards level 500 and up (apprentices, heed the warning). Ancient Anguish is a fantastic mud (a multi-user dungeon played over the internet), and wizards are the people who program parts of it. This program turns narrative text into LPC code (mud language) to create rooms and monsters. Most of what follows will only make sense to Ancient Anguish wizards, but you are free to play with the program, so long as you don't redistribute it for money, or modify it in any way and then redistribute it. ************************************ What's it for? The point of the code generator is to rapidly produce (from normal narrative text) syntax correct prototype LPC code for Ancient Anguish. Once you have the prototype code, you can remove the data, as the generator's part is over. What, exactly, is prototype code? I'm glad you asked. It's the bulk of necessary code (like add_item, add_noget, etc.) that generally takes you forever to format neatly (with the EXACT awesome wording suggested by your fellow wizards), while you would rather be working on really cool code that that lets you remotely put frosting on Velkyn's nose. It translates stuff like this: ITEM SYNONYMS frosting chocolate frosting chocolate dollop This dollop of chocolate frosting is decorating Velkyn's nose. You might want to ask Velkyn first. Velkyn giggles as she ducks out of your way. Even from a distance, the chocolate frosting smells scrumptious! Into: add_item(({"frosting", "chocolate frosting", "chocolate", "dollop"}), "This dollop of chocolate frosting is decorating " "Velkyn's nose."); add_noget(({"frosting", "chocolate frosting", "chocolate", "dollop"}), "You might want to ask Velkyn first."); add_touch(({"frosting", "chocolate frosting", "chocolate", "dollop"}), "Velkyn giggles as she ducks out of your way."); add_smell(({"frosting", "chocolate frosting", "chocolate", "dollop"}), "Even from a distance, the chocolate frosting " "smells scrumptious!"); And a few other neat tricks... ************************************ Warnings and Disclaimers This version of the code generator is by no means complete or finished. In fact, you volunteered to test it out for me (or at least that's how I delude myself from thinking that I didn't badger you into being subjected to my madness). ************************************ Installation You must have MS Access 97 to run this version. 1. Create the directory: c:\zcode 2. Copy files to that directory: prg97.mdb rdata97.mdb mdata97.mdb 3. Open or run prg97.mdb. (I appreciate that you may want a different directory, and if you understand how attachments work, change it to your heart's content. Use the attachment relocation routine at your own risk. The program is currently looking for data in "c:\zcode\*.mdb". Sorry for the inconvenience.) ************************************ Technical Jargon: Pull down list - You can get the list by clicking on the down arrow to the right of the box, or by using the alt+down arrow keys. You can also type the first few characters of the thing in the list you want, and it will fill it for you. Deleting a record - Either use the button on the toolbar that looks like a trashcan, or click on the record selector bar (that grey bar on the left of the screen or left of the box you are editing), and then hit the delete button. Finding and sorting records - You can do either through the pull-down menu, or via the toolbar. Keep in mind that the find or sort is based on whatever data entry field you are currently in. Navigating through the data - The data is grouped into "records", for instance, there's item records, item synonym records, door records, door attribute records, etc. In the lower left corner or box that you are editing you will see left pointing triangles, and right pointing triangles, as well as a record number. If the screen/box is large enough, it will even tell you a total number of records. Clicking on the triangles move you back and forward through the records. Also page up/page down have the same effect. You can use the tab key to move between fields (those data entry blocks). Jumping to a new record - The new record is the very last record on any screen. There is a button on the toolbar (the right pointing triangle with the star next to it) that jumps right there. You can also get there from the pull-down menu (I think. I dunno. I don't use the pull-down menu. It's only there as decoration.). You can also manually page down to the last record (I don't do that either, but hey, you never know...). The exception, of course, is the main room screen which only has one record (the one you just created through the menu system, or the one you just opened through the menu system). This is due to internal pointer maintenance. :) ************************************ HELP Well, there was a really long help file almost done, but I nudged the power strip the wrong way and lost it all. *grumble* So here's the recap: Set up the options first, and change them as often as you like. If the screens look too small or too large, check into the "Form size desired" option (which was added solely to make Scarecrazy happy). Code can be generated from any data screen, code from screens other than the "main" screens will just be snippets that you can copy/paste into other code. Don't format your text with carriage returns. The code generator formats it. Look at the examples that came with it to see how to go about entering your input. ************************************ What do I do with the old version? If you are done with the data there, delete it. This version looks like a ferrari compared to the first one which worked like a horse drawn buggy on a muddy and rocky road. And it now has monsters. Changes from the old version: Do not use double apostrophes anymore (I fixed it, although I may have missed something if you use a quote now, let me know if you find an error.). The code generation is much, much faster. You can save to a file in addition to copy/paste (there's an option to make this easier). Check out the add_item wizard (see below). Doors are even less cumbersome. ************************************ Option - set help on This toggles some message boxes on and off, and if you leave it on, it will drive you positively bananas in less than 10 minutes (if you are patient, took a lot less for me, I could barely force myself to test it). All they are is brief comments about the different screens. And maybe you might want to read them once, but I assure you, once will be plenty. ************************************ A word about the add_item wizard. Here's the idea. While you are typing away on any data screen, you can highlight a set of words (either by mouse, or by holding the shift key down and using arrow keys), type ctrl+z, and the add_item wizard will pop up with some interesting combinations of those words, which you can then add to the add_item list for a specific room. For example, you have a room with a filename of "tomb". Your long() reads: You are inside a small tomb. A slightly decayed skeleton is wrapped in a long white cloth from head to toe. A small pouch lies mostly decayed near the skeleton's fingertips. If you highlight "slightly decayed skeleton", press Ctrl+z, the wizard will produce: skeleton slightly decayed slightly decayed skeleton slightly skeleton decayed skeleton Notice that if you had the room screen open, "tomb" automatically fills in the room drop down list. You have 4 options, 'Make Main Item/Noun', 'Make Synonym for:', 'Discard', and 'Discard Remaining'. Click the word in the list on the left and the appropriate button on the right. The add_item wizard will not add duplicate entries for that room, so you don't really have to pay much attention. So in the example, you would click 'skeleton' on the left, and then 'Make Main Item/Noun' on the right. Then you would select 'skeleton' from the synonym drop down list. Next, left click 'slightly decayed skeleton' on the left (notice that you do not need to go in order), then click 'Make Synonym for:' to associate 'slightly decayed skeleton' with 'skeleton'. Then you would repeat for 'decayed skeleton'. With the three remaining nonsense combinations, just choose 'Discard Remaining'. Now, let's say you went to the item screen and edited the add_item description of 'skeleton' to be: The decaying yellowish skeleton is the remains of an unhappy warrior. You can now highlight 'decaying yellowish skeleton', press ctrl+z, and make the appropriate words synonyms for the original 'skeleton'. You can also highlight 'unhappy warrior' and 'remains' and do the same. From just that tiny bit of work, now you have a synonym list of: slightly decayed skeleton decayed skeleton decaying yellowish skeleton decaying skeleton yellowish skeleton unhappy warrior warrior remains And the resulting code produced is: add_item(({"skeleton", "slightly decayed " "skeleton", "decayed skeleton", "decaying yellowish " "skeleton", "decaying skeleton", "yellowish skeleton", "unhappy warrior", "warrior", "remains"}), "The decaying yellowish skeleton is the remains " "of an unhappy warrior."); Unbelievable, isn't it? Oh, if you don't want to use the add_item wizard or if you have some odd word to add, you can always manually type it in the synonyms box on the item screen. *cackle* (A side note, why did I assign this to ctrl+z? Well, that's so you can highlight with your right hand and trigger it with your left hand (I'm lazy.).) (Is that the correct punctuation or a cyclops with a double chin?) ************************************ Doors: Ok, it's my application, and here's how I use the door screen. First, I add an associated room file if I want one, then direction and destination. Then I click the "add a group of attributes button" and pick something. That throws in a bunch of related commands. Then I pick some ominous looking attribute that might be what I want, and click on it. Then I click the 'attribute info' button to see if that was the command I wanted. If so, I also note the required syntax. Then I go back to the door screen and type in the appropriate argument for the attribute. Then I pick the next suspicious looking command and try that. When I have the commands/arguments I want filled in, I click on the record selector bar for the attributes that are not filled in (that little grey bar to the left of each attribute) and delete the row via the delete key. I only do one "group of attributes" at a time so I don't get all confused. Notice that I never once said I memorized all the door attributes and all their syntax. ************************************ Spell checking: http://clever.net/quinion/spell/ This provides a fantastic spell checker that works both in notepad and MS Access. No, the program is not set up specifically for it, but rather, the spell checker is set up to work with Access. Or you can just copy/paste to MS Word and get lots of syntax stuff underlined. ************************************ I know how to use MS Access. Can I play around with your code? I'm not going to stop you. Shoot, if you find a better way of doing something, please let me know. If you want to change the syntax of some statement, that is all done in the module "Code Compilation" via all the functions that start with "c" (I guess that stands for code), and in the module "SPIT TO THECODE". Just don't change it and then redistribute it. Some hints: Playing around in the modules will negate the option settings, and you will need to open the options screen and close it again to reset the options. If the generated code does not contain a change that you made to the data, use "fix code" on the main menu. ************************************ I can crash your program!!! I'm certain you can. I wasn't aiming for a hackerproof application. If it was an error, tell me. It comes down to: 'So what if you crashed it. Can you use it???'. ************************************ Working with projects. This release has the ability to group rooms into "projects". Isn't that nice? Here's how I play with this feature. I open my project rooms. Then I click on the datasheet view button, click on the filename column, click on the sort ascending button, jump down to the filename I want to mess with, and click on the form view button. You can toggle back and forth between form view and datasheet view to see all the records at once, or just the record you are working on, and instantly jump around your different rooms. ************************************ Finally, a last word: If you don't like the code generator, you are entitled to a full refund of whatever you paid for it. And no one but me should be charging for it, and I'm not. (If I can't make money on it, you can't either! Don't sell it.) If you find an error, please record what you were doing and what the error said, and email it back to me. This is only the pre-release version, and I'm sure it will be improved as I get feedback. Also, expect the items eventually. -Theresa L. Ford, aka Jerusulum ancient.anguish.org port 2222 ps. Good luck!