Interior exit portals are not teleports. Its cords defined in interiors ytyp corresponds to x,y,z of 4 corners. Its used for windows or doors which makes outside world visible inside interior thru windows/doors or interior visible while standing outside thru windows/doors:
To understand how to set portal you can use existing interior (like v_int_3 – it got one door and three windows) take cords for portal from v_int_3.ytyp and use them in 3dsmax (IMPORTANT – use always collision not shell):
If you want to edit existing vanilla interior (adding doors for example) you need to edit shell of interior, its collision and (if its door to outside) exterior building with its static collision (this is in part 1 tuto) add portal for this door in ytyp place whole interior by ymap or edit existing ymap by adding count of exit portals +1 (if interior stays at its place)
In 3dsMax create plane with 1x1 segments:
Place it at place where should be doors (or window if you making one)
Then change to editable mesh or poly and select vertex (there will be vertex at each corner)
<corners content="vector3_array"> corresponds to 4 corners for that custom door what you made depends hows you looking at door, cords counted will be:
If you looking at door outside room – Right Down, Right UP, Left UP, Left Down
IMPORTANT to take coords in 3ds always use interiors collision, not shell!
To add portal copy existing one in ytyp, then edit it:
and add x,y,z values from plane corners correspond to above screens.
For flag use 8256 for doors or 9 for window (I don’t know yet what each flag do)
Outside is always room 0 other numbers for rooms are correspond to each room in interior and are set in interior collision.
When you added 4corners to portal you need add 2 things in ytyp:Number of portals for room which got this new door +1
<portalCount value="add here +1"/> <-you add here depend how many new portals created
Same thing for limbo:
You add here number of portals depend how many new portals created (if you created one door and two windows will be add +3)
and in ymap which you placed whole interior
<numExitPortals value="add here +1"/> <-you add here depend how many new portals created
At part 3 I will show how to create custom interior as MLO instance for custom room in custom house in custom DLC.