Why that work with the first blueprint and not with the second?
Hi, I'm not sure, but this can be related to terrain inside blueprint (terrain is grid-aligned) or probably some objects inside blueprint (there are objects that can't be snapped)
Why that work with the first blueprint and not with the second?
Hi, I'm not sure, but this can be related to terrain inside blueprint (terrain is grid-aligned) or probably some objects inside blueprint (there are objects that can't be snapped)
UniLib is the Universal Library for Rising World plugins. It has modular structure, which means that its functionality is separated into smaller subprojects: if you don't need the whole library functionality for your plugin you can just select modules that you need. Modules are supposed to be used as embedded libraries (packed inside plugin jar).
Links:
- Project License: MIT
Releases:
- JitPack
- GitHub
Available Modules:
1. unilib-database-utils
- Database management module
- Create databases, tables and requests with builders
- Locate databases in world, plugin or custom directories
- Store different data types (including Vector3f and Vector3i)
- Update, remove and add new data into tables with builders
- Don't require SQL syntax knowledge
2. unilib-config-utils
- Config management module
- Create simple configs in .conf format (in plugin folder)
- Store primitives and custom classes
- Comment any entry with as many comments as needed
3. unilib-terrain-materials
- Terrain Material data storage module
- Contains all terrain materials as constants with IDs, names and average colors
- Have additional methods to get terrain by ID/name or get grass by length
Planned Modules:
- math module - some useful mathematical operations and fast trigonometric functions
- blueprint module - integrated version of BlueLib to work with RW blueprints
- noise module - module with different noise functions (perlin, simplex, voronoi)
- sdf module - module with SDF functions (mostly ported from BCLib with adaptations)
- worldgen module (when API will be updated) - to manipulate worldgen (probably will be not necessary)
In case of the brazier, the childs are called "fire" and "light"
Thank you, that works fine
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
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
This can work only for simple items since any custom functionality will require additional Java code. This idea can also be implemented as a plugin when custom definitions will be a thing
Or if your player is stored in field you can use a method:
An example of object that is not possible to handle with "fake object method" is a brazier. It has internal light and fire effect that can't be disabled without access to GameObject, so braziers looks weird with two lights and two flames inside. Ideal solution will only change color of light inside specific game object on scene directly, that's why I'm mentioning access to GameObject
How this can look like (using new plugin API)
It will be probably possible to make that idea completely on new API, but it don't have some required functionality, for example it will need to get GameObject in the scene (at least by position), otherwise it is not possible to change element properties. That example was created with "fake" objects, and it will work only with some types of lights, not with all
Also make sure to provide the correct property name
Thank you, adding underlines worked, I just thought that using same name as property have in shader graph will be enough
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
I couldn't reproduce it on my end unfortunately
After some code and log analysis I found that it happened when Prefab was not loaded from asset bundle (incorrect argument for loadFromAssetBundle) and setMaterialParameter was called for that prefab.
When prefab is loaded correctly the bug is missing, but setMaterialParameter is not working for me. I'm trying to set color parameter, probably this is a reason
Good day, I tried to use setMaterialParameter method to change some variables in prefab material, but this results with game freezing and locking OS completely, while logs are overfilled with these messages up to 2GB very quickly:
QuoteAPI: Cannot find game object 3655, adding to queue...
API: Update prefab (MaterialParameterVector4) -> (DarkColor)
Looks like the game falls into infinity cycle
New update is here! This version will require RW Unity 0.6.5.1 or newer since it uses new API that we get in it
Changes:
Download: Version 0.3.0 (bars color update, RW 0.6.5.1)
It's our intention to expose that to the API, but we're still not 100% sure how the game should handle that specifically (because these values may change depending on the player position and the weather).
Probably it is possible to have some sort of delay for these changes, and after some time values will smoothly become game controlled again if the plugin will not update them again.
Or it can be possible to get default values calculated by the game and operate them on plugin side
Not sure how such an API should look like...
Probably it can be a custom function that will look for LOD component in GameObject and if it found one will change it or put into internal list to control later (for example when setting are changed). If the function will be not called the LOD will stay same as in prefab, and when called it will be synchronized with the game
Yes, that's definitely planned
That's good, so we will be able to override built-in definitions, but what about completely custom? Like new types of wether or objects?
We're still not 100% sure if it's better to have events (when a chunk or world part is generated) or a way to implement and register a custom world generator module (where you could just override methods like "getTerrain()" or "getChunk()")
Looks like events will be more compatible with each other, while custom module should be a bit faster. If the system will have events then different plugins can apply their own changes to world separately: for example one plugin can alter cave generation and another one can change ocean. If this will be done in modules they should be somehow connected with each other and "know" about changes done by other plugins, otherwise there will be only one plugin that can change world in the pack
Good day, I want to request several things to the plugin API that will make developing some plugins easier:
1. Ability to control some post effects for players - fog color, fog intensity and ambient light. This will make possible custom underground and underwater rendering, probably some custom effects on specific biomes and so on.
2. Ability to attach same LOD parameters to assets as the game uses with same distances. This should make plugin graphics configurable together with game graphics and will make LOD configuration easier.
3. Custom definitions. I think that it was planned earlier (and probably for final API version), so I just included it here. This will be a really powerful feature that will finally make custom things possible.
4. Different world generation events to change and modify ho chunks are generated and populated
PrefabAsset asset = PrefabAsset.loadFromAssetBundle(bundle , "wurfel2.obj");
That will work only if prefab has "wurfel2.obj" name in Unity itself, in most cases prefab names are different from model names, for example this is how my crystal named:
And its mesh:
Both don't have .obj extension (even when model is OBJ), since Unity will change the name of imported models, and prefabs can have name that is different from model
I think I finally understand your problem. I'm not sure that you can load Mesh directly from unity bundle, but you can load a prefab from it:
And you can change prefab material:
"default" here is the node inside prefab
And done:
Hi, can you please show your log output?
Are you trying to make a procedural mesh?
Also, what is Texture and Normal arguments in your case? That are turned into String
For second try i think to read somehow position of Z direct from chunk data, but here i am stuck i don't have idea how i can do that
Hi, size of blocks in terrain is actually the same as units that player position have (1 block = 1 unit), so you only need to get terrain from specific chunk and iterate it from above until you will find any solid tile (anything with ID greater than 0 - air, and less then 200 - water). Chunk coordinates can be generated from desired position - there is an utility function for that (in ChunkUtils class), or you can divide your position on chunk width and height with flooring the result. Block coordinates inside chunk are relative to chunk position, so their calculation is also not very hard (you need to subtract chunkPos * chunkSize from your absolute block position to get relative position in chunk), and there is also utility function for that.
what happen if i want to work with a chunk which was not yet generated by server
I think that server will just return you null
There is also a bug with UI (plant selection and element shape selection) - if you will open it on the second time it will show wrong place in catalogue with missing icons, and for element shapes it will show not all available shapes. Simple movement of a slider fixes this, so looks like it is a visual bug