Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello,

By distance textures I assume you are referring to foliage distance textures? I'm not sure that I've ever seen a distance texture limit in FS22. One thing you could do if you wanted to reuse some textures is to save the common ones to a shared path and reference the same path from multiple foliage xml files.

Some limits, however, are just hard limits beyond the scope of anything a mod could do. For example, infoLayers have a hard set limit of 255 colors because the bitmaps they use for painting the information only support 255 different color values

yes, I mean foliage distance textures and I have met the limit at 255.   I’ve started to go through and reference them to the same locations but I will eventually run out of room again.  

And for some reason it won’t let me reference them back to the $data path of foliage distance textures.  

It's because of the way those load. They are loaded directly by the engine and they are relative to the location of the foliage i3d or xml I believe. Whether they are in the map or in the game install location ($data), however, the limit you are hitting would be the same. I will ask a few people who have a lot of different crops in their maps if they've ever hit a limit like that. This is the first I'm hearing of it. With a limit of 255 that really seems like the hard cap of 255 values that can be painted on a single info layer. I'll see what I can dig up.

Sounds good.  Thanks.  I’ve reached the limit cause I’ve been adding new crops to my map and I probably have over 50 crops added now so obviously when you have that many I’ve encountered the error of distance textures limit maximum of 255 reached.      

One thing you could try is just not having distance textures for some of the small or stubble states. Just for the big green and maybe harvest states. You just leave that distanceMap="" part out of the <foliageState> sections. The reason I suggest that is because, with just the 31 max vanilla crops at 15 available growth states per crop (again vanilla). You would end up with 465 textures if they were all defined.

Might be something where you have to do the balancing act. More crops and less distance textures or less crops and more distance textures. Again, though, I'll ask around and see what I can find out.

I’ll look into it.  One thing I have been doing is if it’s say durum wheat.  I will just create it in the map and direct it to $data wheat xml and name it as wheat2 in foliage.  Then add it in filltypes as wheat2 and name it as Durum.  Then it shows up as durum in the game but everything texture wise is base game wheat.    This saves me from having new distance textures for every new crop that is basically the same as a base game crop like durum is.  
It looks like that’s how they did Edgewater sask for the swathing crops   They just added then as like wheat2 or canola2 and directed them to $data path  

What I haven’t tried yet is when I add it to the map if I can path durum to the $data wheat XML and id number and under foliage add it as durum but leave the id number the same as the base game wheat id.  

I think I’ve narrowed it down to the fact that when you add a new crop and add the crop xml file.  That xml file calls for usually 6 different distances texture files.   So after you add so many crops you reach the max of 255.  The only workaround I have figured out is to direct a new crop to a previous xml in the map.  Like if I’m adding durum, in the map I direct the xml path to $data wheat.xml.  And under foliage I can label it durum but I need to keep the same ID number as wheat has in the map.   This will then call for textures that are already in the game and will not add anymore to my limit.  It doesn’t seem to cause any issues yet, however I don’t know if that is a good way to structure it.  

Another thing you could try is to eliminate so many distance textures per crop. All you really need is a green, brown, and dead distance texture. Also, for certain "flowering" stages of certain crops (like yellow for canola, etc). The distance layers are all optional, so you can make them whatever you want.

At 3-4 textures per crop, you could have 60 - 70 crops on the map which is double what a vanilla map supports. It must be making a texture array for reused texture files to only count as 1. I'm still waiting to hear back from a couple people, but it's not an issue many have run into. In fact, you're the first that's ever mentioned it to me.

I would just need to go into the crop xml and see which ones are brown green and dead and delete the rest out of the xml and then delete them out of the distance folder too correct?    I think the issue is cause I have 57 crops on my map and I’m tryin to max it out at 64 I believe is the max.  

Right. There are usually 2-3 green ones, potentially a colored one for flowering stages, a brown one for harvest ready, and a withered one. You really don't need all of the green ones. Those are just different shades of green to match the shade of green in the crop itself. For example, if you had distance2, distance3, distance4 all green, then distance5 brown, and distance6 withered. You could just rename and reference them to distance2 = green, distance3 = brown, distance4 = withered. and save 2 slots per crop done like this.

Also, some states like stubble could just use the green or brown texture depending. A lot of crops leave so little stubble you could just remove the distanceMap attribute from those altogether and have it show the terrain texture in those cases.

And yes, 5 channels = 31 crops (plus 0 or no crop), 6 channels = 63 crops (plus 0 or no crop). Also, all crops by default have 15 total growth states available (though many of them are not used by default).