Posts by paulevs

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

    when plant get damage from player

    In that case it should be simple - you can cancel the event and then damage plant manually, for example you can use getDamage and multiply it on level (or any other system that you will implement). Event itself don't provide you the plant object, but it provides you getGlobalID method, so you can get this object from the world with getObject method and apply custom damage to it with setStrength. That should work fine (probably)

    Check the doc site, there's a GetDamage method for plants (check screenshow below). And also I've tested it locally, it tracks the damage as expected, but unfortunately I can't modify the value as I wanted :$

    Wait, do you mean situation when player get damage from plant or when plant get damage from player (like tree cutting)? Event in the docs is about the second one

    In the next version plugin will check if there are more than one plugin jar in the folder and will show message to server admins (or singleplayer since in singleplayer you are an admin).



    Bars color and their background color will be configurable


    Colors can be in both RGB and RGBA formats (standart hex coding for color, so you can use any graphical program to select desired colors)

    So, the new update is here :)

    Config update - now you can change most of new GUI parameters. Config will be generated automatically inside plugin folder after first launch.


    232732319-38a0da14-8eec-4eeb-a869-afbe8fd82d75.png


    Changes:

    • Added config
    • Fixed incorrect elements rendering
    • Hide custom UI on screenshots
    • Ability to partially use elements of built-in UI (for example - status icons)

    Config Example:


    232732243-05387ff3-70ea-48c0-9923-95fde1f50913.png


    This config will make thin bars (as SonoBionda requested)


    Make sure that you removed old plugin jar from the folder during an update


    Download: version 0.2.0

    Original post was also updated

    Hmm... changing visibility, opacity, width or height for the thirst or hunger icons work properly on my end :thinking:

    I think that I found an answer - if the style is created on plugin startup and applied to several elements it will change only the first element. Looks like style argument will be mutated, and if it will be applied to the next element it will not have effect.


    For example code like this:

    Java
    Internals.overwriteUIStyle(player, "HudLayer/hudContainer/statusContainer/rightContainer/statusIconContainer/thirstIcon", s1);
    Internals.overwriteUIStyle(player, "HudLayer/hudContainer/statusContainer/rightContainer/statusIconContainer/hungerIcon", s1);

    Will change thirstIcon, but hungerIcon will be same (s1 was initialised in onEnable)


    In theory grid scale in Unity is same as Java, so grid-aligned blueprints should connect to each other fine. And they will connect even better if you will include terrain into them - terrain uses voxel-aligned grid with fixed size, so they will always connect to each other

    Brief example


    I exported two parts of same building from Java


    And placed it into Unity with active grid



    Building is perfectly aligned

    copying the java version over to the unity version.

    It will be better to recreate some large objects (like streets) in Unity instead of directly moving them from Java. Unity version don't have face culling, so even if your build is made from cubes you will get up to x6 times more polygons in Unity then in Java, which means huge FPS drops. So instead you can create similar construction, but with one huge element instead of dozens smaller. This will have a huge effect on large builds (like cities)


    I had perfect streets in the java-version, copying them to the unity and placing them is terrible

    In theory grid scale in Unity is same as Java, so grid-aligned blueprints should connect to each other fine. And they will connect even better if you will include terrain into them - terrain uses voxel-aligned grid with fixed size, so they will always connect to each other

    New building system is much easier then the old one. You still can build in the same way as in old - there is still grid (scalable), old style of element placements and so on. But together with that new system allows any element be placed anywhere and have any size, rotation, color. It can be attached to other element with snapping and you can chose in which point. And the same thing works for objects and for blueprints, so it is a great universal building system that will help ypu build anything. All that you need is located in radial menu under C key or under some other hotkeys which are displayed in helper messages or in key options

    I'm working on a config system and enhancements for the plugin. Next version will hide HUD on screenshots and will be possible to configure, for example you can partially disable changes or configure size of bars


    image.png