[FS19 Tutorial] increase the DensityHeighttypes/dumpable piles

derelky
Posts: 560
Joined: Tue Oct 19, 2010 6:24 pm

[FS19 Tutorial] increase the DensityHeighttypes/dumpable piles

Post by derelky »

Hello,

Here I would like to give you a little instruction how to increase the number of dumpable piles in your map.
  1. First you need to convert the terrainDetailHeight_density.gdm to PNG using the GRLE Converter. Then replace the GDM File in your Map with the PNG
    Then you need to change the terrainDetailHeight_density.gdm entry under FileID in the map.i3d to terrainDetailHeight_density.png
    example:
    <File fileId="251" filename="map/terrainDetailHeight_density.gdm"/>
    change to
    <File fileId="251" filename="map/terrainDetailHeight_density.png"/>
  2. changes in Map.i3d: increase the Channel for the terrainDetailHeight_density Map
    <DetailLayer name="terrainDetailHeight" numDensityMapChannels="11" ...
    change to
    <DetailLayer name="terrainDetailHeight" numDensityMapChannels="12" ...
  3. changes in Map.i3d: in the same row change
    compressionChannels="5"
    to
    compressionChannels="6"
  4. changes in Map.i3d: in the same row change
    combinedValuesChannels="0 5 0;5 6 0"
    to
    combinedValuesChannels="0 6 0;6 6 0"
  5. changes in Map.i3d: in the same row change
    heightFirstChannel="5"
    to
    heightFirstChannel="6"
  6. now save and open the Map with the GE-Editor. check the Log and if it contains no error save your map. Now you can delete the terrainDetailHeight_density.png and change the fileID entry in the map.i3d again
    example:
    <File fileId="251" filename="map/terrainDetailHeight_density.png"/>
    change to
    <File fileId="251" filename="map/terrainDetailHeight_density.gdm"/>
  7. change groundHeightShader.xml:
    in most cases this will be loaded from the original game. To make changes you need to copy it into your map and change the path in map.i3d.
    example entry Map.i3D
    <File fileId="295" filename="$data/shaders/groundHeightShader.xml"/>
    change to
    <File fileId="295" filename="shaders/groundHeightShader.xml"/>

    then open the groundHeightShader.xml in your map and change this entrys
    row 11
    defaultFilename = "../shared/groundHeightNoise.png"/>
    change to
    defaultFilename = "$data/shared/groundHeightNoise.png"/>


    row 192
    globals.groundType *= 31;
    change to
    globals.groundType *= 63;
  8. create a Map Lua (ModMap.lua) Script:

    Code: Select all

    ModMap = {} 
    local ModMap_mt = Class(ModMap, Mission00)
    
    function ModMap:new(baseDirectory, customMt, missionCollaborators)
        local mt = customMt
        if mt == nil then
            mt = ModMap_mt
        end
        local self = ModMap:superClass():new(baseDirectory, mt, missionCollaborators)
    
    
        self.terrainDetailHeightTypeNumChannels = self.terrainDetailHeightTypeNumChannels + 1;
    
        return self
    end
    
    If your Map also uses more terrain angle you should have already have a modmap.lua then you just need to add this line "self.terrainDetailHeightTypeNumChannels = self.terrainDetailHeightTypeNumChannels + 1;"
  9. change the modDesc.xml so the ModMap.lua will be load: (not needed if you already had one.)
    change the corresponding row in modDesc.xml. for example
    <map id="SampleModMap" className="Mission00" filename="$dataS/scripts/missions/mission00.lua" configFilename="maps/mapDE.xml" defaultVehiclesXMLFilename="defaultVehicles.xml" defaultItemsXMLFilename="defaultItems.xml">
    change to
    <map id="SampleModMap" className="ModMap" filename="ModMap.lua" configFilename="maps/mapDE.xml" defaultVehiclesXMLFilename="defaultVehicles.xml" defaultItemsXMLFilename="defaultItems.xml">
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

Thanks very much for sharing this info, it helped me a lot & I can now enjoy all kinds of mods together + seasons without worrying about limits...
mikeboy203
Posts: 10
Joined: Sun Apr 01, 2018 7:32 pm

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by mikeboy203 »

i do it as its said, but for me it gives the error.
Error: GDM file has wrong number of channels (11 should be 12)
DensityMap: failed to load GDM file.
Error: Can't load resource 'C:/Users/Mike/Desktop/FS19_Greenwich/maps/mapDE/terrainDetailHeight_density.png'.
Error: Failed to load terrain detail layer 'terrainDetailHeight'.
Lister471
Posts: 141
Joined: Tue Nov 24, 2015 6:41 pm
Contact:

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by Lister471 »

I am also getting the same, i have followed instructions and done it 5 times, still getting the same error has above.
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

@mikeboy203 & @Lister471 did you guys do step 1 and 2 correctly? Also with step 3 I found on Peter Vill Farm it didn't have the compressionChannels="5" part, so I just added the compressionChannels="6" to the line.

I also got the DensityMap: failed to load GDM file error when I opened the editor the 1st time, but after saving the editor converted the png to gdm and when I opened up the editor again the error was gone and all seems to work well ingame...
mikeboy203
Posts: 10
Joined: Sun Apr 01, 2018 7:32 pm

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by mikeboy203 »

well, i got it kind of working so far, i "borrowed" a gdm file from a map with more than 31 dumptypes.
its log clear but now i get this with the Maizplus mod installed (the reason i wanted to edit the map)

[Imgur](https://i.imgur.com/gY86Ku7.jpg)


it shows as the correct texture in the bucket, but when i tip it, its becomming white.
does dis happen from the "borrowing" part ?
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

mikeboy203 wrote: Sun May 10, 2020 4:10 pm well, i got it kind of working so far, i "borrowed" a gdm file from a map with more than 31 dumptypes.
its log clear but now i get this with the Maizplus mod installed (the reason i wanted to edit the map)

[Imgur](https://i.imgur.com/gY86Ku7.jpg)


it shows as the correct texture in the bucket, but when i tip it, its becomming white.
does dis happen from the "borrowing" part ?
Which fill/dumptype is that exactly? Maybe I must test with a bucket too as I've only tested it with the Easy Development Tool(F11), but everything I tested seemed okay using the F11 mod including MaizePlus
mikeboy203
Posts: 10
Joined: Sun Apr 01, 2018 7:32 pm

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by mikeboy203 »

its the grassilage filltype (the haystack with the pitchfork icon) but it also does this with the maize silage. but not with straw pellets or any seasons or ingame related dumptypes.
i also did spawn it in with Easy dev controls
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

mikeboy203 wrote: Sun May 10, 2020 4:30 pm its the grassilage filltype (the haystack with the pitchfork icon) but it also does this with the maize silage. but not with straw pellets or any seasons or ingame related dumptypes.
i also did spawn it in with Easy dev controls
Well I think then it is because of the "borrowed" gdm cause I just tested again on my Peter Vill edit and all dumptypes including grassilage & maize silage worked 100%. So best is to convert the map you wanna edit's terrainDetailHeight_density.gdm to png using GRLE Converter. Tip: Extract the files in the archive to a folder directly on your c drive, ie: C:\FS19temp . This helps bypassing an error you"ll get otherwise.

Make sure you follow & do all the steps given by @derelky and it should work
mikeboy203
Posts: 10
Joined: Sun Apr 01, 2018 7:32 pm

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by mikeboy203 »

MunrossMods wrote: Sun May 10, 2020 5:20 pm
mikeboy203 wrote: Sun May 10, 2020 4:30 pm its the grassilage filltype (the haystack with the pitchfork icon) but it also does this with the maize silage. but not with straw pellets or any seasons or ingame related dumptypes.
i also did spawn it in with Easy dev controls
Well I think then it is because of the "borrowed" gdm cause I just tested again on my Peter Vill edit and all dumptypes including grassilage & maize silage worked 100%. So best is to convert the map you wanna edit's terrainDetailHeight_density.gdm to png using GRLE Converter. Tip: Extract the files in the archive to a folder directly on your c drive, ie: C:\FS19temp . This helps bypassing an error you"ll get otherwise.

Make sure you follow & do all the steps given by @derelky and it should work

thnx for the tip. but how do i convert the PNG back to a gdm ?.
and if i have done step 1 till 5.
how to i exactly peform step 6 ? do i just save the i3d in Notepad++ ? because if i do that and open it in GE it gives me the Error
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

The process is as follows:
1. You create a png from the gdm file using the converter. put the png in the same path as the original gdm & delete the gdm version so only png is left.
2. Change the filetype of the said file inside the map.i3d from gdm to png so the editor knows to load it using notepad++ & be sure to save before exit.
3. Once you save the map in the editor it converts the png to gdm itself.
4. You can leave the filetype inside the map.i3d as png or change it back to gdm, both should work just fine.

The only error you should/can get when you load the map up 1st time in GE is "DensityMap: failed to load GDM file", but like I said if you save the map & it converts the png back to gdm that error should't show up the next time or ingame...
Lister471
Posts: 141
Joined: Tue Nov 24, 2015 6:41 pm
Contact:

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by Lister471 »

Ok deleted everything and started again.

I converted the terrainDetailHeight_density file to png and deleted the old one.

I edited all the lines in the i3d file saved and then loaded it into the editor.

I am still getting the error:
Error: GDM file has wrong number of channels (11 should be 12)
Error: DensityMap failed to load GDM file.
Error: Can't load resource 'C:/Users/paul1/Downloads/FS19_Shamrock/modMap/terrainDetailHeight_density.png'.
Error: Failed to load terrain detail layer 'terrainDetailHeight'.

Has the editor is not able to load the file when i save it fails to create the new terrainDetailHeight_density file. Also it remove the line

<File fileId="207" filename="modMap/terrainDetailHeight_density.png"/>

From the i3d file also replaced the other line with this
<FoliageMultiLayer densityMapId="207" numChannels="10" numTypeIndexChannels="5" compressionChannels="5">
User avatar
MunrossMods
Posts: 8
Joined: Sun May 10, 2020 4:25 am

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by MunrossMods »

Lister471 wrote: Sun May 10, 2020 7:39 pm Ok deleted everything and started again.

I converted the terrainDetailHeight_density file to png and deleted the old one.

I edited all the lines in the i3d file saved and then loaded it into the editor.

I am still getting the error:
Error: GDM file has wrong number of channels (11 should be 12)
Error: DensityMap failed to load GDM file.
Error: Can't load resource 'C:/Users/paul1/Downloads/FS19_Shamrock/modMap/terrainDetailHeight_density.png'.
Error: Failed to load terrain detail layer 'terrainDetailHeight'.

Has the editor is not able to load the file when i save it fails to create the new terrainDetailHeight_density file. Also it remove the line

<File fileId="207" filename="modMap/terrainDetailHeight_density.png"/>

From the i3d file also replaced the other line with this
<FoliageMultiLayer densityMapId="207" numChannels="10" numTypeIndexChannels="5" compressionChannels="5">
There is your problem, you mustn't change the "FoliageMultiLayer" line, only the "DetailLayer" line for "terrainDetailHeight"...Just edited the Shamrock map myself and all works good except for the "Error: DensityMap failed to load GDM file" ...

Here is the line I used in the Modmap.i3d...

<DetailLayer name="terrainDetailHeight" densityMapId="207" numDensityMapChannels="12" compressionChannels="6" cellSize="8" objectMask="16711935" decalLayer="2" materialId="698" viewDistance="75" blendOutDistance="5" densityMapShaderNames="blendMap" combinedValuesChannels="0 6 0;6 6 0" useInterpolatedDensityMap="false" heightFirstChannel="6" heightNumChannels="6" maxHeight="4"/>

PS. Remember to delete the png file in the folder after the gdm is created after saving
Lister471
Posts: 141
Joined: Tue Nov 24, 2015 6:41 pm
Contact:

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by Lister471 »

I was editing that line sorry pasted the wrong line in after saving it deleted them from the i3d. so got them from a backup but copied the wrong one.

I thank you for your help but giving up for today, guess i will have to wait for Sandy bay which i don't really like to be honest but don't like any of the none mod hub maps in the discord either lol.
Bogy12
Posts: 62
Joined: Tue Jul 02, 2019 1:13 pm

Re: [FS19] increase the DensityHeighttypes/dumpable piles

Post by Bogy12 »

Hi everyone. I just made a video on increasing the number of dumpable piles with the help from this topic. Bear in mind, english is not my main language and the video has some cuts, but everything is there.

Here is the link:

https://www.youtube.com/watch?v=qLjk0MdIWfA

You can skip to the 7:35 for real instructions. I hope you guys like it. Also, it explains what you need to do in order to avoid errors in Giants Editor after you create .png file (Step 6 in this topic).
Post Reply