Posts by red51

    Unfortunately this isn't possible :/ UI Toolkit does not expose the z order and provides no way to change it. Even though Unity added this feature to their roadmap 3 years ago, it's still not available yet...


    Right now the Z order depends on the order when these elements were created (and parents are always drawn behind their childs). There is no workaround for that...


    The problem is that I want to interlace with existing HUD elements, so I can't add them as a child to those. Maybe I could somehow grab them... 🤔

    Does that mean you want to change the parent of a vanilla HUD element?

    Basically it's important to either re-use existing connections (e.g. create a connection once, store it in a variable and re-use that connection), or alternatively close the connection once it's no longer needed. Everytime "getSQLiteConnection()" is called, a new connection is created. Same about "getMySQLConnection()".

    Only exception is the world database (this reuses the same connection automatically and doesn't need to be closed manually).


    If you re-use a single connection, it's important to close statements and ResultSets. This is a typical pitfall. For example, when calling executeQuery() (which returns a ResultSet), make sure to close the ResultSet once you're done with the query (i.e. almost always a few lines after your query). The easiest and safest way to do that is to use a try-with-resources block (it closes the ResultSet automatically, even if an exception occurs), e.g. like this:

    Java: Try-with-resources block (good code)
    try (ResultSet result = db.executeQuery("SELECT * FROM `MyTable`")) {
    while (result.next()) {
    //do something
    }
    }


    It's not recommendable to do it this way, for example:

    Java: Bad code
    ResultSet result = db.executeQuery("SELECT * FROM `MyTable`");
    while (result.next()) {
    //do something
    }
    result.close();


    The reason is that if an exception occurs between line 2 and 4, the result will never be closed (because an exception interrupts code execution, so line 5 will never be executed).

    You can "fix" this by using a try-finally block, but it's ugly and more verbose than the try-with-resources block at the very top:

    Java: Verbose code - it's better to use try-with-resources instead, as above
    ResultSet result = null;
    try {
    result = db.executeQuery("SELECT * FROM `MyTable`");
    while (result.next()) {
    //do something
    }
    }
    finally {
    if (result != null) result.close();
    }


    You don't have to close ResultSets if you either close the connection, or alternatively use getConnection() and create statements manually (and close them accordingly - because closing the statement will automatically close related ResultSets). But even in these cases it's still better to just always use try-with-resources blocks when working with ResultSets ;)

    Thanks a lot for your feedback! :) Sorry that I've missed your post on Steam... IDK why this happened :wat:


    1. The waterskin recipe still requires cloth to craft. Now that we have leather, I believe that resource should be the one to go. Maybe the devs forgot to update this recipe.

    Yeah, this was indeed an oversight, but we will change it with the next update ;)


    2. Also about recipes: The repeater rifle still requires gunpowder to craft. I am awared that it has been added as a requirement to craft the weapon as a "placeholder" for its amunition, which was unavailable before this patch. Bit now that bullets are a thing, my guess is that it is not required anymore. Once again, maybe the JIW Games team skipped this one too.

    Currently the rifle comes with 5 bullets by default, but probably it's better to remove the gunpowder requirement ^^ We'll change that with the next update, too.


    3. A great addition this update brought us is listing the food/water/health values of consumable items, a feature never done in Java Version. Also, bringing back the visible status values of clothes. This all is very helpful for sure! However, there is one point missing: The values of weapons, like damage, attack speed, etc... This was huge flaw of the old version (we had to check the forums for this), so if you could add this one feature as well, the gameplay would greatly improve.

    Unfortunately the game cannot get the attack speed from the database (because it solely depends on the animations), that's why no DPS is exposed yet... adding this is still on our to-do list and probably will be available with one of the next updates. But maybe we could at least expose the "damage per hit" in the meantime until more information are available ;)


    4. Speaking of status, it would also be a huge quality of life improvement if the game allowed us to see the status of wearables, weapons and food items at the crating screen, before we craft/cook them. This way, we would be able to know if they are worth making without being forced to waste resources for this, or doing unnecessary web search.

    Good point! I'll put this on our to-do list ;)


    5. The animal are too powerful! My character was hearing the leather outfit and the medieval mining helmet. It all gave a combined armour value of 50 points. And even so, after engaging rams or goats, they reduce the health bar to nearly half in 3 headbutts! And they are not even the "true" beasts! So, I believe this point of gameplay could use some revision. Or the devs could add a combat difficult setting to make things easier for those that so desire.

    Yes, animals are indeed too strong... we will reduce the damage with the next update, but probably we'll also add a "hit damage factor" setting (but only available through the config file for now).


    6. Another animal threat point: Bears on the grass fields. Of all the additions and tweaks this patch brought us, this is the only one I consider a bad move. I mean, those biomes are supposed to be a "safe haven" for our character to do the very early game progression, like basic weapons and tools, so why make the most power animal of the temperate islands spawn there?! I understand that maybe the dev team don't want to make that territory too peaceful and boring, so there is some theat. But at least make it be boars or wolves, when they become a thing, not effing bears! This is so unfair... And before you mention it: I understand that these animals may inhabit such biomes in real life, but this is a game, not a wildlife simulation, so a good gameplay comes first.

    This was mentioned a few times, so maybe it's better if we remove bears for now from the grass field ^^


    7. And one last point on animal aggression: I am not sure, but it seem that killing an animal with a headshot don't aggravate the rest of the herd. They react if the attack is not lethal, but seem to ignore the death of their "mate" if it is. Probably there is a bug here. Note that this only affects defensive animals, the passive ones still run away on headshoted herd members.

    Defensive animals currently ignore if you attack one of their mates... previously they already got angry if one of their mates just got the "alert" state (which was already triggered by a gunshot or when cutting down a tree, for example), but players were confused by this behaviour. So right now they just ignore it.

    But some changes to this handling are still on our to-do list :)

    Oh, du startest dort leider die alte Java Version, der Server ist (lt. Log) allerdings bereits der für die neue Version... wenn du die neue Version spielen möchtest, musst du diese im Beta-Branch auf Steam auswählen und anschließend über den Steam-Client starten - dann erscheint eine Auswahl, wo du "New Version" auswählen musst um die neue Version zu starten :) Hier sind ansonsten noch ein paar Infos dazu: https://forum.rising-world.net/thread/11060


    Du kannst auch anhand der Versionsnummer (unten links im Hauptmenü) prüfen, ob die Java Version oder die neue Version läuft: Wenn es 0.7.0.3 ist, handelt es sich um die neue Version.

    Tut mir Leid zu hören, dass es Probleme mit dem Server gibt :/ Ist der Server denn generell nicht erreichbar (wenn man direkt über IP verbinden möchte), oder taucht er "nur" in der Liste nicht auf?


    Bei mir ist der Server allerdings in der Serverliste sichtbar :thinking: Auch über den Browser kann er abgefragt werden: http://77.116.246.46:26014/

    Ich kann scheinbar auch connecten, also soweit scheint da eigentlich alles zu stimmen. Auch obiger Log sieht korrekt aus.


    Nach dem Serverstart kann es aber bis zu 1 Minute dauern, bis der Server in der Liste auftaucht. Manchmal gibts auch Probleme mit den Steam-Servern, wodurch der Steam Masterserver manchmal nicht erreichbar ist (und neue Server dadurch auch nicht auftauchen).

    Yes, wildcards work in combination with a LIKE operator when working with the world database. Make sure to put apostrophes (') around the name (single quotes represent SQL strings), i.e. one on the left, one on the right. For example, if you have a player name "angriff" and want to find all npcs which are called "angriff" followed by 2 digits or letters (e.g. "angriff01", "angriff42", "angriffXY" etc), the SQL statement would look like SELECT COUNT(*) AS count FROM npcs WHERE name LIKE 'angriff__';. Since your player name is a variable, you have to use string concatenation. The code could look like this:



    Please bear in mind that the _ wildcard character represents one character, while % represents zero, one or more characters. So looking for "angriff__" (with 2 underlines) will find "angriff01", "angriff42" etc, but not "angriff1", for example.

    There is unfortunately a bug when accessing a ResultSet via index... in JDBC, the leftmost column in the ResultSet begins at 1. So in an SQLite or MySQL database created through the Plugin API, you could access the count like that:


    Java
    try (ResultSet result = db.executeQuery("SELECT COUNT(*) FROM `mytable`;")) {
    if (result.next()) {
    System.out.println("Count: " + result.getInt(1));
    }
    }
    catch (Exception e) {
    e.printStackTrace();
    }


    However, the world database uses our native SQLite implementation instead. In SQLite, the equivalent of result.getInt() is sqlite3_column_int(), where the leftmost column begins at 0 (instead of 1).

    You could fix that by accessing index 0 in the result set, however, since this isn't consistent with the regular JDBC implementation, we will change that with the next update (so I wouldn't recommend using that now).


    Instead it's probably better for now to use an alias for the count and access the result through that name:

    Java
    try (ResultSet result = db.executeQuery("SELECT COUNT(*) AS count FROM `mytable`;")) {
    if (result.next()) {
    System.out.println("Count: " + result.getInt("count"));
    }
    }
    catch (Exception e) {
    e.printStackTrace();
    }

    Please see my response to your other topic about this matter: RE: Players on my server are not seeing changes I made to the game


    It always depends on whether something is generated serverside or clientside. The world (including biomes etc) is generated serverside, so any changes to the serverside definitions.db have a direct impact on the world generation.

    Crafting also happens serverside, but the UI is shown clientside, so the client uses its local (clientside) definitions.db to show the crafting requirements on the UI. Still, clients cannot circumvent the serverside crafting requirements, because the server still performs the check (using the serverside definitions) when crafting an item. So changing the crafting recipes clientside will only cause your UI to be out of sync (you won't be able to craft any items where the client/server recipe doesn't match).


    It's our intention that clients sync their definitions with the server when joining a server. But there is some work involved to implement that properly, so unfortunately we have no ETA for that yet :/

    No biggie. I can convert it in the old code or use it as is. I just wanted to bring attention to the wrong example being wrong.

    Oh, thanks for bringing this to my attention, it's still an old example from the Java version :saint: We'll fix that with the next update ;)

    It's a bit tricky... basically UI elements no longer have a position like that (unlike the Java version), instead the Style only has left, right, top and bottom values. "setPosition()" is basically just a helper method which sets the "left" (x) and "top" (y) properties (and also sets the "position" property to "Absolute").


    If there was a "getPosition()" method, it wouldn't be reliable and it's behaviour would be a bit confusing... one would expect it to return the current position of the element, but this can't be queried actually (because due to the flex layout, the position isn't necessarily defined through the left and top properties). For example, if you set the "right" property and also define a width, calling "getPosition()" would return 0 (which is obviously wrong), because it would just read the "left" property, which hasn't been set in this case. In fact the position depends on other style properties as well.

    Personally I think the big thing people are wanting would be particle effects to make fountains, running faucets, splashing water, etc. things like that to go along with the water blocks you had mentioned about adding beforehand. I could be totally wrong but it seems a common thing for people to call that "flowing water", not knowing it's just particle effects.

    That's a different story of course ^^ Various configurable particle effects are actually planned :)


    So the question originally is in regards to the ocean and somewhat on ponds. I look out in a storm and notice the large body of water just sits there reducing immersion. The trees sway and even the grass sways. In a small pond the plants (Lilies) just sit there when the wind blows and as such detract from immersion

    Yeah, ocean waves are definitely still missing, but they're on our to-do list ;)


    As a wish list on flowing waters, I would like to direct water from the hilltops through hollow cylindrical building pieces and channels of blocks simulating aqueducts.

    Unfortunately this couldn't be achieved with flowing water... but if it's just about building, there will be water blocks in the future, as mentioned by CursedXistence :) They will be fully static of course, but the game will recognize them as water. Like any other block, they will be fully resizable and could be freely placed, allowing you to create very detailed bodies of water.

    Das Problem ist, dass der Size-Befehl grundsätzlich so arbeitet wie das Skalieren per Pfeiltasten. Da Fensterrahmen Skalierungen über die Z-Achse igorieren und stattdessen auf die Y-Achse anwenden, passiert selbiges beim Size-Befehl. Das ist aber nicht ganz gewollt und eigentlich dachte ich, dass wir das bereits geändert hätten, aber offenbar haben wir die Änderung nicht ganz umgesetzt :wat: Wir werden das dann aber jedenfalls mit dem nächsten Update reinbringen, sodass der Size-Befehl immer die X, Y und Z Achse beeinflusst ;)

    In welchen anderen Spielen hat die Spitzhacke denn eine noch größere Reichweite? :wat: Ich kann deinen Standpunkt zwar nachvollziehen, aber das Problem ist leider, dass die Reichweite auch jetzt schon visuell nicht mehr wirklich passend ist... das ist in der 1st Person Ansicht zwar nicht weiter problematisch, aber im Multiplayer (oder in einer künftigen 3rd Person Ansicht) ist es schon jetzt teilweise so, dass man sehr weit vom Objekt entfernt steht, in die Luft schlägt und trotzdem den relativ weit entfernten Block trifft, was optisch unpassend ist (da die Spitzhacke nicht ansatzweise Kontakt mit dem Block hat). Eigentlich müsste die Reichweite gar geringer sein (wenn man es realistisch gestalten will und die Optik besser zusammenpassen soll), aber das wäre spielerisch natürlich nicht mehr toll... aber noch höhere Reichweiten würden das noch extremer machen...


    Beim Malen würde künftig jedoch eine Sprühpistole Abhilfe schaffen, die dann eine noch höhere Reichweite haben könnte. Was die Spitzhacke angeht, so hat momentan nur der Minenbohrer eine (etwas) höhere Reichweite.

    Will cats and dogs be added to the animals?

    It's our intention to add them in the long run (actually we've already done some preparations for that) ;) But it depends a bit on the overall situation of the game after replacing the Java version.

    What kind of movement/flow are you looking for specifically? Do you refer to ocean waves?


    Ocean waves are actually planned ;) But unfortunately we have no ETA for that yet... it will happen after replacing the Java version with the new version.


    If you're looking for flowing water, the new version already has flowing water, but it only takes terrain into account for collision for now. The only change that's planned is that water will also detect construction elements in the future (at least construction elements with a minimum size).

    Water has a fixed resolution (one water cell has the size of a block), unfortunately it's not possible to have more detailed water (i.e. consisting of much smaller cells/blobs) in a performance-friendly way...

    Having detailed flowing water on a large scale isn't possible (yet) from a technical point of view unfortunately. If a single water drop would have the size of 1 cm (which is still a big water drop), a tiny 4x4 pond would already consist of millions of water drops. While modern GPUs can actually handle this on a small scale in realtime, this is far from being usable in a game like RW. On the one hand, the game needs this on a larger scale (what if the player wants to have more than just a tiny pond of physically accurate water?), on the other hand, this data needs to be accessible by the CPU (because the game has to sync the water state between clients in multiplayer, and it also has to store the water state on the hard drive, so it doesn't get reset everytime you restart the game/server).

    when i tried to paint the ground with cobblestone it changes the background ground in some areas to sand but not others, seems to happen right along chunk lines

    This is unfortunately a limitation of how the cobble blending works... but we're currently reworking that :) Probably this issue will be fixed with the next update.


    In snowy biome i am only able to paint cobblestone on some chunks but not others, right side i can paint, left i am unable to paint

    It's hard to tell if this is maybe related to the other issue :thinking: Maybe try to increase the brush size a bit (with numpad +) and see if you can paint it then?

    When it comes to wild animals, there are indeed already baby versions of wild boars ("wildpiglet"), bears ("bearcub"), deers ("deercalf") and mooses ("moosecalf"). For upcoming wolves, we have also prepared a wolf cub ;)


    Unfortunately we don't have baby version of the safari animals, but that's on our to-do list ^^