For a Loot Plugin i need all the coordinates of chests in my prebuilt world.
To add them to the plugins config. I am not programming the plugin, i am just using it, i just need a way to get multiple coordinates for specific blocks in a world.
OR
If it is possible to use worldedit and replace chests with chests that have nbt tags i can completely skip the plugin part and use the vanilla loot tables. But i haven't yet found a way to setblocks with nbt data using worldedit.
I was thinking about downloading the map moving it into mcedit or worldpainter and hopefully find a way there to export the coordinates of each chest.
I'm looking forward for some solutions, and i'm thanking you in advance!
If you have to prepare this world initially and only once, I would recomment to use a plugin to identify all the chests in the world (e.g. by iterating through all already generated chunks and all containing blocks), and modifing or saving them, the way you need to. Doing this on a productive server will probably cause lags, cause the iterating/searching will be very intensive.
You could also think about some kind of hacky way, to identify if the blocks are placed by the world generator/a plugin or a player. When u use the plugin LogBlock, you can check, if the clicked chest was placed by a player. If so, treat this chest as a normal chest, otherwise, if no player has ever placed a block at this location, treat the chest as a chest from the "loot plugin".
Any of the ways will work, but the first one will probably be a little harder, since you have to manually load all the chunks. The second is a little bit hacky, but will be more easy, but maybe not compatible to your setup.
Related
I am trying to follow the tutorial for a dungeon RPG, which involves creating a tileset.
As part of this (bookmark to exact time in video (edit: thanks, corrected)) in the video it's possible to move around tiles into separate folders. I am trying to re-create this on Unity 2022.2.0.a14.2406, and I don't seem to be able to do this: Whenever I move around tiles (from a tileset) to other folders in my assets, I end up moving the whole tileset (see image below, with the left-arrow linking to the tileset). This of course prevents me from splitting up tiles, e.g. into categories like players/walls/etc.
How would you do this? I also tried using tags, but they seem to have the same issue - they get applied to all tiles in a tileset.
Edit: Example with multiple tiles (showing the first few) extracted via 'sprite editor => slice/automatic'. It's 256 tiles, so to use them it'd important to have some way to group these tiles.
I bumped into a similar situation, and solved it rather naively by firing up Paint.NET to edit the gigantic sprite sheets I had found online into smaller similar ones for the different types of terrains, and making a distinct PNG for each character and game object.
Good naming is critical: use a short but descriptive name for each PNG, so it imports and breaks down into say Torch_0, Torch_1, etc. and Castle1_0, Castle1_1, BlueBlobBaddy_0, etc.; have all the sprites needed for a given terrain type in the same import file, import them into dedicated folders/subfolders, then splice them into tiles.
It's honestly quite a lot of work, but it's well worth it in the end.
I'm hoping this post will honor the age-old rule "if you want to learn how to do something, post the wrong way to go about it online" and will prompt a better, not-so-naive approach to this problem which I presume everyone working with 2D tilesets in Unity has encountered.
I have recently implemented the flutter plugin called flutter_map, using the Mapbox tiles, and would like to know how you guys manage to count the network requests for the Static Tiles. Is it supposed to make a request for every move (zoom in, zoom out, move around, etc.) on the map itself? Is that the intended functioning or is there a way to diminish the number of requests made?Amount of requests made after zooming/panning
Is it supposed to make a request for every move (zoom in, zoom out, move around, etc.) on the map itself?
Yes indeed. The package supports static raster tiles, which means they must be re-downloaded if they change - such as on move or zoom events.
There isn't much in the way you can do about this, as it's a kind-of standard. This is why you'll find a similar thing in other mapping libraries, such as Leaflet.js and others.
See https://docs.mapbox.com/api/maps/static-tiles/ for potential ways to reduce costs whilst maintaining standards.
Is anyone knows how to do a building system like coc / boom beach? I know how to do a fortnite building system but there's only 1x1 structures to do while i need 3x2, 5x3 and many more sizes to go. I'm going to do it using UE4 with Blueprints. I've been looking so long and couldn't find answer. Hope you'll help me!
Thanks.
As the question is rather vague and doesn't give anyone much to go on. I'll try to take a stab at it, conceptually at least.
I'd assume that you have a base building BP or struct so, in there I would create a Vector2D variable or something similar to give it a length and width per building.
Then when you are trying to spawn the building, check the tiles that are that length and width away from the center of the screen/cursor for any existing buildings. Then when you spawn the building make sure that the building takes claim over the tiles that it is using so others will not be able to overlap later on.
So your main "meat and potatoes" of this project will be creating a grid system and also creating a system that can check whether or not a tile is inhabited already and also using and releasing tiles when needed.
If you want someone to give you a more concrete answer, you will need to show what you have done and tried in your question. Especially for one as broad as this one.
We have a web app that uses MapBox.
In the Leaflet control we're drawing polygons in a feature group, laid over a basemap.
What we're seeing is that for certain polygons, when we try to edit the polygon, when we drag points they snap right back to where they were.
Other polygons on the same map can be edited without issue.
I've attached an animated GIF that shows the behavior.
This is something that seems to be going on entirely within the Leaflat Javascript code, and I'm at a loss as to how to track it down.
I certainly don't expect anyone to be able to identify what I'm doing wrong, or what might be wrong within the Leaflet library, from as sketchy a report as this.
But I was hoping someone might be able to provide me with some guidance as to where I might start?
Specifically, if I was to try to walk through the javascript in a debugger, where should I put my breakpoints?
I've downloaded the uncompressed mapbox source, and I'm able to set breakpoints in it, but I've been unable to find which code executes on mouseup, in this situation.
So I want to make a custom component. One of the functions I want to have is the ability to create and modify set of points that make up a circle. For example, specify point count:10, and on field update, a circle made up of 10 triangles is drawn in the editor.
Then I want to be able to drag the vertices of the created circle. I feel like I might be able to do this during runtime, but I'm curious how to do it out of runtime. For example, the built in "Box Collider" component has a button that allows you to edit the collider size in the editor.
I looked around and can't find a resource - I feel like there has to be a place for this.
Thanks.
You can execute scripts like if you were in runtime using the [ExecuteInEditMode] annotation at the begining of your class.
Check out the documentation here
For the functionality you want, you have Handles, to manipulate objects properties.
Also you'll want to develop visual aids for your tool, so you can accomplish this using Gizmos.
Google "Custom Editors for Unity" - there's a whole section of the docs for this. You have a wide array of options, from the simple to the powerful.
I recommend catlikecoding's tutorials, that are clearly than the official docs, and take you through the process step by step.
One of them almost exactly describes your situation:
http://catlikecoding.com/unity/tutorials/editor/star/