[SOLVED] [QUESTION] Duplicatiing Interiors / Instacing

Well surely to fix the weather issues you can use a event which stops you from being time synced and sets time and weather and I know I could easily implement that with my time and weather sync if it would fix it.

It works for the lighting with setting the time, but due to how stupid GTA is with the puddles after raining, even setting weather and all that if it was running everything will still be flooded for a bit. Not a huge issue, just a minor annoyance

Didnā€™t think of that.
I just need the shell to have collisions which I know you said how to do but it has confused the hell out of me because I have never done collision stuff or 3D max and I tried the other way but I canā€™t get GIMS Evo to work so if you have the shell with collisions would you mind sending it to me? If not ill continue to try and do it myself but I do not know what to do or where to look for help doing it.

This is what I have, warning this was after trying to some things to see if I could add something to block the rain from hitting so if you go noclip outside of it ā€¦ youā€™re going to see a box with my Wallpaper as the texture :joy: So use at your discretion lmao.

Need to make sure whatever resource youā€™re streaming it from has ;

this_is_a_map 'yes'
data_file 'DLC_ITYP_REQUEST' 'stream/playerhouse_tier1.ytyp'

In the manifest file. This is the function that Iā€™m spawning it with (Along with a couple other props in it)

function CreateBasicHouse(spawn)
    local objects = {}
    local shell = CreateObject(`playerhouse_tier1`, spawn.x, spawn.y, spawn.z, false, false, false)
    FreezeEntityPosition(shell , true)

    table.insert(objects, shell)

    local dt = CreateObject(`V_16_DT`, spawn.x-1.21854400, spawn.y-1.04389600, spawn.z + 1.39068600, false, false, false)
    table.insert(objects, dt)
    
    local curts = CreateObject(`v_16_midapt_curts`, spawn.x-1.96423300, spawn.y-0.95958710, spawn.z + 1.30092700, false, false, false)
    table.insert(objects, curts)
    local hall = CreateObject(`V_16_mid_hall_mesh_delta`, spawn.x + 3.70593000, spawn.y - 5.80020100, spawn.z + 1.32592700, false, false, false)
    table.insert(objects, hall)
    --local hall = CreateObject(`v_16_mpmidapart09`, spawn.x + 0.8220215, spawn.y + 2.29612, spawn.z + 1.140782, false, false, false)
    local bedDelta = CreateObject(`v_16_mid_bed_delta`, spawn.x + 7.951874, spawn.y + 1.042465, spawn.z + 1.284023, false, false, false)
    table.insert(objects, bedDelta)

    SetEntityCoords(PlayerPedId(), spawn.x + 3.69693000, spawn.y - 15.080020100, spawn.z + 1.5, 0, 0, 0, false)

    return objects
end

(The function is returning a list of all objects spawned so I can delete them as needed when the client leaves that interior super easily)

playerhouse_tier1.zip (1.9 MB)

Awsome I will give this a try later or tomorrow and will get back to you but I am sure it will work. Thanks for the hlep man I appreicate it.

Inc Wall-O-Text, sorry :stuck_out_tongue:

Alright, so getting a hang of this stuff more. Once you get a rough idea how to work around in 3ds itā€™s not too terribly hard. Everything that you need to edit the models can be exported using OpenIV and then using GIMS Evo import it (If you have 3ds 2017 - 2020 download it from here)

Adding another archive thatā€™s got everything for this first house (OpenIV files, 3ds project, lua file for creating the objects, and the files that would be streamed), though itā€™s only the bare shell with as few props as needed to make it not awful. Thereā€™s 2 edited models that I either removed or added lights to (bed_delta removed lights for laps, curts I added lights to the overhead lights). Also went through the pain-staking process of removing faces for collision around the kitchen area, so the possibility for creating a great shell is definitely there

In terms of file size streaming, once you have several models done it may be more than what I would be just creating custom interiors and use them in mlo instances ā€¦ but as far as versatility and ease to add this is definitely leaps and bounds better. Just wish I could figure out the camera issues if you donā€™t go to around the -100 Z-level to spawn them.

Guess Iā€™ll be starting the long process doing this for other interiors, le sigh ._.

Because Iā€™m bad at explaining it in text, hereā€™s me poorly explaining it in video form. Enjoy.

Couple things to note that I misspoke about or ended up finding differently:

  • On the selection part in 3DS, if you intentionally have multiple items added to the project (Like the one in the attached projects here), youā€™ll have more than 1 item to select. Thatā€™s fine, as long as the collision stuff isnā€™t itā€™s own youā€™re good.
  • There is a way to add all the models into the actual object so when you spawn it youā€™d in theory spawn all the items with it. But thatā€™d make that object ungodly large. Wouldnā€™t recommend (Outside of things like trim / things cover gaping holes showing under the map)
  • For whatever reason, some things arenā€™t correctly placed with the offsets from the YTYP. Prime example is the hall mesh in the attached part for the first house. The offset from the original YTYP is + ~1 to Z but to get it correct had to set it to ~1.29. Requires some tweaking but nothing major.
  • Thereā€™s some parts in the collision that is made into the overall shell of it, you can edit it but it is a royal PITA. But if you want to do it, click the shell collision object, in one of the viewports right click it and convert to editable mesh. Then on the side youā€™ll have an editable mesh part, expand it and click faces. Then GG enjoy hating your life. (There could be a better way to edit that, I have no idea. Literally like day 3 of using 3ds)
  • The YTYP file can literally be stripped of most stuff outside of that Base Archetype Definition (As seen in the playerhouse_tier1.ytyp in attached archive), but for whatever reason objects from that interior that are spawned through CreateObject ā€¦ will just not appear if their archetype isnā€™t added to that ytyp. Honestly, no idea. But other items donā€™t seem to be affected by it, or at least my drop system still spawns backpacks so who knows tbh.

Anyways, happy modding! Only real downfalls with this now is some odd collision stuff with stairs and the puddles from when it rains. But having on-the-fly interiors is worth dealing with those minor annoyances, imo.

interiors.zip (6.3 MB)

2 Likes

Thank you so much man you have really helped me in learning some tiny things in 3dmax and all kinds of stuff to do with interiors and I really appreicaite it. Have a good day and thanks for the consistent great help and responses.

This was definitely helpful. Thank you.

This did work perfectly but I have just got around to starting to implement this and I am not sure if anyone else is trying with the motel room but I cant seem to get the motel door object to spawn through simple trainer, code or anything. I have tried quite a few things like adding it to the motel but that just puts it at the center of it when I spawn it and I was wondering if anyone had any pointers on how I can get this door object to spawn in the right place. I am not sure what to do.

And yes the object is already in the ytyp and I have not renamed it so this is me just being a noob and missing something or doing it wrong :laughing:

Yeah that Iā€™m not sure, not sure if thereā€™s something special with those doors. I know messing around with the Milo instances if you spawn a ped close enough the stupid things open so there may be something with them that prevents it from being spawnable.

Will try to look into it this weekend if you havenā€™t gotten an answer already.

UPDATE: So got the colission stuff done, and it looks like itā€™s not even able to spawn in the door which is why itā€™s not showing up. Seeing if I can just embed the object into the shell but itā€™s being a real PITA

OK, got some sort of colission embeded and just added the door model into the overall shell that is spawned so you donā€™t have to mess with trying to spawn it as an object since I couldnā€™t get it to work. Attached it below.

And for the curtain & window;

local curtains = CreateObject(`V_49_MotelMP_Curtains`, spawn.x + 1.55156000, spawn.y + (-3.83100100), spawn.z + 2.23457500)
local window = CreateObject(`V_49_MotelMP_Curtains`, spawn.x + 1.43190000, spawn.y + (-3.92315100), spawn.z + 2.29329600)

playerhouse_hotel.zip (65.8 KB)
playerhouse_hotel_full.zip (66.6 KB) (Has Colission For Objects)

1 Like

Hello do you know where I can find 3ds for free legally please? Because given the price of the license I could never get it otherwise

You can get a student edition using your school which worked for me but except from that no there is not a option legally.

1 Like

Okay not being a student I could not have a license so bad too bad for me thank you for your answer is nice

this is nice, but how to add interior like furniture or storage?

When I create the shell of an interior and try spawning props, some of the props are placed on the shell correctly, but some are offset. The offset values for each CEntityDef inside the interior in the ytyp file are exactly the same offsets when spawned in.

These are some screenshots:
(Red arrows are showing props that spawned correctly)

Has this issue happened to anyone?