The Gold Road Chapter – which includes the Scribing system – and Update 42 is now available to test on the PTS! You can read the latest patch notes here: https://forums.elderscrollsonline.com/en/discussion/656454/
Maintenance for the week of April 22:
• PC/Mac: NA and EU megaservers for patch maintenance – April 22, 4:00AM EDT (08:00 UTC) - 9:00AM EDT (13:00 UTC)
• Xbox: NA and EU megaservers for patch maintenance – April 24, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)
• PlayStation®: NA and EU megaservers for patch maintenance – April 24, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)

What is the intended purpose of the API function HousingEditorGetFurnitureLocalBounds?

justinsane16
justinsane16
Soul Shriven
From the document https://wiki.esoui.com/API, it lists the function
HousingEditorGetFurnitureLocalBounds(furnitureId)
and returns the
minLocalX,minLocalY,minLocalZ,maxLocalX,maxLocalY,maxLocalZ
.

How is this supposed to be used, what potential purposes does it serve?

I cannot make sense of it from just looking at the numbers. It doesn't seem to be centred around a local (0, 0, 0) point.
  • Baertram
    Baertram
    ✭✭✭✭✭
    It sounds like it will return the localized x, y and z position (boundaries) of that item in a house so that you are able to know how big it is =difference between min to max.
    May only work inside the furniture edit mode and placed furniture, in a house.

    Maybe this esoui forum helps too:
    https://www.esoui.com/forums/showthread.php?p=35916

    The best way to understand the functions often is to search them in the esoui vanilla lua code to see how ZOs uses it.
    Edited by Baertram on January 28, 2022 9:39AM
  • justinsane16
    justinsane16
    Soul Shriven
    Thanks for looking into it Baertram. I was able to finally understand unlike WorldBounds its measured in cm not meters.
    The best way to understand the functions often is to search them in the esoui vanilla lua code to see how ZOs uses it

    Could you explain where to find this lua?
  • M0R_Gaming
    M0R_Gaming
    ✭✭✭
    You can either find the source code by using a tool like Black Book Browser to extract the files yourself, or by looking at the esoui github

    That being said, I just looked through the source files and I couldn't find it myself. However, I also searched for it in essential housing tool's code (a housing addon), and found an instance where it was being used. Line 4654 in housing.lua.

    EHT uses it as a way to find the bounding box of the item. For example, if an item is 1 meter in X, 2 meters in Y, and 3 meters in Z, and is placed at (4,3,2), then the output of the API function will be:
    minLocalX=4, minLocalY=3, minLocalZ=2, maxLocalX=5, maxLocalY=5, maxLocalZ=5
    
    It can then be used to find the dimensions of the box, by doing X = maxX-minX and so on. In addition, EHT uses it to show a physical box in the world around where the item is.

    In addition, EHT also multiplies each of the values by 100. No idea why, maybe its normally in cm instead of meters?

    From what I can tell however, the function will only get the bounding box, so if an object is rotated 45 degrees, some parts of the bounding box will be empty of contents, as the bounding box represents the maximum space being used by the object.
    Edited by M0R_Gaming on January 29, 2022 7:19AM
    • PC/NA - PvP/PvE AD Magsorc main
    • Former Emp, All HMs but DSR
    My addons
  • Baertram
    Baertram
    ✭✭✭✭✭
    The code can be downloaded as files as well here:
    https://www.esoui.com/downloads/info1213-ESOUI-TheElderScrollsOnlinesourcecode.html

    Or you can have a look at the files at uesp as well:
    https://esoapi.uesp.net/current/src/luadir.html
Sign In or Register to comment.