It is possible to create a clone of an existing interior (CMloArchetypeDef) inside of a new ymap (CMloInstanceDef) and stream in a FiveM resource like any other map.
Here is your suggested example above that demonstrates how to create a clone of Trevors trailer. I placed this into a trailer in the biker park in Sandy which you can teleport into at coords (11.60689, 3697.542, 40.73159)
This was a quick job, I’m aware you walk out of the door from the inside through the exterior trailer wall and watch the door close and disappear back inside of the wall. You cannot use the door to get in. Changes like this are more complicated and require time and effort, most times editing models or customizing the CMloArchetypeDef itself, though most anything is possible if you work towards it.
1.) Your resource needs to stream a ymap that will place the interior at your desired location / rotation. It is important that you have the streaming extents, entities extents, position, and rotation correct for this or your interior will not load. I used CodeWalker and OpenIV to create the below ymap.
interior_trevorstrailertidy.ymap
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CMapData>
<name>interior_trevorstrailertidy</name>
<parent/>
<flags value="1"/>
<contentFlags value="73"/>
<streamingExtentsMin x="-23.09499000" y="3663.21400000" z="19.32845000"/>
<streamingExtentsMax x="44.88948000" y="3729.38700000" z="62.78938000"/>
<entitiesExtentsMin x="2.46752700" y="3688.77600000" z="39.32845000"/>
<entitiesExtentsMax x="19.32696000" y="3703.82400000" z="42.78939000"/>
<entities>
<Item type="CMloInstanceDef">
<archetypeName>V_TrailerTIDY</archetypeName>
<flags value="1572864"/>
<guid value="1683234893"/>
<position x="11.80372000" y="3695.67400000" z="39.32845000"/>
<rotation x="0.00000000" y="0.00000000" z="-0.98532120" w="0.17071090"/>
<scaleXY value="1.00000000"/>
<scaleZ value="1.00000000"/>
<parentIndex value="-1"/>
<lodDist value="20.00000000"/>
<childLodDist value="0.00000000"/>
<lodLevel>LODTYPES_DEPTH_ORPHANHD</lodLevel>
<numChildren value="0"/>
<priorityLevel>PRI_REQUIRED</priorityLevel>
<extensions/>
<ambientOcclusionMultiplier value="255"/>
<artificialAmbientOcclusion value="255"/>
<tintValue value="0"/>
<groupId value="0"/>
<floorId value="0"/>
<defaultEntitySets/>
<numExitPortals value="6"/>
<MLOInstflags value="0"/>
</Item>
</entities>
<containerLods/>
<boxOccluders/>
<occludeModels/>
<physicsDictionaries>
<Item>V_TrailerTIDY</Item>
</physicsDictionaries>
<instancedData>
<ImapLink/>
<PropInstanceList/>
<GrassInstanceList/>
</instancedData>
<timeCycleModifiers/>
<carGenerators/>
<LODLightsSOA>
<direction/>
<falloff/>
<falloffExponent/>
<timeAndStateFlags/>
<hash/>
<coneInnerAngle/>
<coneOuterAngleOrCapExt/>
<coronaIntensity/>
</LODLightsSOA>
<DistantLODLightsSOA>
<position/>
<RGBI/>
<numStreetLights value="0"/>
<category value="0"/>
</DistantLODLightsSOA>
<block>
<version value="0"/>
<flags value="0"/>
<name>interior_trevorstrailertidy</name>
<exportedBy/>
<owner/>
<time/>
</block>
</CMapData>
2.) Your resource needs to stream a _manifest.ymf file to tie your interior clone to it’s ytyp file that contains the CMloArchetypeDef.
_mainifest.ymf
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CPackFileMetaData>
<MapDataGroups/>
<HDTxdBindingArray/>
<imapDependencies/>
<imapDependencies_2>
<Item>
<imapName>interior_trevorstrailertidy</imapName>
<manifestFlags>INTERIOR_DATA</manifestFlags>
<itypDepArray>
<Item>v_int_26</Item>
</itypDepArray>
</Item>
</imapDependencies_2>
<itypDependencies_2/>
<Interiors/>
</CPackFileMetaData>
3.) Your resource needs a __resource.lua file to declare it as a map
__resource.lua
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
this_is_a_map 'yes'
4.) Your resource needs to toggle the ymap on and off as you enter and exit it (teleport). If you just want the ymap to load on it’s own and stay loaded you can change in the ymap
<flags value="0"/> instead of <flags value="1"/>
Toggle On if flags value=“1”
REQUEST_IPL("interior_trevorstrailertidy")
Toggle Off if flags value=“1”
REMOVE_IPL("interior_trevorstrailertidy")