New Functionality Planning

  • Is there an event triggered when opening doors and chests? I am wondering if we can assign owners to objects through lua, kind of like in the AreaProtection. Only owners and whoever they invite will be able to open the doors and chests made by the owners. Or maybe a PIN system like in some similar games.


    Yes and no. At least there is an event for opening doors, but no way to identify the door which has been opened (no ID or something like that). We put it on our list and implement a proper way to do that soon ;)

  • I am realizing now why Rust Oxide was written as a plugin manager. If I want to make things happen during different events, I don't believe I can declare those events in Lua in several Lua scripts. They just won't work as expected. For example, if I declare a onPlayerConnect event in one Lua script, I cannot declare it in another Lua script. I have to figure out a way to modularize these Lua modules so that you could add multiple actions to the same events while keeping the scripts decoupled (so they don't know about each other). This may require a modification to LuaJ. Interesting.

  • I just added MOTD to my server, however, when I create a label and put the message on the top right of my screen, it shows up perfectly, but when players with lower resolutions log in, it gets cut off. Is there a way to detect their resolution and position the label based on resolution?

  • Positions should be relative size. Perhaps it helps to change the pivot position, currently the pivot of the label is bottom left by default. When placing it on the top right of the screen, you should set the labels pivot to top right. Use
    [lua]label:setPivot(3);
    -- Pivot positions:
    -- 0 == bottom left
    -- 1 == bottom right
    -- 2 == top left
    -- 3 == top right
    -- 4 == center[/lua]

  • I learned how to add Lua functions to the LuaJ API today, and it turns out the devs would have had to modify the luaj API, so I can't just download it from the LuaJ project and rebuild. I will have to decompile the one in the game and extend it and maintain it with game updates for new functions that I add to it. Not a big deal really. Adding functionality to Lua is super easy.

  • It depends on what it does. If it is strictly using lua functions, with no interface into the game (which would be pretty useless), then maybe. However, if you want to access game objects, the scripts have to be written specifically for this game.

  • Hello ;D


    I am total lua noob, so my question can I use any lua script, what I found in internet ?


    Not really. Lua scripts are for specific things. So, a script will, for the most part, need to be made for Rising World. There may well be some exceptions.

  • Scripts will do whatever the devs have added to the Luaj API. They are writing a wiki at this moment. So far, you can get and set a lot of information on player objects, events, terrain, etc. At the moment, it's pretty much all event driven. So, for example, if a player hits a block, you can then access the player that hit it, and the block that was hit. Unfortunately, according to Red51, things like doors can't be tracked currently, so you can't add locks to them, etc.

  • After viewing some of the source, the Lua functionality is making a lot more sense to me (game events, LuaDatabase, etc). For example, it is possible to redesign the entire LuaDatabase and its functionality, but doing so would be considered a mod to the game. I know that based on Red51's post to me, they seem to encourage modding, but I am not sure about posting source examples here because it could invite malicious intent, like piracy via decompilation. Until they let me know that it is okay to post decompiled source, I just won't do it.


    Either way, I'm going to have some real fun this next week scripting and modding. Starting tomorrow afternoon, I will be off of work until December 29th, broke and nothing better to do. :D

  • I have decided that instead of allowing a player to manually draw an area to protect, I will treat it like other games as a land claim. The following functions are modifications of the areaProtection script. I have created a separate landClaim script. The lands claim size and land claim buffer is configurable by the server admin. The land claim size is xyz and the land claim buffer is the amount of space required between each claim. For now this is set to 1 block just to keep the claims spaced apart to avoid overlap bugs. At the moment, until this script becomes more sophisticated, the player will stand at the center of the proposed claim and attempt /createclaim [claimName]. If they are overlapping someone's claim, they will be prompted to move and retry. In the future, there will be some sort of drawn selector like in the areaprotection script.


    /createclaim [claimName]. The function will check to see if the player has exceeded the max number of allowed claims. Then it will ensure the claim won't overlap another claim. If everything is fine, the claim is created.


    /removeclaim [claimName]. This function will remove the player's claim.


    /showclaims. The function will highlight all of the player's claims (only the claims owned by the player).
    /hideclaims. The function will remove highlighting of all of the player's claims (only the claims owned by the player).


    /addclaimfriend [playerName] and /rmclaimfriend [playerClaim]. These functions will add and remove friends from claims. Added friends will be able to visit the claim but not build or manipulate terrain.


    /giverights [claimName] [group] [playerName]. This function will give the player the rights of a rights group for the area name given.


    /rmrights [claimName] [group] [playerName]. This function will remove the given player from the rights group for the area name given.


    If rights to modify the land are given, the player is also automatically added to the guest rights group if the player doesn't already have those rights.


    So far I am as far as recording the claim bounds in the database. Now I am working on confirming that the coordinates are correct. Once that is done I can work on the rights and player kickFromArea functions, etc.

  • Well I admit that I have been slacking a bit. Some stuff came up and I kinda put this on the back burner, and then I got too into a game I like. :/ I am going to work on this some more today. The decompile helps a heck of a lot. There aren't any comments in the decompile, but the code is fairly easy to figure out, even with the obfuscation. My biggest hangup is knowing when to convert to world coordinates. I take the players position and run it through the same functions to get the world coordinate, like the original areaprotection script, record the position, but then when I highlight it, it is nowhere to be found. I did get the label to appear showing that I was standing in the area though. So there is a bit to figure out today. I think it will be one of those moments where it slams me in the face like a Mack truck and I say "AH HA!" Just waiting for that moment. lol!

Participate now!

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