PDA

View Full Version : A way to get Occluders from Image Node?



luispenya
November 26th, 2022, 11:46
Hi,

I was developing a specific script to extract in runtime the occluders information from an image (map) and I want to know if there is a way to get the "layers" from an Image node type. The getChild("layers") for that node returns nil and I can't find a way to address properly the layers tag in the database (taking into account that the image can be in a category).

Thanks

bayne7400
November 26th, 2022, 13:36
I do not think you can. I posted a similar question about writing lighting to the DB via script.

jharp
November 26th, 2022, 18:26
Nope layer information is locked away. No API to access it. My FoWEnhanced does do some magic with the FoW info but it is not something easy to accomplish and has some drawbacks since it is relatively slow to do work it needs to do.

Jason

jharp
November 26th, 2022, 18:27
Hi,

I was developing a specific script to extract in runtime the occluders information from an image (map) and I want to know if there is a way to get the "layers" from an Image node type. The getChild("layers") for that node returns nil and I can't find a way to address properly the layers tag in the database (taking into account that the image can be in a category).

Thanks

What were you hoping to do with the layer data?
Jason

bayne7400
November 26th, 2022, 19:07
Nope layer information is locked away. No API to access it. My FoWEnhanced does do some magic with the FoW info but it is not something easy to accomplish and has some drawbacks since it is relatively slow to do work it needs to do.

Jason

Did you figure out how to edit the DB for the FOW info?

jharp
November 26th, 2022, 19:30
Did you figure out how to edit the DB for the FOW info?

In a round about way yes. If there are people who want to manipulate the layer information I'm willing to write other extensions that can do particular tasks. Let me know what you need and I'll see if its something that can be done. However, the method I use is not elegant and certainly has the potential to corrupt things so the simpler the task the better. Let me know and if I think it is not a good fit I'll let you know.

Jason

luispenya
November 27th, 2022, 11:06
The idea is to extract the occluders information to be able to reconstruct logically the obstacles in a way that our engine can treat them to create AI controllers to play. We get the information about the players and the overall terrain configuration (length, width, hexsize...) but I want to get the occluders.
I can manipulate directly the XML files, but I don't find an accurate mechanism to locate the XML files given an image...