Posts by LordFoobar

A new update is now available, introducing a lot of new content!
Latest hotfix: 0.7.5.2 (2024-09-10)


    (french)
    hahah! Le temps me manque... et sans World-Edit (je n'y ait pas accès sur ton serveur :whistling: ) je suis très limité. Mais j'ai l'intention d'e m'y remettre! Dans tous les cas, merci de l'info! Pour World-Edit, il y aura quelques ajustements mineurs dans la prochaine version, question de ne pas bloquer le serveur... parce qu'il n'y a pas de restrictions sur le nombre de plante et le serveur bloque pendant l'exécution de la commande. Donc, y'a un potentiel de dommage et ça va être réglé en fin de semaine. Il y aura aussi une autre commande pour créer une ligne de plantes dans la direction du joueur (non seulement x et z). D'autant plus que x et z n'est pas vraiment intuitif et on pourrait changer ça pour ns (north-south) et ew (east-west) qui nécessiterait qu'une boussole.


    (english)
    [...] There are some adjustments that need to be made on the plant command, so it does not freeze the server too long... because there are no restriction on the amount of plants that the command can process at once and this can cause the server to freeze during execution. So, there's a potential to cause damage et this should be resolved this weekend. There should also be a command to create a line going in the angle facing the player (so, not limited to x and z). Furthermore, x and z are not intuitive and may be replaced by ns (north-south) and ew (east-west) which only require a compass.



    Sorry, my german is practically non existent and I don't dare messing it up with Google Translate... Someone can tell @hkurzawa that he can get the Chrome extension to perform live translation on english test? It might help. With the extension, just select the text to translate, then click on the "Google Translate" icon in Chrome's toolbar. This is what I use and it's good enough for me to understand what's posted in German :)

    nice work LordFoobar now we need 3d text added i wont use this but i feel some players will want it


    Thanks!


    3D text and world editing?? lol whoever wants it will implement it. There are a few features that are far more important just now. I'd need to have some use case of 3d text usage... right now, the only use I can think of is some sort of showing area names (i.e. area protection), or if anyone wants to create some type of mini-game of some sort...

    Hmm.. I was wondering about this, since the getTerrainData() function should work properly. But I found the issue in this case, "ChunkUtils:getChunkAndBlockPosition()" does not return the expected block position: The x, y and z values of the blockposition have an offset of two (it has technical reasons, since we use this function internally too). I already changed this (the fix will be available with the next update). In the meantime, you could subtract the value "2" from the blockposition as a workaround, like this:
    [lua]local terrainId = world:getTerrainData(chunkPos.x, chunkPos.y, chunkPos.z, blockPos.x - 2, blockPos.y - 2, blockPos.z - 2);[/lua]


    I was wondering why the - 2 as I have seen this at a few places already.


    Cheers!

    I can't wrap my head around this and trying to understand why I can't make it work is nothing but time consuming.


    This is what I try



    The value printed is always 0.

    Just a point to note, "/we clear abs" is pretty much the same as "/we clear all" then "/we fill air". You can see it here, where "fillTerrain(e, 0);" is called if the "clearAll" argument is true (see the command implementation).


    Also, for big areas, the games puts a limit of 127x127 blocks. So, regardless on the selected area, only 127x127 (I don't remember how many block high, but I think it's 64...) blocks will be cleared from the starting x,y,z coordinate of your selection. This limit is to avoid 1) accidental clear, like it happened on one server, because 2) clearing very large area could potentially crash the server and corrupt the world.

    I added this to my Server by GIT - but everytime it shows "Unknown Command" - I'm Admin at the Server.
    Maybe in case of MySQL usage for the mainsystem?


    It should not matter what db engine you are using. The commands have changed since 1.x and are using the same pattern as the "World Edit" script; all command start with /area. If /area help does not work, then the script failed while loading the world. However it should help if you can tell me if you see any error in your debug console.


    I know my last update was about two months ago, but I'm in a middle of another big project and have little time to complete the script just yet. (The only time being at night, when I'm already tired of my long day.) The basics are supposed to work, but it's hardly a finished script (i.e. it is unstable and incomplete). Also, debugging problems with AreaProtection is somewhat long and tedious as the game does not have proper debugging tools yet. But it is not abandoned and will be completed soon enough.


    Bottom line is, and yet again, this is not production ready. Meaning that you should not install this script on a public server just yet.

    Thanks!


    I also thought that the collision might occur right before the specific location (i.e. to place lights, etc.) so I tried changing the line 3 of the first source code provided like so


    Code
    local worldData = getWorldData(event.player:getPosition():add(event.player:getViewDirection():mult(raycastResult.distance + 0.2)));


    to make the actual hit test a little further, but no real change. I did get a correct result at a very specific location, but I'm not sure why. Since I need to restart the game every time I change a little thing, this debugging is too time consuming for me at the moment.


    Having a debugging console (writing commands into the Lua console) would be quite useful :)

    Playing around with the API, I have this bit of code :



    (Don't mind the commented lines.)


    And here is getWorldData



    (Again, don't mind other pieces of the code, suffices to say that getBlockTypeAndId returns the absolute block id into a type and texture id, etc.)


    However, I always get Terrain=0 and Block=block 0. So, is the hit position represented by raycastResult.collisionPoint a position before hitting something, or am I missing something? How do I get the block position where the collision occurs?

    You can't do key bindings at the moment.


    My guess is that this will get implemented when scripts will be able to register themselves to the game's configuration interfaces. Until then, this is just not really possible without creating a lot of issues. One of these issues would be keyboard layout; where a key does not appear physically at the same place on a keyboard depending on country and/or locale. Not every one have a US keyboard :) (mine is CA-fr)


    Well, yes, you are missing the dependencies. Read the installation steps again. Pay attention to the file tree structure further down. If you know Git, cloning is by far the easiest option. There will be easier ways to install scripts later.

    As a player you never know if you play on a server with a "good" server admin. But if they use this script you are able to save your work as a file. If then something happens you could maybe could upload your file on another server then asking a admin there to enable it and all is fine. If you think it into the future you could even say "Hey, this is my blueprint, place it here..." and then you can start gathering ressources and it will be build if you collected all stuff.


    All scripts are executed on the server, not the client. Which means that you even if you save your construction to file, that will will be on the remote server, and not on your computer. This also applies to "importing" some data; you cannot import data from your computer; imported data are loaded from the remote server's hard drive. Would it be any other way, this would be a terrible... terrible backdoor. The only option, as I said, is if serialized constructions are uploaded and saved on a central, public, repository. But, then again, I would strongly advise making this feature yet, as there are security concerns that needs to be addressed first. The golden rule is simple, never trust anything that you download from the Internet, unless you have reasonable reasons to believe it is safe; nothing is 100% safe. And this is no paranoia, this is by experience and by professional wisdom :)