Posts by Trevor

    Hi folks,


    tl;dr need testing and advice


    I'm working on a plugin that replicates the /tpa (TelePort with Accept) functionality of bukkit. In short, it allows player A to teleport to player B if player B permits it.


    My plugin is working on my test server and currently features:
    * configurable activation commands
    * a block list (to automatically reject requests from specified players - (tracked by UID in case the player changes their character name)


    Still to add:
    * Ability to reject ALL incoming requests
    * Auto-adjust request box to width of requestor name
    * Localization


    Problem 1: At the moment, the request has a 5 second timer, offers no immediate feedback, and is only processed after that timer expires. What I'd like is for the Accept/Deny to take effect immediately when Player B presses the key. I suspect that a callback is needed here but I'm not sure. Any advice is appreciated.


    Problem 2: I'm a complete novice programmer and I've tried to write good code but I'm sure that I've got some ugly things in there. If anyone has the time and inclination, I'd appreciate it if you'd have a look at my code and offer some improvements.


    https://github.com/trevorjd/rw…er/src/com/trevorjd/rwtpa


    Problem 3: I've tested this on my private test server but of course I only have a single user to test with. If anyone can give it some testing in a real multiplayer environment, that'd be great. Unzip directly to plugins folder.
    rwtpa.zip


    Commands:
    /tpa (for help)
    /tpa send <playername> (sends tp request)
    /tpa block <playername>
    /tpa unblock <playername>
    /tpa clear (to delete the whole block list)

    I understand your frustration but if other people can get it working, then so can you!


    Apologies if some of the following is already known. I'm not sure how much you already understand of the way RW works. All five parts of my sample code are important. We're right on the limits of my knowledge right now, so if you need further help, please put your code on github or wait for others to offer advice.

    Code
    public static GuiImage createConfirmationGraphic(){
    ...
    public static GuiPanel createMainPanel(){
    ...
    public static GuiLabel createHeaderLabel(){
    ...

    These three define the Gui elements. This is where you get the image file and embed it in the GuiImage.

    Code
    public static void setMainPanelAttributes(Player player)
    ...

    As noted in the comment, this must be called from a PlayerSpawnEvent. It creates a generic GUI template then copies the elements as player attributes that are unique to the player. This is necessary, otherwise a GUI operation (e.g. closing it) would affect everyone on the server.
    In here, we create a GuiPanel mainPanel to hold the other elements. The other elements are added as children of the GuiPanel. (I see that in the prior example I forgot to add GuiImage as a child.)


    In my case, I've put the GUI code in a separate class rwtpaGUI and I call setMainPanelAttributes() from the main class.

    Code
    @EventMethod
    public static void onPlayerSpawn(PlayerSpawnEvent event) {
    Player player = event.getPlayer();
    // Prepare GUI
    setMainPanelAttributes(player);
    }

    Finally, the following toggles visibility of the player's personal GUI so you can turn it on and off as needed (in my case from within the teleportPlayer() method).

    Code
    public static void showHideMainGui(Player player, boolean showHide){
    ...

    If you'd like to see it altogether... https://github.com/trevorjd/rw…er/src/com/trevorjd/rwtpa

    From your description, and without access to the code, I don't know what's causing the white rectangle. Is it a gui element that's blocking the image from being seen? The result a result of a bad file? Improper sizing? Are you creating the gui in the right place? Are other elements working OK? There are so many possible problems and no one can nail it down from your descriptions thus far.


    If you can upload your plugin to github, folks can take a look with a fresh pair of eyes.

    It's happening occasionally on the server I played on. A server restart fixes it but it comes back. I suspect it's due to SQLite being asked to do too much at once. SQLite wasn't designed for concurrent queries. If you can, consider switching your server to use MySQL. If you want to keep your existing world, you'll need to convert it. Note that once converted to MySQL, you can't convert back to SQLite.

    Without your code, or even a description of what your image should look like, no one can troubleshoot for you.


    I'm a java rookie myself. Following is how I adapted what an established author sent me a couple of days ago. Perhaps this will help.


    Outside the code snippet:public static final String FILE_CONFIRMATION_GRAPHIC = "/resources/images/confirmation.png";This pulls the image data from the specified location under my ~/src folder.


    I recall reading somewhere that RW doesn't currently support partial transparency, just fully transparent or fully visible. Perhaps someone else can confim and you can test by making an image with full, partial and no transparency.

    TL;DR - It seems that if you quit or disconnect after dying before Respawn, your corpse is not visible to yourself, but is visible to others, also when you reconnect to the server, you're at Y2075.


    ---


    Twice in the last 48 hrs, a player has died and crashed or disconnected shortly after. In both cases, the player was unable to see their corpse after reconnecting but an admin could.


    To test, I flew up in the air then let myself fall. When I died, I clicked Quit.
    On logging back in, I found myself at about Y2075, fell and died again!
    So I quit again.
    On logging back in the second time, I was again at Y2075.
    Again, I fell and died.
    This time I chose Respawn.
    I then used console kill command to suicide.
    I respawned and had a corpse as normal.
    I then used console kill command again.
    I chose quit.
    When reconnecting to the server, I was again at Y2075.
    I used GPS /home to return safely to ground but there was no corpse.
    I should have 4 corpses, but I only have 1.


    So it seems that if you quit or disconnect after dying before Respawn, your corpse is not visible to yourself, but is visible to others, also when you reconnect to the server, you're at Y2075.


    Two outcomes are requested:
    1. Corpses remain visible after quit/disconnect/reconnect
    2. On logging back prior to Respawn, the player should respawn at a more reasonable Y level :D


    Thanks!

    I'm at map location ~73700, 80, 10800. This far from 0,0 there appears to be a minor rendering glitch. Held items jitter when the player PoV changes as there is a slight disconnect between rendering the item and rendering the player's hand. Similar jitter can be observed around the base of trees.


    Further testing by moving to 200,000, 70, 0 results in much greater jitter.


    Game performance is otherwise fine.

    Thanks for the comprehensive reply. Yes, I'm on Rosalia. Not sure if Shark has ServerTools on there as I'm just an Admin_Lite :D


    The ES plugin quite likely does only message me privately, but nonetheless, it would be nice to separate that buy/sell "spam" from the general hubbub.


    Yeah, I considered the lack of a free pointer in my OP. IMO hitting F5 or something to toggle a free pointer for manipulating GUI elements would be suitable.

    When I interact with any crafting table, open a door, etc. I get an Object ID reported in chat. That was the debug function I was thinking of. Is that a server config?


    We have a number of automsgs, your EconomySystem plugin, ABM and others that all report in the general chat window. When the server is busy, there are many people chatting, having independent discussions which are all lumped in the same general chatbox. As a semi-admin, it's my role to welcome people to the server and give them a basic induction which involves a lot of repetitive text that existing players have heard many, many times.


    My vision for a tabbed chat would allow us to have an unfiltered tab, a tab for ES plugin responses, ABM responses, private discussion tabs, etc. That way players can tweak the chat to which information is relevant to them, flip across to other tabs to get needed info, etc.

    Hi Red,


    Another one that's probably been suggested but I couldn't find. The current chat handles output from debug functions (like Object IDs), messages from plugins, in addition to player chat. It would be helpful if we could have a tabbed chat that allowed us to separate these. Also, the ability to create custom channels and tabs.


    I forget which game had this, possibly WoW. We could create additional tabs and then use checkboxes to select which events showed in that channel.


    It might not be trivial to add this since it tab selections and checkboxes would require clickable GUI elements, but perhaps that could be triggered by a function key.


    Cheers!

    Hi Red,


    I'm sure this has been suggested before, but I didn't spot it in the first few pages of suggestions. Apologies if this is a "done to death" suggestion.


    It would be very helpful for the construction of many, many things, to have right-angle triangle planks and circular planks with snap points on the circumference. I'm not sure how easy it would be, but if circular planks make it into the game, it would be nice if planks (and triangle planks) could be told to warp/curve to the circumference.


    This image illustrates the limitations of the current options. As you can see, the sides of the grain silo would benefit from curved panels, and curved triangle panels would mean the top dome could be done with far fewer flat planks.


    https://steamuserimages-a.akam…AF0F5E430A097B9B873C1348/


    Similarly, right-angle triangles would prevent corners of flat panels from poking through, and require less panels overall.
    https://steamuserimages-a.akam…09863708F6CB6FA507C3784A/


    Thanks!

    I had a guy on my server last night that swore up and down he had a underscore in his name NL_Newfie but it showed up as NL Newfie with a space when I tried to TP to him I could not. I could not use his name at all in the console. The database captured he was using a space not underscore. The guestbook routine wrote the space too.


    If I edit the database to match his UID to a new name without the space would that mess with him or would the server just correct it or add another entry next time he logs on?

    I suspect what happened here is that the player changed his Steam name, not the RW IGN. I've had that happen a few times so now I spell out that they need to return to the main menu and edit their Profile to change the name.