Posts by Trevor

A new update is now available, introducing seasons and more!
Latest hotfix: 0.8.0.1 (2024-12-20)

    ich finde diese Erweiterung ganz gut. Nur leider verschwinden die anderen Funktionen wie das betrachten und löschen von Bilder.
    Sonst ist dies ein toller Ansatz :thumbup:

    Vielen Dank. Ich deaktivierte funktionsunfähige Funktionen. Später werde ich testen, verbessern und wieder aktivieren, wenn möglich.


    Many thanks. I have disabled inoperative functions. Later, I'll test and re-enable those functions if I can.

    This sounds very promising :thumbup: Of course you can release the utility, the old RCON tool is pretty limited anyway so it's definitely good to see an improved version of it :)

    Thanks, Red! It's now available for download. As I've done this by decompiling the rcon.jar, and just one class in particular, I've been a bit limited in the changes that I can make. If you're willing to share the source code with us, I'm sure the community would be delighted to take over maintenance of the RCON for you.

    Hi folks,


    My procrastination skills are without peer. Rather than doing the study that I should be doing, I've decompiled the RCON tool and made some improvements. It seems to be working fine in my limited testing. Please let me know if you have any issues.


    The currently-disabled RCON functionality may be addressed as time/energy/study/skills permits.


    Features:
    * Chat pausing
    * Word-wrap
    * Customisable admin name
    * Customisable admin chat color
    * Resizable
    * Save settings
    * Disabled non-functional features
    -- disabled all tabs except Server Control
    -- tested the buttons on the Server Control tab. My test server didn't crash.
    -- fixed server yell button (meh, it was there!)


    Installation:
    TrevoRCON is supplied as a jar file. It needs to be placed in the same folder as the old rcon.jar
    Double-click the new jar (not the .exe) to run it.


    Windows users may create a shortcut:
    Target: "C:\Program Files\Java\jre1.8.0_161\bin\javaw.exe" -jar "C:\Program Files (x86)\RCON\trevorcon.jar"
    WorkingDir "C:\Program Files (x86)\RCON"
    Change the java version number and the location of the .jar to suit your system.


    Download:
    Current:
    0.1.1 http://trevorjd.com/trevorcon/trevorcon.jar



    GitHub:
    * https://github.com/trevorjd/trevorcon

    Unfortunately Galveston hasn't shared his code. Here's my code. Can you spot what's wrong? I've tried each of the commented variations with no apparent difference.


    I have set my plugin to listen for KEY_ESCAPE and call closeGUI() when that happens. That's working fine, however the default game listener still runs and brings up the ESC menu (settings, quit etc.)


    Is it possible to tell the game to suspend listening for keys when a plugin is listening? If not, what's the best way to express this in an API change request?


    Thanks!

    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.

    Hi folks,


    I'm trying to make a dialog box with controls and I'm not grasping the coordinate system. Can anyone help straighten my brain?


    The following image documents the testing that I did. I created a 0.5f x 0.5f GuiPanel with center pivot. The GuiImages are children of the GuiPanel. In all 4 tests, the elements remained the same. Positive X/Y coords, relative=false. Only the pivot was changed. The icons are at 2px, 50px and 100px from the anchor point.


    I see here that the anchor point is relative to the bottom-left of the GuiPanel and that positive coords send the image up/right in all cases. From having dug through the threads here, I expect this is "working as intended" as that's the way that OpenGL does it.


    I want to put (for example) the close button at the top right of the GuiPanel. If I could anchor it to the top right and come in just 2px X and Y, I could position it where I need it. I don't want to use relative coords as they're imprecise. I can't just say "200px from the bottom/left" because I don't know how big 0.5f is on your screen.


    What am I missing?


    Thanks,
    Trevor


    Glad you got it working! I totally understand your frustration :D


    You can change:
    new ImageInformation(this, "/rw/plugin/images/filename.png");
    to
    new ImageInformation(plugin.getPath() + "/assets/filename.png");


    So far I've only needed to use images which won't change (confirmation buttons, etc.) so I store them in the jar.


    Remember that if you want to have some external process updating the images outside the jar, you'll need to re-execute not just the ImageInfo statement, but also the bits that depend on it (setImage and visibile on/off at the least).

    OK, that was only a few pieces of your code so I had to do a lot of reconstruction, but I got it working.
    With images singleyes.png and singleno.png in the assets folder within the jar file, the commands /respond yes, no and off perform as you might expect.


    As you can see, I've implemented the method I've been taught while preserving as much of your code as I could. I'm not sure if it's the best way, but it's modular, pretty easy to understand and it works.


    * Called from a PlayerSpawnEvent, the setupGUI() method defines the GUI elements and sets them as attributes to the player that just spawned.
    * Called from anywhere in the code, the showHideGUI (or variations therepon) can be used to show/hide various elements. As the images are children of the main panel object, in the code below I'm toggling that as well. I haven't tested if that's strictly necessary.


    Anyway, I'm off to bed then away for about 3 days. Good luck. I hope this helps.

    Go big or go home :D


    TBH I don't have a deep understanding myself but this method works for me. If you surrender and you're still reluctant to share your project with the public at large, you're welcome to PM me your files and I'll see if I can spot what's wrong.