Streaming Props for YMAP

So using this tutorial: [How-to] Stream addon props

Trying to simply stream an island for use in a YMAP. Using this as a resource.lua:

resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"

data_file 'DLC_ITYP_REQUEST' 'stream/props.ytyp'
files {
	'land_island1.ydr',
}

After trying many different resource.lua configurations I cant seem to get it working.

What I have tried:

  • Different resource.lua configs
  • Different flags in YMAP
  • New YMAP with different locations
  • Turning off all other map mods
  • Replacing a default YMAP island with a modded one

Anyone have any ideas on if streaming custom props is working?

Update 1:

Confirmed the prop is loading in but the YMAP refuses to load the object at the desired point.

a) why the fuck are you listing the file in files?
b) you forgot a this_is_a_map 'yes' since you’re using a #map file

Yeah did that, seems to be that this particular set of props is somehow not compatible with YMAPs which is confusing to me, but I think that is the answer.

Listing in files to force download it to client, have not tested whether this has affected it.

Mod creator:

about update yes and no, i give up the update of this mod for several reason ( bug, non optimised prop, etc) but we plan to start a new addon prop mod with optimisation and usable in ymap 
to change texture of the prop i'm using 3d tool, here it was zmodeler but now i'm using 3ds gims evo and the terrain can be more detailled ( better blend possibility)

What I did was pull out the props I wanted then used a YTMP creator tool listed in the thread above to generate that to reduce clutter streamed to client.

Here is the updated resource.lua:

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
this_is_a_map 'yes'

data_file 'DLC_ITYP_REQUEST' 'stream/props.ityp'

files {
	'island.ydr',
	'props.ytyp',
	'_manifest.ymf'
}

Only reason I am force loading these under Files is because I was trying everything.

@JakeK

Ever got this to work? Any tips

The land_island2 model itself seems to be an issue. I had to remodel it and create a new ytyp file to get it to load properly in FiveM. You’ll need to create a ymap to place the object in, stream all the files in the git folder as well as add the ytyp file and data_file reference to your _resource.lua file. I’m assuming you already know how to do all this from the above posts.

How do you get this to work? Mine won’t show the textures of the models, but I can walk into them like they are invisible.

@concordzx - I only looked into the one model in that custom props addon pack that @JakeK was trying to get streamed. The model had issues running in FiveM so I do suspect other models in that pack may be an issue. If you let me know which specifically you’re trying to work with I can take a look at them and see if they are fixable like the land_island2 model was.

1 Like

@anders Starting with the basic road props, road1_straights and road1_straightm. What exactly are you doing to make them work? I can open the .ydr file and see the texture with a texture editor, but when I stream it to the server it is invisible.

I recall editing the model in 3DS MAX / GIMS Evo and removed the bones that were included, then splitting the game mesh in half because it wouldn’t export properly due to the mesh size. I’m not sure though if that work was what fixed it or if it was just recreating the ytyp file or both.

When looking at the props using OpenIV’s model viewer the textures don’t appear either. I was able to export one of the ydr files as openFormat and open it with 3DS Max and GIMS Evo. However, I am not very familiar with 3D modeling software so I’m not so sure how I can fix the texture issue.

This appears to be the same problem I was having with the island2 model, the game just doesn’t like the structure with bones and skins in them. I was able to get these two working by following the below process, I hope this helps. I will also upload the fixed models to my GitHub later on today.

  1. Export YDR from OpenIV into .ods
  2. Import .ods file to 3DS MAX with GIMS Evo and when it asks about textures point it to the folder like below
Sceenshot

image

  1. Delete everything except for the road1_straights_high that has the textures embedded, rename to road1_straights
Sceenshot

before
image
after
image

  1. Delete the skin and the game mesh from road1_straights by right clicking each and choosing delete
Sceenshot

before
image
after
image

  1. Clone a copy of road1_straights, rename it to road1_straights_COL. Do this via right click, clone from left nav.
Sceenshot

image image

  1. Use material editor, click on standard, then on GIMS V Material. Pick hard terrain and concrete or something custom if you’d like and then click to assign material to selection. You should have your _COL model selected in left nav before all these steps.
Sceenshot

image

image

  1. Create Model for collision composite, name it COL, drag the the road1_straights_COL onto it
Sceenshot

image
image
image

click anywhere in the scene view after selecting composite from gims menu and then rename the composite item in nav before dragging the _COL model onto it. When finished it should look like this below.

image

  1. Add a collision mesh to the road1_straights_COL and check off under flags1 (map animal, map cover, map dynamic, map vehicle, map weapon), uncheck these under flags2 (Foilage, everything starting with Map, Object env cloth, Pickup, Projectile, Smoke, Unknown, Unsmashed, Vehicle box) though I’m not really sure if you need to uncheck any of them so you could play around with these.
Sceenshot

image

image

  1. Add a model object, click anywhere in the scene, rename it to road1_straightm, drag both the COL and the textured model onto it
Sceenshot

image
image

when you’re finished it should look like this in your left nav
image

  1. Add a new game mesh under models to the textured object road1_straightm (not the model at the top of the tree)
Sceenshot

  1. Export from GIMS Evo into a folder called Fixed or something so you have the starting point and ending point seperate in case you want to start over again and reexport overtop of your fixed copy.
  2. Import back to OpenIV (You should still only see the brownish texture here and on Bounds you’ll see a mesh of black and gray, don’t worry about that).
Screenshot

image
image

  1. Use ytyp creator and open the fixed .odr file, then calculate BB’s, close odr window and then import the BB’s. Then create a new .ytyp.xml file, pull this into OpenIV or copy the contents into an existing .ytyp file you are already using.
Screenshot

image

  1. Create a _manifest.ymf file that contains the name of ymap you’re going to include this object in that references your ytyp file as a dependency.
Screenshot

image

  1. Export it all into a stream folder, should have your ymap, your ytyp, your ytd, and your _manifest.ymf
Screenshot

  1. Create _resource.lua that declares a map and has pointers to your stream folder ytyp file. In this case mine looks like this
Screenshot
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

this_is_a_map 'yes'

files 
{
'stream/custompropsaddon.ytyp',
}

data_file 'DLC_ITYP_REQUEST' 'stream/custompropsaddon.ytyp'

…

In Game Screenshot

5 Likes

@anders Amazing! thank you so much for this tutorial. I got the road props working with only a few weird glitches. I may not have made the manifest file correctly because fivem crashes with mine, but it worked after I removed it. Not sure if this caused the glitchiness but when I stand close to the prop and look around the textures flicker on and off, only for the addon prop. Also, if the addon prop is placed too far under the map it’s texture don’t load. This doesn’t happen to the normal props.
Anyways thanks again for the help, you are awesome! :slight_smile:

That’s weird, tbh I don’t know what is actually ‘required’ insofar as __resource.lua additions, manifest.ymf, etc. I just follow the same process that worked for me the first time I got it to work :smile: Happy to help!

The mainfest file actually needs to be created within OpenIV, so that may be your issue. What I did was export an existing manifest file from another rfp file and then imported it into my DLC, edited it and cleared the contents, then replaced the contents with what I needed in mine. I’m not sure if there’s a way to actually ‘create’ one. I know you can’t just use notepad and pull it into OpenIV (at least I think you can’t).

I fixed the manifest file so it loads without crashing. Now the road I added is still glitching. When I walk on top of it and look a certain direction it disappears. And when the road is vertically poking upwards through the map(underneath the map), the collision works but texture does not appear. The normal props don’t behave this way, maybe I missed something in your procedure?

edit: Textures disappear when the center point of the object is not visible on the screen. So trying to look at just the corner of the road without the center makes it disappear. That might be why is doesn’t show under the map as well.

I can’t seem to reproduce on my end, you try to stream these and see if the issue is still happening in your map? That would show whether issue is with models you edited if problem is gone or with how you’re placing them in your ymap if problem keeps happening.

I didn’t do anything funky with the roads in the ymap I made as a test, just laid them flat on the ground at legion square and there was no texture glitching, collisions worked, etc.

There are these values in the ytyp file you could try adjusting higher to see if that helps

<hdTextureDist value="95.13722000"/>

There are also these values in the ymap file you could try adjusting higher to see if that helps

<lodDist value="200.00000000"/>
2 Likes

Oh wow ya the problem was in my .ytyp file. The generator I was using didn’t set the “bb” values in the file. I tried the same one you use from here https://www.gta5-mods.com/tools/ytyp-generator-using-odrs. And it all works now. :slight_smile:

If you’re using the YTYP creator program in my screenshot above you have an option to calculate and import the BB’s. Just have to open your edited .odr file with it, then calculate bb’s, then close, and then in ytyp creator window pick option to import BB’s and it will bring all your models info into the form. I’ll update my screenshots above to reflect that.

@anders How were you able to export land_island1? That prop, and other large ones like misc_carpark1 seem to be too big to export this way. Attempting to export carpark1 resulted in Gims Evo error for collision mesh exceeding max vertices. And trying to export build_dt5b for example seems to make the program freeze without error. Is there any way to get around this?