Posts by red51

    1) you cant save the item provided in the event. start a timer and get the item back in the timer callback. While the object stored is still an item it seems to be empty at that point in time.

    Basically you can do that, but if you cache the item and use it at a later stage, make sure the item is still valid then (i.e. make sure the item hasn't been removed or disposed in the meantime). To do that, you can call item.isValid() ;)


    While I do understand that this is a result from how the data is structured in the game, IMHO for the api this is WAY to complicated ;-)

    As mentioned above, determining which item you have to add to the inventory based on a recipe is indeed a bit tricky, but a generic addItem() method which simply takes a String would definitely simplify this (you'll only need to pass recipe.name to the method then, without having to determine the recipe type) ^^

    Yes, if you want to change the permission group after a certain amount of time, you have to use a plugin for that. Unfortunately the scheduler isn't capable to do that atm: the time intervals aren't bound to a player, for example, so they're not suitable to determine the total play time. Also, the scheduler doesn't support any kind of branching, so it doesn't provide enough control to achieve that :/ Basically the scheduler is mainly intended to perform generic tasks (e.g. send messages to player, handle server restarts, change the ingame time or weather etc).

    I don't know if i missed it, but can someone tell me if this plugin works fir the current version of unity please?

    Unfortunately plugins for the Java version need to be recompiled for the new version... and depending on how the plugin was made, it may also require some minor changes (this topic contains an overview of the differences for plugin creators). So unless the plugin creator posted an updated plugin for the new version specifically, it won't work unfortunately :/

    Yet that's not that much helpfull in my case as I want to create a generic wrapper which basicaly replaces the in game crafting. You might ask why I'd like to do that, to me the instantaneous crafting just doesn't feel right so I tried to create a short delay by aborting the original craft, start a timer, fill a progress bar and once a certain time has passed add the craft result to the player inventory ;-).

    You could grab the item from the PlayerCraftItemEvent and check what item it is, similar to how james1bow suggested above, e.g. like this:



    first, there's no object definition for a primitive workbench but a item definition so using this as criteria to choose between addItem and addObjectItem doesn't work.

    Primitive workbenches are objects, so they're represented by an ObjectDefinition. However, crafting recipes never store object definitions, they only store item definitions. In case of the workbench, the item definition references the generic "objectkit" item - this is how most objects are represented in inventory. Similar to the generic "constructionitem", which represents almost all construction elements, or the generic "clothingitem", which represented all types of clothes.


    But getting the correct item from a Recipe is indeed a bit tricky... internally the game stores some meta data (to determine the type of item) which is unfortunately not accessible by the API... what you could do is to check the RecipeType: If it's RecipeType.Object, you can use the recipe name to get an ObjectDefinition. If it's RecipeType.Clothing, use the recipe name to get a ClothingDefinition. If it's RecipeType.Block or RecipeType.Construction, you can get a ConstructionDefinition from the name. Else it's a regular item (where you can use the name to get an ItemDefinition).


    But if you're still inside the PlayerCraftItemEvent, it's still better to check the actual item instance (as mentioned above) ^^


    Having said that, I think it would be useful if we add a new addItem() method which just takes a String. There you could just provide the target item/object name and the game would automatically determine the type of item it has to add (this would work for items, but also for objects, clothes, construction elements etc) :)


    on the way I discovered a further issue, how to add a blueprint item to the inventory? :-) ... well without the other issue solved that'd be just a question for curiosity :-)

    Unfortunately there is no method to add a blueprint to the inventory yet (because there was little use for such a method yet, since a client could only use his local blueprints anyway). But I can put this on our to do list :)


    does tell true for both a workbench as well as for lumber.

    Hmm... that's not supposed to happen :wat: The condition if (item instanceof Item.ObjectItem object) should only be true for the workbench in this case, not for lumber. Are you sure it's true for lumber? Unfortunately I wasn't able to reproduce this on my end :thinking: If you use the code above for the PlayerCraftItemEvent, the output for lumber should be "Player crafted regular item: lumber"

    Basically it already works like that (more or less) ;) The game distinguishes between regular items (tools, weapons, food etc, basically everything that's solely used in inventory), objects (furniture, workbenches, doors, lamps), construction items (blocks) and clothing items.


    The addItem method is relevant for all regular items, i.e. all items which are represented by an ItemDefinition. In this case, the itemID is always the ID of the definition:

    Java
    Items.ItemDefinition itemDef = Definitions.getItemDefinition("pickaxe");
    inventory.addItem(itemDef.id, 0, 1);


    Objects (like the workbench) don't have an item definition (internally objects in inventory are almost always represented by a generic "objectkit" item which contains additional information to determine the actual object). If you write Definitions.getItemDefinition("workbench");, null is returned (because there is no item that is called "workbench", and the game does not have an ItemDefinition for this object).


    Objects are represented by ObjectDefinitions instead: to add an object (furniture, workbenches, doors, lamps etc) to the inventory, you have to use the addObjectItem method instead:

    Java
    Objects.ObjectDefinition objectDef = Definitions.getObjectDefinition("workbench");
    inventory.addObjectItem(objectDef.id, 0, 1);


    Clothes and construction items (blocks) use ClothingDefinitions and ConstructionDefinitions accordingly.


    To find out if you need to get an ObjectDefinition or ItemDefinition etc, you can use the description above as a rule of thumb (tools/weapons => item, furniture/workbenches => object etc). Alternatively you can take a look at the definitions.db file (in the game directory under Data/StreamingAssets/) , which contains all definitions. To open the file, you'll need an SQLite browser (like DB Browser or Navicat). Everything that's stored in the items table is represented by an ItemDefinition, everything that's stored in the objects table is represented by an ObjectDefinition, everything that's stored in the constructions table is represented by a ConstructionDefinition and everything in the clothes table is represented by a ClothingDefinition ;)

    Unfortunately the LOD surface level indeed does not take caves into account yet :/ Usually it's not a big problem (because there shouldn't be many steep caves near the surface), however, there is indeed always a hard-coded steep cave at the center of each island (which goes down straight to hell). Originally we've added it for testing purposes, but decided to keep it in the game for the biomes&caves update. Maybe we will remove it in the future.


    Unfortunately I can't give an ETA when caves will be taken into account for the LOD surface level, however, a workaround would be to take this particular cave into account when teleporting to the center of an island. It has always the same layout. It's definitely not an elegant solution, but could work for now. The surface hole always goes down roughly 32 blocks (but only if the surface of the island at this position is above sea level, i.e. 90).

    I think I need help. I've tried installing this plugin like other for singleplayer but when I try to load into the game, it get's stuck at 5% and won't do anything else. Can some please help me and tell me what I may be doing wrong?

    This sounds like you're playing the Java version of the game? Unfortunately this plugin is for the new version* of the game, i.e. the one that's currently in a beta branch and needs to be enabled manually, so it won't work with the Java version. To find out which version you're playing, you can check out the version number in the main menu (in the lower left corner of the screen): If it's 0.9.6, it's the Java version. If it's (currently) 0.7.0.3, it's the new version ;)


    * We're currently moving the game to another engine and rewrite most things from scratch. The new version isn't fully ready yet, that's why it's still in a separate beta branch on Steam and needs to be enabled manually. Once it's ready, it will replace the Java version (everyone who owns the game gets the new version free of charge of course, but the Java version will also remain playable then)

    Where do you install the plugin at?


    since its a java file and not a .zip file, im not sure where to place it

    Each plugin requires a separate subfolder in the plugins folder of the game. So in order to use this plugin, make sure to put the pluginlist-1.0.0.jar into a folder (which could be called PluginList, for example) inside the plugins folder, so it has this folder structure:

    Code
    Rising World
    |__ plugins
    |__ PluginList
    |__ pluginlist-1.0.0.jar


    But please bear in mind that this plugin is for the Java version of the game (i.e. the current "default game"), so unfortunately it won't work with the new version of the game (the one that's currently in a beta branch and needs to be enabled manually) ;)

    Sowas würde grundsätzlich über die NpcDefinitions gesteuert werden (über die "behaviour" Variable). Das Überschreiben von Definitions im Allgemeinen über die API wird aber leider noch nicht mit dem nächsten Update kommen. Das ist aber definitiv noch geplant, doch da das einen gewissen Rattenschwanz hinter sich herzieht (Definitions müssen zwischen Server und Clients synchronisiert werden, Client-Definitions müssen beim Neuladen zurückgesetzt werden usw), kann ich leider noch nicht genau sagen, wann das kommt :/

    So it appears I need to build a plugin to change a players permission group after playing a certain amount of time. The commands do not seem to be able to discern if the player has already changed from, for example, a Visitor to a dedicated General Player. The command after spawn would continually change the players group after some set time every time they join the server, correct?

    Which command do you mean exactly?

    Hi red51 being able to set an npc to invisible in conjunction with this would allow for some very cool stuff to happen :D

    Indeed, this sounds like a great idea! :thumbup: We will add a npc.setInvisible() method with the next update ;) Do you still want the player to be able to interact with the npc, so only the rendering is turned off with the invisible setting?


    Man could be a private GameObject for example, player.attachTo(Bone.Head, gameObjectHut) Bind directly to the head :saint:

    Oke, it's get the custom closes, then it is Superfluous :thinking:

    Yes, there will be an option to attach the object directly to the head ;) This way you will be able to add custom hats or other headgear to a player (or npc).


    Unfortunately we have no ETA for actual custom clothes yet, so this would be a proper workaround for now ^^ But there are many more use-cases, like attaching a particle effect or a light or a text to a player/npc (ofc this could also be solved via moveToLocalPosition(), but attachTo() is much smoother [perfectly synced with the target element] and much more performant).


    After attaching an object to a target, setLocalPosition() and moveToLocalPosition() will still work (this will then set an offset between the object and the target).

    This topic contains more information about the scheduler: Server Task Scheduler


    When defining time intervals, it depends on the syntax: If you just write something like @10m, for example, the command will be executed every 10 minutes. If you write @+10m instead, the command will be executed once (10 minutes after the server start). If you type @15:00 instead, the command will be executed exactly at 3 pm server time etc.


    The linked topic above contains more information about that (there you will also find an overview of all events) ;)


    To get an overview of all commands (like "/say"), you can take a look at this topic: Server Commands [New Version]

    Small addendum: The next update will also introduce a new attachTo() method for game objects (including volumes) - this can be used to attach a game object to an existing player or npc, so it will automatically follow the player/npc in a performance-friendly way with no jitter or delay ;) (of course such a method also provides many more possibilities, like adding new headgear to a player or npc etc)

    It's indeed necessary to get a Plant when working with vegetation/plants/trees etc (in conjunction with the World.getPlant() method) ;) ObjectElement only represents furniture, fixtures, workbenches, doors, lamps etc, basically any kind of furniture and fixtures that can be placed by the player.


    But probably it would be also a good idea if we add a getPlant() method directly to the vegetation events (and getObject()/getConstructionElement() to the object/construction events accordingly). We will do this with the next update^^


    However, the PlayerHitVegetationEvent also got a setDamage() method in the meantime, so if you just want to change the amount of damage the player inflicts to the plant, you can simply use the setDamage() method ^^


    SetDamage method would be helpfull in PlayerHitTerrainEvent too ;-)

    Yes, definitely, we will add this with the next update ;)

    I think this type of control :thumbup: is very pleasant and you would make the Whole uniform.

    Thanks for your feedback :) :thumbup:


    You can here at the Performance when you want to leave it to the player after Hiking :saint: I would do that So, I mean, look at all the the Volum Chlient-Sided move. Possibly also of other, well-Synconiesieren.


    Maybe that makes little sense, but I thought of it: for example, something like magic (fog, to Hide) hangs on a Remote player drann.

    Instead of a volume following a player, it's usually better to either use a global volume (and only attach it to the player(s) you want to be affected by the effects), or just use the player-specific post processing (via player.getPostProcessing() and player.setPostProcessing()) ;)


    Volumes are invisible (only the post processing effects become visible as soon as you enter the volume), so if you really want a volume follow a target (e.g. if you want to enable a post processing effect if the player moves towards a moving target), it's usually sufficient to update the volume position every 500 ms, for example (e.g via the moveToLocalPosition() method).

    red51 gibst es bezüglich den dungeons eig eine Umfrage?

    Eine direkte Umfrage war an sich nicht vorgesehen, aber ggf. die Community an der Gestaltung der Dungeons teilhaben zu lassen. Die Pläne stehen weiterhin (wahrscheinlich warten wir aber das nächste Update noch ab) ;)


    Und würde mich noch interessieren ob die Werkbänke noch kommen die es auch in der Java Version gab. 😀

    Kommt ein wenig auf die Werkbank an: Mit dem nächsten Update gibt es zumindest den Webstuhl (wie in der Java Version), welcher dann Bedingung für die Herstellung der Kleidungsstücke wird. Sonst gab es in der Java Version lediglich noch die Blockbank und Sägebank... da müssten wir mal schauen, wie sinnvoll das tatsächlich wäre (da Rezepte jetzt ja nicht mehr direkt an eine Werkbank gebunden sind, sondern die Werkbank nur noch in der Nähe stehen muss) ^^

    Gibt es jetzt schon einen Termin für das nächste Update?

    Es ist ja schon ein paar Tage her, dass es beschrieben wurde.

    Sollten nicht auch ein paar Bilder in der "Roadmap" erscheinen?

    Einen konkreten Termin kann ich leider noch nicht nennen :/ Eigentlich sollten nur Karten ins nächste Update, aber es hat sich dann doch noch ne ganze Menge mehr hineingemogelt... u.a. wird es aber neben der Karte eine weibliche Spielerfigur geben, Terrain-Materialien für Blöcke, viele QoL Änderungen, Banditen und mehr.


    Für die Trello Roadmap fehlten uns leider noch ein paar nette Screenshots... werden wir aber kommende Woche updaten :)

    Yes, you will also be able to override the fog that way ;) But unfortunately this doesn't provide any access to the day/night cycle, for example, or access to the sun/moon light... although you will be able to change the overall screen brightness/exposure.


    Some effects we could add easily would be:

    Code
    Contrast/Saturation/Hue
    Color filter
    Film grain (noise)
    Chromatic aberration (color fringing)
    Distortion effect
    Blur
    Exposure
    White balance
    Vignette effect
    Highlights/Midtones/DarkTones


    In addition to a global post processing setting (which can be retrieved via player.getPostProcessing()), we could maybe also add a local "volume" object (derived from "GameObject") where these effects would be visible. This way you could have many different post processing volumes in your world with individual settings. When the player enters a volume, the post processing effects will be interpolated automatically.


    I think we will also change the API a bit: Instead of having separate methods (e.g. "setContrast()", "resetContrast()" etc, as mentioned in my previous post), it's probably better if we use the same syntax as for UI styles where you edit the individual fields directly (and call a method to update/sync the post processing changes once you're ready, so the game doesn't automatically sync every tiny change that is performed). The syntax would then look like this:



    For local (or global) volumes, the API could then look like this:

    Thanks for letting me know! Unfortunately the block position calculation in the API is indeed wrong... apparently the calculation was already wrong back then in the old Plugin API for the Java version (and we just copied the Utils class from the old API) :thinking: The weird thing is, the native game implementation (and even the implementation the Java version was using) is correct, so it looks like this error was solely introduced in the Plugin API for the Java version back then (and ported to the new API accordingly).


    Anyway, we will fix this with the next update :)