[Plugin][beta] rwDoc - Documentation for a Rising World

  • Updated: 2018-08-05
    tl;dr - Link of Images


    Hello friends!


    I have written an improved in-game documentation system for RW. I've tested about as much as I can on my test server and it's now available for beta-testing. It seems quite reliable but please expect some bugs. This is my first serious programming project and as a novice programmer, I'm aware that I know very little. I may have used bad practices or inefficient routines. I'm open to constructive criticism and suggestions.


    What?


    * rwDoc is an enhanced version of the in-game journal that allows server administrators and mod authors to provide attractive, interactive, in-game documentation.
    * rwDoc is supplied with a sample document and an instruction manual. Both can be accessed in-game, of course.


    How?


    * rwDoc extends the vanilla journal.xml format with additional attributes and provides extra functions that the vanilla journal can't. It should be compatible with vanilla journal documents but as this is a beta plugin, and the game itself is alpha, we may run into problems. So far, I've only tested with the example journal file and my own documentation. I would appreciate it if some people could send me their server's journal.xml file so that I can see how rwDoc handles it.


    Features:
    * remembers reader position
    * word-wrapping (optional (can be disabled with attributes))
    * configurable commands (change to your language)
    * configurable messages (change to your language)
    * customisable front page
    * page linking (optional with the <menuitem> tag)
    * automatic page numbering
    * simple navigation
    * a close button
    * indents (optional with the indent attribute)
    * image embedding (optional with the <image> tag)
    * pre-defined images (bullet, tick, cross, horizontal and vertical rules) (optional)
    * image centering (optional)
    * image frames (optional)
    * automatic vertical formatting (optional (override with posx and posy))
    * in-game document refresh command (optional (enabled by default (server admins should disable when finished editing)))
    * editor mode (highlights GUI elements) (optional (enabled by default))
    * automatic version update notification (optional (enabled by default))
    * no need to specify page=left or page=right. rwDoc processes pages in sequence and takes care of numbering. Link to different parts of your document using plain-language index attributes in you <page> tags.


    Limitations:
    * pages do not scroll, authors need to test layout before publishing (API limitation (Unable to determine the width of GuiLabel)
    * does not support permissions (Maybe later, if I'm convinced there's a need.)
    * word wrap width must be specified in config file (API limitation (Unable to determine the width of GuiLabel)
    * log messages are English only
    * config file is English only
    * cannot handle non-ASCII (Game limitation)
    * word-wrapped text presentation issues with align and indent attributes (API limitation (Unable to determine the width of GuiLabel)
    * Nav buttons and Close button won't work if your text cover them! (API limitation)
    * In-text color codes (e.g. [#7055ed]) behave strangely so are not enabled. (Trevor or API limitation? Not sure.)


    So many words...


    * If a picture is word a thousand words, the five pictures in this album suggest I've used about two words per line of code. It feels like more than that.
    * >>> CLICK HERE FOR PRETTY PICTURES! <<<


    Translation:


    * I don't speak any languages except English and bad English. If you're bilingual and you'd like to assist with the translation of the rwDoc documentation or sample documents, please let me know!
    * Bear in mind that RW doesn't support many non-ASCII characters so we'll need to be careful to keep documents compatible.


    I'm a Mod/Plugin Author:


    * Great! Once you've written your documentation and it looks good in-game, simply include the rwdoc.xml file (and associated images folder if necessary) anywhere in your plugin folder. rwDoc will automatically find it and incorporate it.


    Installation:


    * Download the current release and unzip it into your server's plugins folder.
    * Enter Rising World and issue the chat command /help
    * Explore the sample documents.
    * Write your own!


    I have a problem!


    * If you're getting strange-looking documents, you probably made a mistake in your XML. Check the server console / log for information.
    * If your problem is something else, please let me know in this thread, or raise an issue on my GitHub repo.


    It broke my server!


    * Highly unlikely! The only file rwDoc writes is ~/plugins/rwdoc/settings.properties and only if one does not already exist.
    * rwDoc can be safely removed at any time by deleting the ~/plugins/rwdoc folder.
    * If you run into problems, please raise an issue on my GitHub repo https://github.com/trevorjd/rwdoc Please ensure that your problem is not bad XML!


    File(s):
    Current Release
    http://www.trevorjd.com/rwdoc/rwdoc.0.1.4.zip


    Obsolete Releases
    http://www.trevorjd.com/rwdoc/rwdoc.0.1.3.zip
    http://www.trevorjd.com/rwdoc/rwdoc.0.1.2.zip
    http://www.trevorjd.com/rwdoc/rwdoc.0.1.0.zip


    Change Log:
    0.1.4:
    Fixed an NPE when someone else's GUI was being used
    0.1.3:
    Improved handling of legacy document titles and updated documentation to include document conversion
    0.1.2:
    - Fixed handling of vanilla journal files - now correctly orients text and respects page=left/right
    - Fixed handling of ESC key - no longer triggers ESC Menu
    0.1.0:
    Initial beta release.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!