Open danielniccoli opened 2 years ago
It's possible to gather this information, this would need some sort of deduplication, as the EntityGetInRadius
areas would need to overlap. But that could be done with a set that contains already captured entities.
It would be pretty easy to write the name and coordinates for encountered entities into a file line by line. What is your usecase with this?
I want to create an OpenSeaDragon map of a world and with the coordinates I could add interesting entities to the map as overlays.
Ok, the mod now exports a JSON array with entities, their child entities, components, component values, and so on. It may be overkill, but you can do a lot of other stuff with this data. It also gives some insight in how the Noita engine works, which is quite interesting.
The file will be written to \mods\noita-mapcap\output\entities.json
and will be about 300 MB in size.
Make sure to delete entities.json
when doing a new capture, as the mod will append to it.
The whole export should also be proof against crashes, and noita can be restarted without loss or corruption of the JSON data.
I will probably extend this data a bit, but the basic format will stay the same. Fell free to tell me if you need something specific.
You probably just need to look for entities with a specific filename like data/entities/items/pickup/chest_random.xml
or data/entities/items/pickup/heart.xml
, and then get their transformation data.
Would it be possible to capture coordinates of items like wands during map capture?
Perhaps EntityGetInRadius could be used to output coordinates and item type (wand, spell, chest, etc.) to a file, before or after each screen capture?