Posts by LordFoobar

A new update is now available, introducing fishing, climbing gear, clothes and more!
Latest hotfix: 0.8.5.3 (2025-05-09)

    Wie wäre es mit einem Skipt das die Backups automatisch macht


    Besides, backups are too environment specific to be ran by a general script... Not mentioning how limited Lua is. There are already a myriad of solutions available already, too. :)

    While adding new features to World Edit (i.e. copy / paste) I'm trying to find the best and most optimal way to set data in the world. The three methods that currently exist are

    • setTerrainDataInArea(int startChunkX, int startChunkY, int startChunkZ, byte startBlockX, byte startBlockY, byte startBlockZ, int endChunkZ, int endChunkY, int endChunkZ, byte endBlockX, byte endBlockY, byte endBlockZ, int terrainId)
    • setBlockDataInArea(int startChunkX, int startChunkY, int startChunkZ, byte startBlockX, byte startBlockY, byte startBlockZ, int endChunkZ, int endChunkY, int endChunkZ, byte endBlockX, byte endBlockY, byte endBlockZ, int blockId)
    • placeBlock(int chunkX, int chunkY, int chunkZ, int blockX, int blockY, int blockZ, int blockId)

    Each of these methods take only a single block or terrain type, set it then broadcast. Well, usually, players will copy and paste more complexe terrain and block organisation and will require some more fine-grained terrain and block manipulations. Calling any of these methods repeatedly (and each time broadcasting) is note quite desirable and will saturate the server.


    A solution would be to create modification objects, and then apply and broadcast all modifications all at once.


    I'm thinking, something like :


    Since there has not been any replies to this, I'll update with yet another amendment :P


    It would be very... very useful to dynamically restrict the size of the selected area. For example :

    • Restrict selecting inside a predefined area
    • Restrict selecting outside a predefined area
    • Fixed width/height/depth (i.e. static selection that the player can only "move" around)
    • Fixed min/max selection (ex: prevent having a 100km² selection, then clearing the whole thing from absolutely everything... which is bad)

    Do not assume that, because a player is an admin, that it will not try to do something stupid and/or dumb :)

    @LordFoobar: Currently those functions only read out a single block/terrain value. The first three parameters are the chunkposition (xyz), the last three parameters the blockposition (xyz) within this chunk ;) All these values are integers. e.g.:
    [lua]local blockval = world:getBlockData(-10, 2, 5, 16, 32, 8); -- returns the block data in chunk -10, 2, 5 at position 16, 32, 8[/lua]


    I was confused as some methods use byte for block positions :) but it's all good. With try and errors (and a little bit of .class peeking ;) ) you're confirming my final conclusion. Cheers!

    Woa! Didn't expect those Lua functions so soon. Nice!



    **Edit**


    What are the arguments for these new Lua functions? More precisely, the world's 'getBlockData()' and 'getTerrainData()' ? They are different from their setter counterparts :


    Code
    world:setBlockDataInArea(int paramInt1, int paramInt2, int paramInt3, byte paramByte1, byte paramByte2, byte paramByte3, int paramInt4, int paramInt5, int paramInt6, byte paramByte4, byte paramByte5, byte paramByte6, int paramInt7)
    world:getBlockData(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)


    My first guess is that the setter takes some arguments such as the values returned the selection marker. While the getter uses some absolute 3d coordinates. Am I right?

    i downloaded the script but i do not know what to do now; my game is on steam and i do not have a rising world folder in my computer. after i extract the file what do i do?


    I was letting someone else answer this. I don't play on steam. I have the stand alone version of the game. Plus, I'm on Linux and I doubt I can be of assistance to you. However, I think I have seen some post on the forum talking about using the game on steam, somewhere...

    I do hope that when Red does add in a computer that it would be a multi-tasking object. I would be amused if Red made his own OS so you could look through images, your own videos, and music streaming from both the computer and the way 'Euro Truck Simulator 2' gives you a playlist to choose from.


    Like Foobar mentioned....having a headset object, and a portable device, would be interesting for when you don't want to sit next to a radio, tv, computer object, or similar. This could happily 1-up Minecraft, GTA, and even Euro Truck Simulator 2. You don't really have to worry about copyright because it's all on your computer and the internet. What you hear stays in your world, or a server itself. If it finds itself on Livestream then that would just mute itself.


    Ya, I can't wait for when music is added in through vanilla coding or modded coding.


    I was being sarcastic... ... you know that... right? 8|

    what about a central database where we could opt in if the user gets banned say more than 3 times on any sever he then becomes banned on all servers with this option


    Such feature should be done from the third party central server; the ban instruction would only be uploaded by the script, and any logic (perm ban, temp ban, etc.) should be applied then, not by the script itself.


    For example :


    SS-1 (Server Script-1): ban user "BobTheGriefer"
    GBS (Global Ban Server): ok, user "BotTheGriefer" banned for 1 hour
    ... (~15 minutes later)
    SS-2 (Server Script-2): unban user "BobTheGriefer"
    GBS: error, user "BobTheGriefer" was banned by "CoolDude" on SS-1; 43 minutes left
    ... (~45 minutes later)
    SS-2: ban user "BobTheGriefer"
    GBS: ok, user "BobTheGriefer" banned for 12 hours
    ... (some times later)
    SS-1: ban user "BobTheGriefer"
    GBS: ok, user "BobTheGriefer" banned permanently
    ... (some times later)
    SS-1: unban user "BobTheGriefer"
    GBS: error, user "BobTheGriefer" was banned by "CoolDude" on SS-1; permban after 3 bans. Submit unban requests directly to [Rising World forum].


    (Note: trying to ban an already banned user would yield "error, user X already banned by Y on S; n minutes left")


    Undoing a permanent ban would be done manually from a secured Web interface to the GBS database.

    Adds something like a pot belly stove that burns firewood as fuel. {snip}


    Except from torches (big and wall mounted, etc.), fireplaces and furnace should, indeed, require wood to have fire. This would create ambiance in the game. For example, you are approaching a house in the middle of the forest and all is pitch black... with eventually murderous creatures or other dangers... you go in and use some wood to light up the fireplace and finally have some light (why not warmth as well? The cold could cause some side effects, like slowing you down...). Or, another example, you're again in the middle of the forest at night and you see lights inside a cabin... ...


    You could even extinguish the fire and light it up again later on, and other players could potentially steal your firewood from the fireplace :)


    Bottom line, great suggestion!

    A little update on the script. Still a lot to do! But it should be more functional, now. For questions, and suggestions, I suggest creating issues directly on Github. For general chat and other discussions, this thread is the place for that!


    ... and a reminder that... THIS IS NOT READY FOR GENERAL PUBLIC USE!!!! This is for testing purposes until mentioned otherwise :)


    Thank you @yahgiggle for your time at testing this

    Another update was made on the script. All terrain textures are now available via the /we fill command. Also, long help lines are now wrapped!


    The README was updated! Those who do not install using Git (aka manual install) should not forget to add the string-ext sub-module also!


    Some tools are coming to make everyone's life easier installing and updating scripts :) I don't know when, but the idea is brewing....

    The projects on Git are moving well! I have added a "Translators" team for anyone who'd like to add localizations to the current localized projects (area-protection--in dev--and world-edit as of today). No need to clone the scripts to be part of the team, as you'd have write access to the organization's repositories. Also, all issues should be reported on Github, preferably, to keep logs of corrections and new implementations. (Note : an "issue" can be a feature, a bug, a suggestion, etc.) As well, you will receive updates on your issue as it is updated and/or resolved.


    Any other question can be addressed directly to me via private message.


    Thank you for your contributions and collaboration!

    I think that everything should be original to begin with (on the finished game) so you have the radio object, as suggested, and the guys have created hundreds of original tracks and several radio stations, perhaps categorized by genre, for example they could have a station called dr.danceduck, and they could specialize purely in dance music.
    I strongly hope that the computer object will be a powerful customization hub, and allow you to add your music into the game. haa! Just my 2 cents, so to speak. hee hee!


    ... and I hope they create a virtual reality headset object that you can use with that computer object... 8o

    I don't know about that... personally, I would not use that feature. If I want to play music, I fire up my Rhytmbox (Linux) and just use keyboard shortcuts to control the music as I play. Since almost everyone play music differently, I don't think it would be wise to add this feature in-game.


    Or perhaps if someday there's a "Radio" object... but this needs other considerations (i.e. copyrights, DRM, audio codec, bandwidth, etc.)


    Sorry to burst that bubble :)

    Alright, that's what I guessed. So... if I understand this, LuaPlayer strictly returns an online player, currently connected to the server, while LuaPlayerInformation returns something only if the player has connected to the server at some point (online or not), am I right?

    No, just invoking Lua statements. For example, in World Edit, there's a function called getBlockId; being able to invoke that function directly from the console would return the value, thus help debugging and test. Or, in some script, if there's a global variable that should be set to a specific value, instead of trying to recreate the condition for that variable to be set properly, just invoke the console and set the variable manually. As simple as that.


    Or, for example, I'd like to evaluate the content of a player's attribute, live, while the server is running. I could simple test it in-line from the console. From a terminal, the Lua console can already be invoked, but there's a difference between that console and the game's. For instance, from a native Lua console, there's no include(), there's no getDatabase(), there's no getServer(), etc.


    Some typical use could look like this :


    Code
    $ telnet -l "AreaProtection 1.7" 127.0.0.1 23
    Rising World Lua Console Started
    Binding to "AreaProtection 1.7"
    > return server:findPlayerByName("LordFoobar");
    nil
    > = #areas
    47
    > ^C
    Connection terminated
    $


    Using the login name as the script to bind to (same name as in the definition.xml file). Using CTRL+C to quit.

    In AreaProtection, players are saved using player:getDBID(). This value matches the ID field in the table Player of the world's database. However, performing server:findPlayerByID(playerId) (where playerId is the saved value) does not return anything; nil. Is this because the player is not connected, therefore the method returns nothing? Shouldn't that method fetch the user in the World's DB instead if the player is not connected? What's the alternative, then?

    Once a server is running (or perhaps in single game, on localhost), it would be nice to be able to send some Lua commands via simple socket connection and get the execution result. The commands would execute in the currently running server Lua context. This would greatly help debugging. Naturally, this socket would listen for incoming connections on the LAN interface only! Such implementation could be done using a Telnet interface (using PuTTy for client in Windows); the telnet interface would litterally work as a direct console to the server's Lua container; to be able to manipulate data while the server is running.


    This interface would, of course, only be enabled through the server.properties file, using a configuration keys such as lua_console_enabled=true, lua_console_port=23, etc.

    If this applies ton only blocks, yes, it would be possible... but it would destroy ALL blocks in the specified area. It would not be possible to preserve any other previous blocks. It would be interesting to implement this once it is possible to copy / paste entire regions at some point.