Announcement Pre-Version of the new Plugin API

We've posted an important announcement regarding the current situation and the future of the game: Announcement

  • Pre-Version of the new Plugin API

    Hi folks!

    A preview version of the new Plugin API is now available. You can get an impression on what is possible with the API, and you can also start working on your first plugins.
    You find a new section in the forum now, which is dedicated to the Plugin API. You can ask questions or discuss any API related things there, or request new features in the Feature Requests section.

    In contrary to the Lua API, a documentation (JavaDoc, which also contains some examples) is also available. In can be downloaded with the Plugin API (you can load it in your IDE and access it while coding), or alternatively you can watch the online version here: javadoc.rising-world.net/

    Unfortunately you can't add the plugins to your server yet. The servers will be updated within the next weeks, you can take advantage of the time to get used to the new API, or to prepare your plugins. Once the servers have been updated, the old Lua API will still be supported for ~ 4-8 weeks until it will be removed.

    Please note that a few events and functions are still missing, they will be added soon. If there is something wrong with the new API, or you have any questions or suggestions, feel free to leave your feedback :)

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

    Getting started: Getting started
    First steps: Create a Plugin
  • Just had a look at the docs. Looks VERY promising with a lot of useful additions. THANKS!

    Assuming the events present in the old LUA framework and currently absent in this preliminary version will be added (for instance, placing/removing/destroying of anything other than blocks), the only area remaining somehow grey is custom 3D models.

    There are functions to load a 3D model from disk, which return a ModelInformation object, but no obvious way to place the model itself in the world: did I overlook something?

    Question: if I am not mistaken, it seems the current concept of a script-relative database no longer exists. Does this means that all script-dependent data will reside in the world database? There are possibly reasons for this (efficiency? connection pooling?) but some care should be taken to avoid table name clashing: many scripts use a table equally named, for instance, "players"?
    __________
    My plug-ins: Planks 'n Beams, GPS, UPS, Weather control, Plugin Central, RWGui (GUI back-end), Bank (Money back end)
  • Awesome questions @Miwarre

    May i ask/suggest to anyone this be added to the Plugin-Api section just incase somebody is asking the the same question then its easy to point in that direction along with other possible questions.
    dang it, i got butterflies in my tummy from this pre-version alone.
    Serenity Server - For people that play RW on a daily basis
    S.E.R.E.N.I.T.Y .. .. S.E.R.V.E.R - AN ECONOMIC JOURNEY IN A CUSTOM LANDSCAPE :rolleyes:
  • Miwarre wrote:

    Assuming the events present in the old LUA framework and currently absent in this preliminary version will be added
    Yes, exactly, those events will be added very soon :)

    Miwarre wrote:

    There are functions to load a 3D model from disk, which return a ModelInformation object, but no obvious way to place the model itself in the world: did I overlook something?
    The ModelInformation object is basically just the reference to the 3D model. The class to create a model in the world is the World3DModel (just like 3D texts etc), you can assign the ModelInformation to it by calling the setModel(ModelInformation) method. Unfortuntely there is a small mistake in the current API: All world elements are just interfaces, that's not intended, they will be converted to classes (so you can create a new instance directly)... this will be changed shortly!
    After the change it will probably look like (maybe it will look a little bit different):

    Java Source Code

    1. //This is only "meta data"
    2. ModelInformation modelinfo = new ModelInformation("C:/Plugin/testmodel.obj");
    3. //Actual world element
    4. World3DModel model = new World3DModel(modelinfo);
    5. model.setScale(2f); //resize for example
    6. model.setPosition(150f, 42f, 365.25f); //set to position 150|42|365.25
    7. //Attach to player
    8. Player player = Plugin.getServer().getPlayer("Miwarre");
    9. player.addWorldElement(model);
    Display All

    Miwarre wrote:

    Question: if I am not mistaken, it seems the current concept of a script-relative database no longer exists
    Oh, that's also something that will be added soon ;)

    Miwarre wrote:

    A way to issue a console command from a script
    That could be added. Maybe create a new topic about that in the plugin section, so this suggestion does not get lost :D

    Miwarre wrote:

    The use case is to support commands like setplayergroup which are not possible (yet?) via the regular framework
    If it's explicitly about changing the playergroup, that can be done this way:

    Java Source Code

    1. Player player = Plugin.getServer().getPlayer("Miwarre");
    2. player.setPermissionGroup("moderator");
  • Thanks for the reply! I imagined I was overlooking some detail, a lot of docs to wade through (which is fine, VERY FINE!).

    red51 wrote:

    The ModelInformation object is basically just the reference to the 3D model. The class to create a model in the world is the World3DModel (just like 3D texts etc), you can assign the ModelInformation to it by calling the setModel(ModelInformation) method.[...]
    Damn! I didn't scroll down to 'W'! :whistling:

    red51 wrote:

    Miwarre wrote:

    A way to issue a console command from a script
    That could be added. Maybe create a new topic about that in the plugin section, so this suggestion does not get lost

    I'll do it; I didn't want to pollute the forum with duplicate posts.

    red51 wrote:

    If it's explicitly about changing the playergroup, that can be done this way:

    Java Source Code

    1. Player player = Plugin.getServer().getPlayer("Miwarre");
    2. player.setPermissionGroup("moderator");
    Another detail I overlooked! Thanks!
    __________
    My plug-ins: Planks 'n Beams, GPS, UPS, Weather control, Plugin Central, RWGui (GUI back-end), Bank (Money back end)
  • zfoxfire wrote:

    Arcane,

    What exactly are you wanting to try? I'm working on getting an old 3d model imported. I want to tinker around with compass stuff next.
    In the game Minecraft there's a mod to tweak biomes it's called Biomes O' Plenty. There's a tree called a Sakura and I would like to add it to Rising World as a very tiny mod to help me get started on understanding on how to write mods or in this case we call them plug-ins. I would add the tree, saplings for it and it's own variants to the block bench. @red51 said this stuff would only be static. Even so it would be nice to add a new tree to the plains.
  • ArcaneDesmond wrote:

    zfoxfire wrote:

    Arcane,

    What exactly are you wanting to try? I'm working on getting an old 3d model imported. I want to tinker around with compass stuff next.
    In the game Minecraft there's a mod to tweak biomes it's called Biomes O' Plenty. There's a tree called a Sakura and I would like to add it to Rising World as a very tiny mod to help me get started on understanding on how to write mods or in this case we call them plug-ins. I would add the tree, saplings for it and it's own variants to the block bench. @red51 said this stuff would only be static. Even so it would be nice to add a new tree to the plains.
    Hmmm... I know you can add custom models. I'm working on the same right now. However, I do not know if you can register a custom Inventory item (only in-game items are available without hacking) or modify crafting bench items. I'll study the API a bit more but it looks like the API already supports some functions for chat messaging so it might be possible to create a function linked to a chat window command (still not positive. i'll study more when I am home) . Meanwhile, Can you aquire some models of such a tree? there are lots of 3d modeling students out there sharing their work on the internet. shouldn't be too hard to come up with something.
  • ArcaneDesmond wrote:

    In the game Minecraft there's a mod to tweak biomes it's called Biomes O' Plenty. There's a tree called a Sakura and I would like to add it to Rising World ...
    "Sakura" is just Japanese for "cherry" and there is already a cherry tree in RW...
    __________
    My plug-ins: Planks 'n Beams, GPS, UPS, Weather control, Plugin Central, RWGui (GUI back-end), Bank (Money back end)