Posts by red51

A new update is now available, introducing "Points of interest" and many more changes!
Latest hotfix: 0.9 (2025-11-04)

    If such a player/client stays on the server due to a high value, can it also lead to disruptions for everyone else?

    Not necessarily. It depends on whether the illegal state was caused by desync, or by a bug in the game. But in the worst case there will just be a desync between this client and his actions on the server.


    If you're still experiencing illegal state kicks, please let us know, so we can take a closer look at this to find out whether or not it's caused by a bug ;)

    It sounds like the main issue is that you call validateText when pressing the button, but since you have to wait for the callback results of multiple text fields, you can't just continue there? There is unfortuantely no way to get the text content of a text field directly (because the server first has to query if from the client)... but you could try the PlayerUIInputTextEvent - it's called once the player either presses enter (after typing a text) or when the text field lost focus. You could move the validation there and store the result for that text field, so when the player presses "Submit", you could just rely on the stored validation result :)

    Die Berechtigungsgruppe "admin" ist einfach nur eine Gruppe, die zufällig "admin" heißt, das hat erstmal noch nichts mit einem Admin bzw. Adminrechten zutun ;) Die Gruppe könnte auch "serverinhaber" oder auch einfach nur "dude" heißen - ausschlaggebend ist nur, was drin steht.


    Grundsätzlich gibt es die Admins, die in der server.properties eingetragen sind (mit ihrer UID), das sind "klassische" Admins. Ihre Rechte werden nicht von den Permissions beeinflusst, es sei denn, man stellt Permissions_AdminsFullPermissions in der server.properties auf false. Wenn man aber Kontrolle über die Berechtigungen von Admins möchte, muss man entweder Permissions_AdminsFullPermissions ausschalten (oder Admins ganz austragen aus der server.properties) und diese Personen einer Berechtigungsgruppe zuweisen (zB der "admin" Gruppe).

    Um was für ein Objekt handelt es sich denn genau? Ganz so einfach funktioniert das leider nicht direkt: Du musst dafür irgendeine Form von Serialisierung bzw. Deserialisierung durchführen. Ein paar Objekte (zB String) kannst du direkt zu einem byte[] umwandeln und wieder zurück, bei anderen Objekte hingegen musst du dich selber darum kümmern.


    Java bietet von Haus aus das Serializable Interface - wenn dein Objekt nur primitive Datentypen (oder andere Serializable Objekte) enthält, kann es damit selber die Serialisierung und Deserialisierung durchführen. Wenn dein Objekt also das Interface Serializable implementiert, kannst du es zB mit einem ObjectOutputStream und ObjectInputStream serialisieren und deserialisieren (mit writeObject() und readObject()):

    Java
    //Convert a byte array into an object via Serializable interface
    try(ObjectInputStream is = new ObjectInputStream(new ByteArrayInputStream(array))){
    MySerializableObject obj = (MySerializableObject) is.readObject();
    }


    Alternativ kannst du deine eigene Serialisierung durchführen, zB mithilfe eines ByteBuffer. Die Variante ist zwar nicht ganz so bequem, allerdings wesentlich performanter und in kritischen Situationen daher zu bevorzugen. Beispiel:



    In manchen Fällen i.V.m. Datenbanken ist es sonst aber auch manchmal eine gute Option, wenn die einzelnen Felder auch als einzelne Daten gespeichert werden. Das bietet sich nicht immer an, aber bei Dingen wie Positionen oder Rotationen kann man das durchaus machen. D.h. die Datenbank hätte nicht eine einzelne Spalte "position", sondern drei Spalten "x", "y" und "z" (wo direkt die 3 Floats eines Vectors gespeichert werden). Performancemäßig am schnellsten.

    Sachen die sich immer drehen (Motor) oder frei drehen sind schon möglich.

    Ich habe mit noci einige Tests mit Unity Physik gestartet und es funktioniert :)

    Z.B. ein Wasserrad mit "Hinge Joint" gebastelt und noci hat es bei sich eingebaut

    und es dreht sich.

    Ja, Prefabs, die über die API gespawnt werden, können alle physikalischen Komponenten von Unity enthalten und sie verhalten sich dann auch erwartungsgemäß :) Auch die Grundklasse GameObject erlaubt es, zur Laufzeit neue Komponenten hinzuzufügen (also auch physikalische Komponenten), dann ist das Konfigurieren allerdings schwieriger.

    Über die API gespawnte physikalische Komponenten (als Teil eines Prefabs etc) sind im Multiplayer jedoch nicht automatisch synchronisiert (was in vielen Situationen aber auch nicht unbedingt möglich ist, zB bei einem Wasserrad ist es ja egal, ob es bei jedem Spieler wirklich exakt die gleiche Ausrichtung zur gleichen Zeit hat, da gehts meist nur darum, dass es sich dreht)^^


    Leider hilft das aber auch nur, wenn man zB direkt ein fertiges Modell oder Prefab hat, was man drehen oder bewegen möchte :/ Selbstgebaute Strukturen können auf dem Wege leider nicht in Bewegung gesetzt werden... aber wie gesagt, das ist als spieleigenes Feature auf jeden Fall geplant (unabhängig von der API, wobei die API dann natürlich auch Zugriff darauf bekommt) ;)

    Alerdings wenn ich Versuche:

    Achso, die einzelnen Areas sind null, nicht das Array an sich? :wat: Das kann ich bestätigen... das werden wir mit dem nächsten Update fixen ;)


    8| interface.bin mit 144Mb dauern bei mir schon über 50min. :lol: hätte ich nicht gedacht

    Was dauert so lange? Das Asset Bundle in Unity zu öffnen? 8|


    Könnte man neben einem TexturAsset auch ein TextAsset Laden? So das im Bundel zu einem Prefab noch ein Vorschaubild und Beschreibung platzieren kann ^^

    Was soll das TextAsset denn können? Oder soll das einfach nur ein Weg sein, einen String aus einem AssetBundle zu erhalten?


    Oke, also direckt habe ich keine Abgeschaltet

    Ja, wenn keine Npcs ausgeschaltet wurden (beim Erstellen der Welt), dann ist es gewollt, dass die Funktion null zurückgibt ;)


    Kann ich hier HudLayer/hudContainer/leftContainer/buildingStatusContainer/transformStatusContainer/statusLabel rein Schreiben?
    Im Style ist das ja nicht für den Text möglich, aber am Liebsten würde ich schon dein Baumenü nurzen
    Mit player.addUIElement(UIElement, UITarget.HUD); komme ich ja auch nicht direckt bis zum HudLayer/hudContainer/leftContainer/buildingStatusContainer/transformStatusContainer/ um dort eventuell nur einen eigenes UILabel zu Platzieren
    :saint: Kannst du da was anbieten, oder ist die gefar dann zu groß, das dass Spiel Instabiel wird

    Direkt bestehende Texte des Spiels ändern kannst du leider nicht, aber du kannst eigene Elemente einem beliebigen Ziel hinzufügen mit Internals.addUIElementToPlayer() :)


    was habe ich im Phat Vergessen?

    Sorry, das hätte ich etwas genauer konkretisieren müssen: Wenn Assets aus dem Spiel geladen werden, erwartet das Spiel, dass der Anfangsbuchstabe großgeschrieben ist (also Interface statt interface). Beim restlichen Pfad ist das egal, es geht wirklich nur um den ersten Buchstaben.


    Wir werden das mit dem nächsten Update ändern, sodass Klein-/Großschreibung dabei keine Rolle mehr spielt, aber wenn du aus dem kleinen i ein großes I machst sollte es jetzt schon klappen ;)

    This is actually how it works now - I'm creating a new prefab from object prefab path and destroy original object. The thing is that the child count is always zero, so I can't control anything inside brazier prefab (iterating over child list also does nothing since there are always zero childs). Another thing is that while torch prefab don't have flame and light source (it is in deactivated state) the brazier always have both flame and light

    Yes, unfortunately you can't iterate over prefab childs (i.e. childs which are part of the prefab asset) :/ The API only provides direct access to childs for user-created game objects (i.e. only elements which were created through the API and added as child to a parent manually). Actually the API isn't aware of the actual prefab asset hierarchy (because prefabs are and other assets are only loaded clientside). This may change in the long run, but we don't have an ETA for that yet...


    To overcome this limitation, the Prefab class accepts a path for most methods - you can optionally provide the path to a child element there (i.e. a child which is part of the prefab asset itself). In case of the brazier, the childs are called "fire" and "light", so you could disable them that way:

    Java
    Prefab prefab = new Prefab(PrefabAsset.loadFromGame("Models/Objects/Brazier/brazier1.prefab"));
    prefab.setLocalPosition(player.getPosition());
    //Disable fire
    prefab.setActive("fire", false);
    //Disable light
    prefab.setActive("light", false);
    player.addGameObject(prefab);


    Another thing is that while torch prefab don't have flame and light source (it is in deactivated state) the brazier always have both flame and light

    This is a small oversight, basically it doesn't matter too much because the game overrides the state anyway when spawning the prefab ^^

    - Saving texture scale between sessions. Most settings in the radial menu, like rotation angle etc, are remembered across play sessions but texture scale is not. It can be really frustrating having to tear down a bunch of stuff because you forgot to set the texture scale appropriately every time you log in. Perhaps this was an oversight?

    Good point, probably it's indeed better if the game remembers the last texture scale setting. We'll change that with the next update :)


    - Element spacing gap setting. We can drag elements and use the + key to adjust the gap between elements. However it changes by 0.005 block intervals, which makes it take really really long to adjust the gap if you use large gaps. If we could set that through the radial menu, or even just using a console command, that would be great! (for example setgap 1)

    This is indeed controlled by the position precision setting, as mentioned by Yarofey ;) We could add a separate setting for that, but we're running out of space in the radial menu (and a few other settings are already planned) :saint: But we'll think about that!


    - texture rotation. Most textures seem to be set to the world axes regardless of the rotation of the element orientation. If you place elements at unusual angles (building ignoring the grid), the textures of things like timber flooring can look ugly and unrealistic. I see that some textures do rotate with the element rotation instead of the world axes, for example material 169, so it must be possible. Perhaps there could be a toggle in the console to choose whether a texture locks to the world axes, or the element axes? (for example settexturemode 1 or something...)

    This is planned, but it requires a world conversion (so existing construction elements store their texture rotation and mode), that's why we didn't implement yet :/ But it is still on our to-do list ^^

    Unfortunately I'm not sure if it will make it into the next update, but a ScrollView element is definitely on our to-do list :)


    PS: Your UI looks very promising! :thumbup:

    Ich weiß nicht ob schon gemeldet wurde Server.getAllAreas gibt ein Arry mit NULL zurück :thinking:

    Hmm... das konnte ich bei mir jetzt leider nicht reproduzieren :thinking: Auch wenn keine Areas vorhanden sind sollte diese Funktion eigentlich niemals null zurückgeben.


    Wie kann ich herausbekommen welche GameTexturen wo sind? Also für loadFromGame und mir gehts um die ganzen Icons im Baumenü(Linke Seite) und die vom Radialmenu bei [C] :saint:

    Du könntest das Asset Bundle vom Spiel öffnen (Unity bietet direkt einen Asset Bundle Browser als Package für den Editor). Die UI Texturen liegen überwiegend im "interface.bin" Asset Bundle im Spielverzeichnis unter Data/StreamingAssets. Die Icons für das Baumenü liegen überwiegend in "interface/icons/building" ;)


    Ansonsten ein anderer Trick: Mit dem nächsten Update kommt ja die getAllAssetNames() Funktion für Asset Bundles rein. Ein schlauer Fuchs könnte jetzt das Asset Bundle vom Spiel über die API laden und mit dieser Funktion alle Pfade auslesen :D


    Also die Prüfung ob Taste Gedrückt ist bekomme ich hin, aber wie kann ich den Calback für den Spieler Schlißen wenn ich C Losllasse?

    Du meinst das Radial-Menü? Wahrscheinlich wäre da eine player.hideRadialMenu() Methode sinnvoll (womit das aktuell geöffnete Radial-Menü geschlossen wird)... ich packe das mal auf die Liste fürs nächste Update ;)


    Wehre es möglich bei showContextMenu, showRadialMenu, showMessageBox und vieleicht auch die anderen MessageBoxen, den Abbruch Registrieren? Also wenn das Menü zu geht weil mann daneben Klickt(außer Radial) oder mit ESC

    Ja, das wäre sinnvoll. Also zumindest dass das Callback dann trotzdem aufgerufen wird (dann als Parameter aber zB -1 übergeben wird). Ich packe das mal auf unsere Liste, mal sehen ob wir das fürs nächste Update noch reinbekommene ^^


    Bei World.getDisabledNpcs() kommt ein NULL zurück.

    Das ist zumindest dann "normal", wenn keine Npcs deaktiviert wurden. Ich habe aber festgestellt, dass diese Funktion zu einem Crash führt, wenn es deaktivierte Npcs gibt :wat: Das werden wir mit dem nächsten Update beheben ;)

    Weitere Beispiele:

    Die meisten dieser Dinge wären mit beweglichen Bauteilen tatsächlich umsetzbar ^^ Leider nicht davon abgedeckt sind allerdings Fließbänder oder richtige Kräne (die Objekte auch wirklich greifen können)... sowas könnten wir lediglich vom Spiel direkt anbieten (also als fertige Objekte).


    Was mich sehr interessieren würde: Schnittstelle für Objekte in LUA. Dann könnte ein Benutzer/Spieler auch Bedingungen verknüpfen.

    [...]

    Ist LUA nicht schon Teil von Rising World?

    * Wobei solche Beispiele womöglich in eine andere Ära zeigen, wenn man von Signalsteuerung aus geht. Das heißt schalten über Funksender/Empfänger. (Ähnlich wie bei Stromleitungen)

    LUA war als erste API in der Java Version vorhanden, allerdings obsolet und nicht mehr weiterentwickelt, da sie 2016 durch die Plugin API ersetzt wurde. In der neuen Version ist Lua gar nicht mehr vorhanden.

    Allerdings verfolgen die APIs eher einen anderen Zweck, sie dienen nämlich als allgemeine Modding-Schnittstelle.


    Die von dir erwähnten Dinge werden aber alle mit dem künftigen "Stromsystem" möglich sein ;) Das Spiel wird hier komplexe Schaltungen und auch diverse Elemente (zB eine SPS) und Sensoren bieten.

    Darunterfliegen und Gras übermalen ist mühsam, da das Gras ja nicht sichtbar ist, sondern sich unter der Oberfläche ein luftleerer Raum befindet.

    Was meinst du mit "luftleerer Raum"?


    Das eine Erdstück habe ich mit F3 angemalt, das andere mit F2 darüber. Bei F2 ist der Boden viel glatter geworden. Diese Möglichkeit der Strukturierung gibt leider nur bei glattem Boden.

    Mit Tool 2 (also dem Glätten-Werkzeug) werden grundsätzlich keine neuen Texturen aufgetragen, allerdings teilweise durch die Glättung umliegende Texturen übernommen.


    Wenn du dich aber auf das 2. Bild beziehst: Darauf sind 2 verschiedene Erdtexturen zu sehen, einmal das normale "Dirt" bzw. "Erde", und dann der "Waldboden". Wenn du mit Tool 3 arbeitest kannst du diese Materialien direkt auswählen ;)

    Schwer zu sagen, warum das Boot nach unten gewandert ist :thinking: Wenn dort allerdings ein Hohlraum ist, dann erkennt das Spiel das als reguläre Wasseroberfläche. Befand sich das Boot vorher denn auch im Wasser, oder lag es am Strand (auf dem Bild ist das schwierig zu erkennen)?


    Wegen dem Problem, dass du den Hohlraum nicht entfernen kannst: Hast du evtl. die Möglichkeit, mir deine Welt zuzusenden? Dann könnte ich versuchen, das Problem bei mir zu reproduzieren ;)

    The initial world update indeed had a bug which caused the server to ignore the seed, but IIRC that was fixed with the first hotfix back then :thinking: But if the world was created before the fix, that seed will not be used (instead the server probably uses the default seed, which is 1). The server will not overwrite that setting in the server.properties btw (because the seed there will be used now if you create a new world, for example) - more precisely, that setting doesn't represent the currently used seed, instead it is the seed that will be used when creating a new world^^


    The actual seed is stored in the Meta.db, but when starting the server, the server also prints the "World infos" to the log (which contain the currently used seed) :)


    I couldn't reproduce any issues related to the seed unfortunaately... a seed entered for the dedicated server will produce the same world in singleplayer and vice-versa. But this only applies to newly created worlds (or worlds which were created after the fix mentioned above) ;)

    Basically it would be indeed quite useful if there was a way to access built-in game objects :thinking: The only problem would be to implement that in a consistent and reliable way... objects like furniture are bound to a chunk, so if the chunk is regenerated (e.g. if the player comes back after walking away), the object prefab would be loaded again (missing any changes you've done to it in the meantime) :/


    But probably it would work if the game always keeps track of all modifications that had been done through the API - if the game then reloads the object prefab, it would have to go through that list again and re-apply all changes. This approach may have some minor performance implications (especially when doing lots of modifications)... but we'll think about adding such a feature ;)


    However, in the meantime, you could load the object you're looking for as Prefab: You could load the asset from the game files (for the brazier, it would be PrefabAsset.loadFromGame("Models/Objects/Brazier/brazier1.prefab"); - but you could also get the relevant paths from the definitions). You could then disable the childs manually with prefab.setActive() (the brazier has two childs called "fire" and "light") and add your own, custom childs ^^

    Thank you, adding underlines worked, I just thought that using same name as property have in shader graph will be enough

    Basically the "Reference" field of the Shader Graph property is the relevant name when accessing the material parameter - typically it begins with an underscore ^^


    Another small thing that was probably not reported - any definitions that are provided by object.getDefinition() will be null in the world if it will be reloaded. They works fine only with first world loaded after game was launched

    Thanks for letting me know! Apparently the definitions aren't reset properly... the game internally caches the "API definition" object upon first call, but that reference becomes invalid after reloading the API... we'll try to get this fixed for the next update ;)

    You mean an event that gets triggered when an npc grows up? I will put that on our to-do list :)