Talk:Plotscripting Dictionary (In Progress)
TMC: It would be a pity to remove the alphabetical list - this should prehaps be the index page, with the actual commands on other page(s).
PS: You should work from the latest version of the dictionary, since this will probably not be done before quaternion anyway.
Bob: One thing to remember about the plotscripting dictionary is that even when it is fully wiki-ized, the old html version will still need to be kept updated for HssEd ... (of course HssEd is buggy, and doesn't work well for Windows XP users so I don't know how many people care.) I am not saying that we should not wiki-ize the plotscripting dictionary, we should. Also, I think separate pages for each command would be nicer (although more work of course)
Mike: My dream is to re-write the dictionary in XML. That way, generating the HssEd compatible version would be easy, updating the Wiki version would be as easy as copy-and-paste, so on, so forth. It would look something like this:
<plotscripting> <section title="Declarations"> <command> <name>script</name> <cannon>script,scriptname,parameters,()</cannon> <description>This begins... blah blah blah</description> <example>script,bounce NPC,npc,begin #... end</example> </command> </section> </plotscripting>
With XSL stylesheets, it becomes trivial to transform that data into HTML, Wiki formatting, plotscr.hsd, whatever.
Oh, TMC: I am working from the latest copy of the dictionary. It has the Save game commands, and a couple other new commands. I'm sure I'll hear about any new commands too.
TMC: "working from the newest version" what? The one here is not the newest version, but maybe you mean that as you format each command, you're refering to the latest?
Well, I care about the hssed online help, and I use win XP! Eevn though I can't compile from it, and hssed occasionally spits errors, I still prefer it to notepad and use the context help.
Either way, the html version would be a quicker reference, and obviously is available offline.
Mike: Is not the copy of the dictionary on hamsterrepublic.com the latest? If not, then where would I get said latest copy? Don't be fooled by the date, it hasn't been incremented in a long time.
Mike: Ok, I've officialy started working on the XML plotscripting dictionary. During this, I will be able to generate incomplete versions of the HTML dictionary, as well as Wiki versions. If you add new commands to the dictionary, it would be ever so nice you you could post them here in the format I posted above, here again, simplified:
<plotscripting> <section title="Whichever section it goes in"> <command> <name>whatever the command name is</name> <cannon>the cannonical format (with,parameters)</cannon> <description>However it works</description> <example>Post a short example of it's usage here. Doesn't need to be a full script, just a snippet</example> </command> </section> </plotscripting>
TMC: The lasted version of the dictionary (and specification) is in the 'docs' folder of the source. New: mouse commands and section, save game commands, npcatpixel, += and -=
It has updated last changed date too :o
Mike: ... whatever. I'll fix that up later. Anyway, in-progress demo: http://ohr.finalfantasyq.com/plotdict.xml If you're running a modern browser, it should show up properly, and you can view the source to see the raw XML data. The XSLT template is at http://ohr.finalfantasyq.com/plotdict.xsl
I will fix up the style of the page tonight. I'm at school right now, and hamsterrepublic.com is blocked... but, yeah. I'll also whip up a Wiki template tonight
Bob: That XML stuff is spiffy! How much control does the transformation to HTML give you? HssEd is pretty picky about the formatting of the <a name="about-blah"> tags in plotdictionary.html, because it uses those to locate the command it cares about.
Mike: Let me put it this way... xml pwnz j00r b0x0rz! Or, more specifically, I can make it do anything I want.
Mike: Or, even MORE specifically, how picky is HSSed? To locate a keyword, does it just strip whitespace from the active "token"? XSLT isn't a full language, and doesn't have any string processing capabilities, so if we need the "stripped down" versions of the keywords, we have to put them in manually, which isn't that big of a deal, really.
Bob: Yes, HssEd strips whitespace and then searches for that, but the XML could be something like this:
<name>create NPC</name> <simplename>createnpc</simplename>
... or perhaps alternatively the XML could be transformed/exported to plotdictionary.html and then some other post-processing script could insert the spaceless versions of the command names.
Mike: I thought of the second idea first, but then I thought "I will make this work straight from a web browser if it kills me!" So, I added the shortname element. I also changed a couple other things around. the structure now looks like this:
<plotscript> <section title="Teh section"> <command id="thekeyword"> <cannon>full keyword with spaces (and, parameters)</cannon> <shortname>full keyword with spaces</shortname> <description>Description, of course, but you can also refer to <ref>otherkeyword</ref> too, using thier "id".</description> <example>full keyword with spaces (1,2)</example> <example>#You can have more than one example</example> </command> <command id="theoldkeyword"> <shortname>the old keyword</shortname> <alias>thekeyword</alias> </command> </section> </plotscript>
So... yeah. I'm still ironing out some bugs in the DTD (programmatic description of the XML structure, for any non-XML people) so that this is a fully valid and validating XML document. And, I'm stil working on the XSLT, but it looks almost exactly like the original now. For those too lazy to scroll up for the links, they are http://ohr.finalfantasyq.com/plotdict.xml and http://ohr.finalfantasyq.com/htmlplot.xsl
Mike: Since I like talking, more info: The PDL format (as I have now named it) is stable enough that we can start adding things en masse. I have added documentation to the plotdict.xml file, so use it. If you write anything up, please post it... er... somewhere... or email (caron.mike@gmail.com) it to me, I guess... FYI, I will be doing the Wait Commands section, then the Suspend and Resume section, so don't do them, or we'll have redunancy. BAD redundancy.
Mike: Ok, I finished both of the sections I said I would do, and I have uploaded the source files again, as well as http://ohr.finalfantasyq.com/plot.html which is a compiled version of the dictionary. I need to test it with hssed, but I doubt I'll have any major problems.
Bob the Hamster: Hey, I have an idea. Rather than importing the dictionary as this page does, why not transform the plot dictionary XML file to/from the format supported by Special:Export and Special:Import. That way we could have a separate page for each plotscripting command (maybe in a plot: namespace)
Mike C.: Capital idea, old boy! That said, is there a description of the format anywhere, or would I need to reverse engineer it from an Export file?
Bob the Hamster: wikipedia:Help:Export has some info about the format
Mike C.: Yeah, I figured it out. I'm just trying to figure out why, after an initial import of a page, it won't overwrite it on subsequent imports. This is a serious problem, but I need to play around with timestamps, soooo... gimme a few minutes...