Posts by red51

    Hallo Leute!


    Eine Vorab-Version der neuen Plugin API ist nun verfügbar. Damit kann man einen Eindruck gewinnen, was mit der neuen API möglich ist, und man kann außerdem mit der Entwicklung der eigenen Plugins loslegen.
    Im Forum findet sich nun eine neue Sektion, welche der API gewidmet ist. Darin können Fragen gestellt und API bezogene Themen besprochen werden, oder im Feature Wünsche Bereich neue Features angefordert werden.


    Im Gegensatz zur Lua API ist eine Dokumentation vorhanden (JavaDoc, welche auch ein paar Beispiele enthält). Diese kann zusammen mit der Plugin API heruntergeladen (und in die IDE eingebunden werden, sodass sie während des Programmierens angezeigt werden kann), oder alternativ kann hier eine online Version aufgerufen werden: https://javadoc.rising-world.net/


    Leider können die Plugins noch nicht im Server eingebunden werden. Die Server werden in den nächsten Wochen aktualisiert, bis dahin kann man die Zeit nutzen um sich an die neue API zu gewöhnen, oder mit den ersten eigenen Plugins zu beginnen. Sobald die Server aktualisiert wurden, wird die alte Lua API noch für ungefähr 4-8 Wochen unterstüzt, bevor sie entfernt wird.


    Bitte bedenkt dass ein paar Events und Funktionen noch fehlen, diese werden bald hinzugefügt. Wenn irgendwas mit der neuen API nicht stimmen sollte, oder wenn ihr Fragen oder Vorschläge habt, hinterlasst gerne euer Feedback :)


    Download link: https://download.rising-world.net/api/Pre-PluginAPI.zip

    Wenn das Spiel abstürzt, muss i.d.R. im Spielverzeichnis eine "errorlog" oder "hs_err_pid" Datei sein, nur diese können Aufschluss oder zumindstens einen groben Anhaltspunkt geben was da genau vor sich geht. Wenn das Spiel hingegen einfriert (oder sogar der ganze Rechner davon betroffen ist), ist die Ursache ganz woanders zu suchen: Hier können verschiedene Dinge verantwortlich sein, es kann ein Temperaturproblem sein (Rechner überhitzt, vll sicherheitshalber mal Temperatur im Auge behalten), ein Treiberproblem (da dein Grafiktreiber aber aktuell ist könnte es ein anderer Systemtreiber sein, zB der Chipsatztreiber), ein Windows-Problem (...wo soll ich da nur anfangen?^^) oder ein Hardwaredefekt (der Extremfall, natürlich weit hergeholt, aber nicht auszuschließen).


    Wenn das Problem auch bei anderen Spielen auftritt, würde das einen solchen Verdacht erhärten. Wenn es nur bei OpenGL Spielen auftritt (zB Minecraft), wäre ein Treiberproblem naheliegend, oder eben ein Windows-Problem.
    Ggf. kann die Ereignisanzeige in der Windows-Systemsteuerung einen Hinweis darauf geben, ob evtl. während der Zeit, wenn das Spiel oder der Rechner sich aufgehängt haben, irgendein Fehler aufgetreten ist. Um dorthin zu gelangen, gehe in der Systemsteuerung auf "System und Sicherheit" -> "Ereignisprotokolle anzeigen" unter "Verwaltung" -> Links unter "Benutzerdefinierte Ansichten" auf "Administrative Ereignisse"


    Falls du übrigens dem Spiel noch mehr RAM zuweisen möchtest, wie @Deirdre vorgeschlagen hast, kannst du als Start Option in Steam (Rechtsklick auf RW in deiner Steam Bibliothek -> Eigenschaften -> Start Optionen festlegen) "+memory 4096 4096" eingeben (damit werden 4GB Direct- und 4GB Heap-memory zugewiesen).

    How do you want to play exactly? Via LAN, i.e. you and your friends are in the same local network, or in other words, live in the same household, or via Internet?

    Base class: Plugin


    All plugins you are going to create for Rising World have one thing in common: They contain a class which extends the base Plugin class. Usually this is the first step in order to create a plugin.


    When extending the Plugin class, you have to override the onEnable() and onDisable() methods. These methods will be called once the plugin has been enabled or disabled. It doesn't matter what code you put into these methods, depending on the structure of your plugin, you can initialize some variables there. It also makes sense to register all events in the onEnable() method (note: it is not necessary to unregister any events in the onDisable(), in general you don't have to care about any kind of "clean up").


    netbeans_12.jpg



    Register events


    If you want to listen to an event, you have to register it. It's recommendable to register all events you are going to need in the onEnable() method. The Plugin class has a registerEventListener(Listener) method, which expects a Listener. Every event listener has to implement this interface. It is up to you if you want to create separate event listener classes, or simply implement the Listener interface in your main plugin class.


    The particular event methods in your listener are determined by its parameter. It is important that your event methods only have a single parameter, and this parameter must be any event object. The name of your method does not matter. Your event methods also need an "@EventMethod" annotation. Like any other annotations you have to put it above your method.


    Example:



    The "@EventMethod" annotation can take a threading parameter, which determines how the event method will be called:


    Threading.Async Event methods will be called "directly", i.e. a server thread simply calls the event method without doing any synchronization. This is the fastest way to trigger events, but it is not thread-safe. This is the default mode.
    Threading.Sync Event methods will be called from the same server thread, but they will be synchronized. This way you can access shared variables from different events (all these events have to use the Sync threading model).



    Let the party begin


    You are able to listen for events now, but the real action takes place when accessing the various server, world or player functions. Both Server and World are static class, providing various static methods.
    Here is an simple example which outputs the server name, seed and world name once the server is started:

    Here is a more complex Plugin-class which listens for the PlayerCommandEvent (when a player enters a command) as well as the PlayerChatEvent (when a player writes a chat message):



    Final steps


    Every plugin needs a definition file. It has to be called "plugin.yml" and belongs into a "resources" folder in your source directory (once you build your plugin, the resource folder will be added to the resulting jar automatically.




    Here is an example "plugin.yml" definitions file:

    Code
    name: MyPlugin
    main: net.mypackage.myplugin.MyPlugin
    version: 1.0.0
    author: <your name>
    team: <your team, optional>
    description: "Put your description here"
    loadorder: 0
    license: MIT
    website: http://www.myhomepage.com

    The most important values are basically the name (the name of your plugin), the main (the path to your main class, including the full package name), the version (it's up to you to choose a version number) and the author (your name or your nickname).


    One special setting is the loadorder: It can be used to determine the load order for your plugin. By default, the load order is 0. If all plugins have a load order of 0, they will be loaded alphabetically (so a plugin called "Library" will be loaded before a plugin called "Worldplugin"). If a plugin has a negative load order, it will be loaded earlier (so if "Worldplugin" has a load order of -100, and "Library" has a load order of 0, the game will first load the "Worldplugin"). If a plugin has a positive load order, it will be loaded later. This can be useful if your plugin depends on other plugins and you want to make sure the other plugin is loaded first before. If your plugin acts as a library or framework, it's usually recommendable to set a very low negative load order.


    All other values are optional.


    To release your plugin, you have to compile it (in Netbeans, for example, you can rightclick on your project and select "Clean and Build" to compile your plugin). The resulting jar file is basically your plugin (you can rename it if you want). Just put the jar file into a separate folder (e.g. you can call your jar file "MyPlugin.jar", and the folder "MyPlugin" accordingly), and move this folder into the "plugins" subfolder in your game or server directory (if there is no such folder yet, just create it). Now start your server or the game, and your plugin should be loaded.

    Hmm... I'm sorry to hear that :( Maybe try to change the game to fullscreen. Go into the game directory, open the config.properties file with a texteditor, and change graphic_fullscreen to true. You may also set graphic_resolution_x and graphic_resolution_y to your desktop resolution (probably 1920 [x] and 1080 [y]). Save the file, and try to start the game again ;)

    Thanks for the new errorlogs :) The first one (which is most likely responsible for the crash after 40 seconds) is unfortunately a bug which may occur sometimes, too bad it happened right now :| Probably this bug will be fixed with the next update.
    The second one is the same issue as previously (it's unable to find an OpenGL compatible graphics adapter), which is still strange. But since you was able to run the game at least once, I don't think it's related to the APU or the Nvidia driver (the currently installed driver is perfectly fine btw)...


    Perhaps it's related to some power saving options in Windows? I haven't seen such an issue before, but who knows. Please have a look in your Windows Control Panel -> Hardware and Sound -> Power Options, maybe try to set the power plan to "High performance" (it may be hidden under "Show additional plans").
    Does this make any difference to the start behaviour of the game?

    Hmm... definitely some voodoo magic going on here 8| I'm afraid Steam sold you a cursed version of the game... :D
    It sounds like the game didn't really crash previously, just was stuck with doing something? Not sure though, since it's still strange... but in this case the game is supposed to be marked as "running" in Steam.
    While the game is running, maybe grab the chance and please try this: Open the console (by pressing key ~ or `) and type "report" (without quot. marks), then a file called "report" (followed by a number) should appear in your game directory. Please upload this file here, it will provide some useful information about what graphics adapter is used exactly etc. ;)

    Deutsche Übersetzung


    Java Development Kit


    In order to write a Java application, you have to download and install the Java Development Kit (JDK). To create a plugin for Rising World, you need at least the JDK 8.


    You can download the latest JDK here: http://www.oracle.com/technetw…k8-downloads-2133151.html


    Remember to install the 64 bit version of the JDK if you are using a 64 bit operating system.



    Integrated Development Environment


    It is highly recommended to use an IDE (integrated development environment) when creating a plugin for Rising World. In contrary to a simple texteditor, it will provide some comfortable features like code completion or displaying documentation.


    Here is an overview of some popular IDE's:


    Getting started


    First of all, you have to create a new project. In NetBeans, you can create a new project by selecting File -> New Project... -> select "Java Application" and press "Next" -> provide a proper Project Name -> press "Finish"


    Once a project is created, it will be visible in the "Projects" list on the left side.


    In order to create a plugin for Rising World, you need to load the "PluginAPI" library. You'll find a pinned topic containing the latest API in this section of the forum.


    How do you join a lan server?

    If you want to join via LAN, i.e. all persons are in the same network, or in other words, in the same household, just connect to the local IP of the host (Multiplayer -> Connect to IP). To get the local IP, the host can - for example - press [Windowskey] + R, type "cmd" (w/o quot. marks) and enter "ipconfig" (the local IP is the "IPv4-Address", usually it looks like "192.168.x.x").


    However, if you want to play over the Internet, you can either use a program like Tunngle or Hamachi, or alternatively the host has to forward his ports in the router (see the first post in this topic). You have to connect to his Internet IP then, to get it, the host can visit a page like http://ipv4.whatismyv6.com/

    Thanks for the errorlog file :) This one is dated on the 9th of August, at that time the Nvidia driver wasn't updated yet (driver is dated on February 2015). Or did you install the latest Nvidia driver after this date?
    The problem is indeed a missing OpenGL context, which should never happen with any Nvidia driver (unless it's many years old :D ).
    Perhaps just download and install the latest Nvidia driver again, the latest stable driver version should be 368.81:
    http://www.geforce.com/drivers/results/105033


    If it still does not work then, maybe delete all "errorlog" files in your game dir and try to start the game again, then upload the latest errorlog again please.


    Maybe the problem is caused by the AMD APU, it seems there is no driver installed for it 8| Where did you plug your monitor, did you plug it into the mainboard or the Nvidia card?

    Hmm.. do you still get the message about unsupported OpenGL? Usually this indicates that either only a basic Microsoft driver is installed, or the chipset driver is missing (in this case the graphics driver does not work properly in most cases).
    Please have a look if there is a file called "errorlog" in your game directory (to get there, rightclick on RW in Steam -> Properties -> Local files -> Browse local files), if there is such a file, please upload it here, or alternatively post the content here ;)

    Ein Hocker klingt gut, vielleicht wäre es aber auch sinnvoll, sowas wie eine "Sitzfläche" oder eine "Schlaffläche" als "technische Objekte" anzubieten, die also nur per Command erzeugbar sind und kein richtiges Objekt darstellen (sondern wirklich nur eine Sitzfläche o.ä). Diese könnte man in seine selbstgebauten Möbel noch einfacher einbauen ^^

    Das ist schon seit einer ganzen Weile geplant, Problem ist lediglich, dass dies aus Performancesicht ein paar Schwierigkeiten mit sich ziehen würde. Mal ein Schwert an die Wand hängen oder eine Spitzhacke ins Regal legen ist zwar absolut kein Problem, sobald es aber zu sehr ins Detail geht (bspw. eine Kiste mit hunderten Äpfeln, diese dann ggf. noch per Blaupause vervielfältigt) wird es heikel. Besonders im Multiplayer wäre das natürlich ungünstig...
    Der erste Schritt wäre auf jeden Fall, dass es zumindestens erstmal sowas wie Werkzeughalter oder Waffenständer gibt, ebenso die Option, Gegenstände ins Regal zu legen (mit anderen Worten also die Möglichkeit, Gegenstände im vordefinierten Rahmen zu platzieren). Das wird vermutlich kommen nachdem die neue Spielerfigur mitsamt der neuen Items umgesetzt sind (weil das eh eine Anpassung der jetzigen Art und Weise, wie Items eingebunden sind, erfordert) ;) Danach müsste man mal sehen, inwieweit man es sich "leisten" kann, Gegenstände auch frei zu platzieren (ggf. im Multiplayer dann via Permission limitiert o.ä.)^^

    Auch wenn solche Namen natürlich total besch***** sind, ist es ja letztenendes die Entscheidung des Spielers. Zumindestens werden an den Spieler bei der Accounterstellung keine Anforderungen gestellt, was den Namen angeht, somit wäre wohl keine Grundlage vorhanden, einen Namenswechsel zu erzwingen... Die beste Option ist vermutlich, solche Leute nach eigenem Ermessen vom Server zu bannen ;)

    Die report-Datei ist i.O. Was für ein Fehler tritt denn genau auf? Bewegungsunfähig, stockendes Spiel oder Absturz? Wenn das Spiel abstürzt, sollte im Spielverzeichnis entweder ein "errorlog" auftauchen, oder eine "hs_err_pid" Datei.
    Spielst du im Singleplayer oder im Multiplayer? Wann tritt das Problem denn genau auf?

    I am thinking the only way around this would be to wipe the server?

    If it's just about a particular player, why don't you just set his group manually by typing setplayergroup playername groupname into console (of course you have to replace "playername" with the playername and "groupname" with the name of the group/permission, the player also has to be online)? Alternatively you can edit the player table in the world database manually by typing the group name into the "Group" column.

    I see a place in the Server properties to put in a group name for new players? But when I put in a group name it does not automatically add a new player to that group. Maybe this still can not be done?

    Actually that's indeed the way how this could be achieved. You have to put the name of the desired group into the settings_default_newplayer_group field in the server.properties file. Remember to put the filename there (without the ending), i.e. if your permission file is called "awesomegroup.permissions", you have to put "awesomegroup" there.
    Note that this only works for new players, i.e. for players who never joined the server in the past.


    Alternatively you could edit the default.permissions file of course, as @Miwarre suggested, but keep in mind that this affects all group permissions then (all permissions are based on the default.permissions file).


    Having a cronjob which updates the world database (as mentioned by @yahgiggle) is definitely the "crème de la crème", but also the most complicated solution in this case.
    Achieving something like this will be easier once the new API is ready, since it provides access to the world database, but also allows changing the player group directly :)

    Is this supposed to be already implemented and/or does it require full network access from outside?

    It's already implemented, but it does indeed require access from outside. If the http port is not reachable, the hive can't get any stats from the server (so it does not assign a UUID to the server, and as a result, no server_key file will be created).

    Yes, it's as @yahgiggle said, there is a "server_key" file in the server directory which contains a unique UUID. When moving the server to another machine, make sure to move the "server_key" file as well, then there should be no stats loss (if there is no "server_key" file in the server directory, the server requests a new UUID and creates a new server_key accordingly - of course in this case there would be no more reference to previous stats) ;)