[FS17]Tutorial - Increasing numer of field directions

User avatar
Azfoor
Posts: 325
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Azfoor » Thu Nov 23, 2017 1:02 pm

Never mind i got it, first time i opend the map in the game it worked *thumbsup* Thanks alot for the help ! :smileynew:

masseyharris
Posts: 257
Joined: Tue Nov 15, 2011 10:34 pm

Re: [FS17]Tutorial - Increasing numer of field directions

Post by masseyharris » Thu Nov 23, 2017 4:01 pm

An lua file is just a text file but save as .LUA instead of .TXT
So you can just open a new text file with notepad, copy the text in (that Stegei give in post one), change the number of angles, and save as a .lua file.

If you can't find groundshader.xml already in the map's folders, then look in the original game folder (farming simulator 17/data/shaders/ ) and copy it out of there into the map you are working on.

masseyharris
Posts: 257
Joined: Tue Nov 15, 2011 10:34 pm

Re: [FS17]Tutorial - Increasing numer of field directions

Post by masseyharris » Thu Nov 23, 2017 4:02 pm

Just saw your last post, good news, well done :)

User avatar
Azfoor
Posts: 325
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Azfoor » Thu Nov 23, 2017 4:30 pm

masseyharris wrote:Just saw your last post, good news, well done :)
Yea this is awesome. I didn't think it was this easy actually :biggrin2: now a can play any map i want. Because with multi angles a map is so much beter!

User avatar
Vanquish081
Posts: 208
Joined: Wed Apr 19, 2017 10:29 am

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Vanquish081 » Thu Jan 25, 2018 4:47 pm

does not work when planting potatoes

Image

User avatar
Azfoor
Posts: 325
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Azfoor » Thu Dec 13, 2018 6:16 pm

Does anyone know if its the same with FS19?

anthu
Posts: 2229
Joined: Thu Nov 06, 2014 8:03 am

Re: [FS17]Tutorial - Increasing numer of field directions

Post by anthu » Thu Dec 13, 2018 6:28 pm

Azfoor wrote:
Thu Dec 13, 2018 6:16 pm
Does anyone know if its the same with FS19?
No.
The fs17 methode does not work in fs19.
It is most the same but the last point:
Copy the png in the map file and open the map in the GE to generate a grle does not work.
GE 8.1 cant read the png file and so are there no fields.

Lg
Andreas

User avatar
Azfoor
Posts: 325
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Azfoor » Thu Dec 13, 2018 11:37 pm

anthu wrote:
Thu Dec 13, 2018 6:28 pm
Azfoor wrote:
Thu Dec 13, 2018 6:16 pm
Does anyone know if its the same with FS19?
No.
The fs17 methode does not work in fs19.
It is most the same but the last point:
Copy the png in the map file and open the map in the GE to generate a grle does not work.
GE 8.1 cant read the png file and so are there no fields.

Lg
Andreas
Is there a way around it? know if anyone is working on it?

ChillyUK
Posts: 2
Joined: Mon Aug 19, 2013 8:31 pm

Re: [FS17]Tutorial - Increasing numer of field directions

Post by ChillyUK » Fri Dec 14, 2018 5:09 pm

I've done it the way I've always done in in 17 and I have even got GE 8.1 to see the cultivator_density.png.

I can get the map to load in 19 but it then only has 1 angle so either Ge 8.1 isn't adding the extra angles or the Lua doesn't work

KevinMn
Posts: 110
Joined: Mon Oct 29, 2012 7:48 pm

Re: [FS17]Tutorial - Increasing numer of field directions

Post by KevinMn » Thu Jan 10, 2019 11:19 am

Do you plan on making the same script for 19?
Same goes for the Photo Map. It almost seems like you've given up on helping modders in 19, you haven't even made a 19 section on gdn.

User avatar
The Sim Station
Posts: 6
Joined: Sat Jan 27, 2018 5:26 am
Contact:

Re: [FS17]Tutorial - Increasing numer of field directions

Post by The Sim Station » Tue Jan 22, 2019 2:56 pm

Just thought I'd link the tutorial for FS19 that the excellent modelleicher made for us all.

English
https://youtu.be/D4JoPzvGgoA

And in case any of you speak German but are reading in the English forums:
https://youtu.be/LOeRdpA1zIc

Now we can work around curves without cringing or rage quitting!

User avatar
mligh2
Posts: 6
Joined: Mon Jan 07, 2019 5:37 am

Re: [FS17]Tutorial - Increasing numer of field directions

Post by mligh2 » Sun Jan 27, 2019 7:44 pm

The Sim Station wrote:
Tue Jan 22, 2019 2:56 pm
Just thought I'd link the tutorial for FS19 that the excellent modelleicher made for us all.

English
https://youtu.be/D4JoPzvGgoA

And in case any of you speak German but are reading in the English forums:
https://youtu.be/LOeRdpA1zIc

Now we can work around curves without cringing or rage quitting!
Thank you so much! I'm going to link this in the post I made on this topic for FS19. Good to know it was something simple!

User avatar
Azfoor
Posts: 325
Joined: Mon Jul 31, 2017 1:05 am
Location: Sweden

Re: [FS17]Tutorial - Increasing numer of field directions

Post by Azfoor » Tue Jan 29, 2019 10:38 pm

I can not get this to wort no mather how many times i folow the tutorial.... and i did this all the time in 17....

the error i get is this /Error: mission class LS19_Zweisternhof_GP.ModMap could not be found

User avatar
mligh2
Posts: 6
Joined: Mon Jan 07, 2019 5:37 am

Re: [FS17]Tutorial - Increasing numer of field directions

Post by mligh2 » Sat Feb 02, 2019 4:55 am

Azfoor wrote:
Tue Jan 29, 2019 10:38 pm
I can not get this to wort no mather how many times i folow the tutorial.... and i did this all the time in 17....

the error i get is this /Error: mission class LS19_Zweisternhof_GP.ModMap could not be found
I hate to be that guy but following this tutorial did work for me - first time too. I added 3 channels to the Rolling Hills map for FS19, even though I'm sure DR modding will have it in their next iteration of the map.

Steps are as follows (note: don't type the quotation marks I use below into the scripts; if quotation marks are already used in a script then don't delete them):
1. ModMap.lua --- Create a lua file using the script modelleicher left for us. I used the one he linked at pastebin. Be sure it's lua and not still a text document. I just pasted the script into notepad++ and changed the language to lua and then saved it. Then change the number to how many channels you want to ADD. In my case I added 3 channels so this now reads "numAdditionalAngleChannels = 3".

2. modDesc.xml --- Change the mission class in the modDesc.xml file to ModMap. I would just call it ModMap instead of having to change all the other stuff he mentions if you want to call it something else. Keep it simple. Then change the filename to ModMap.lua so that it points to the file you just created and placed in the mod folder. If you place this file anywhere else be sure your file path is correct. Again, I would keep it simple to mitigate the potential for scripting errors.

3. map.i3d --- Now dive into the map folder and edit the i3d file for the map (not the shapes file) in notepad++. In the files section you want to edit the script that points to your groundShader.xml file. You can put this wherever you want but be sure your file path is correct. In the video he places it in a folder called shaders within the mod folder itself (as opposed to the Farm Sim data folder where your game is installed). The actual groundShader file comes in the next step. Now find the terrainDetail line in the code and change the numDensityMapChannels to 13 PLUS however many channels you want to ADD. In my case, I added 3 channels so in my script I changed this to 16. Now scroll to the right and find combinedValuesChannels. There are 3 sets of 3 numbers here and in a stock map they will read "0 3 0:6 2 0:3 3 1". The number you want to change is right in the middle. So in my case I changed the whole script to now read "0 3 0:6 5 0:3 3 1" because I added 3 channels and 2+3=5.

4. groundShader.xml --- Create a folder called "shaders" and copy the groundShader.xml file from your FS19 game data folder (it's also in a folder called "shaders"). I bought this game on Steam and my game library is on my storage drive which is labeled with the letter E so if you're like me the file path will be E:\Program Files (x86)\Steam\steamapps\common\Farming Simulator 19\data. Now on lines 12 and 15 you'll need to remove the two dots in the file path for defaultFilename and change them to "$data" instead. This is because the xml file is no longer in the FS data folder but you need it to still point to other files that are saved there. Now on line 210 change the line for the angle. You need to change the 3 where it says "angle*3" and you need to change the 4 where it says "/4*3.". Multiply the 4 by 2 to the power of how many channels you added. So in my case 4*2^3=32. Then the 3 gets changed to whatever that is minus 1 - which in this case means it's now 31. So the script was "angle = ceil(angle*3-0.0001)/4*3.14159;" and now after we've added 3 channels it reads as "angle = ceil(angle*31-0.0001)/32*3.14159;".

5. cultivator_density.gdm --- Now as the video demonstrates you need to convert the cultivator_density.gdm file in your FS19 map to a png file using the grleConverter which is available on the developer network. Then take this png file and put it into an FS17 map folder (I used a stock version of Westbridge Hills, you can also just use the sample mod map that comes with the game). Make sure you delete the original gdm file that's in this FS17 map so that you can create a new one when you save it.

6. FS17 map adjustments --- Go into your FS17 map files now and update the groundShader.xml file just as you did in the FS19 map (don't change file paths though because you're not moving this one). As for the map.i3d file you need to add the same number of channels but you want to have the same numbers that are in your FS19 map so that the gdm file gets scripted properly. So if you add 3 channels like I did then change the numDensityMapChannels from 11 to a 16 and change combinedValuesChannels from "0 3 0;5 2 0;3 2 1" to now read as "0 3 0;5 5 0;3 2 1".

7. Moving files --- Now open your FS17 map in Giants editor version 7.1.0 (yes, the old version). Yes, it will look weird because it's now using the terrain detail from your FS19 map - it's ok , just hit save. Once the new gdm file is created for your FS17 map copy it and save it in your FS19 map (replace the gdm file that's already saved there if you didn't already delete it). Then delete the png file you created and saved there with the grleConverter. So to recap, all you do is take your FS19 gdm file - convert it to a png - load it into an FS17 map after you also change the scripting to allow for more terrain channels - use the old version of the Giants editor to convert it back to a gdm file which is now scripted properly - then load your newly scripted FS17 gdm file back into your FS19 map and delete the png file. Actually a simple process, just a lot of steps.

DONE.

tomknight16
Posts: 13
Joined: Wed Nov 21, 2018 3:09 am

Re: [FS17]Tutorial - Increasing numer of field directions

Post by tomknight16 » Mon Apr 22, 2019 5:31 am

So, am I right in saying you need FS17 to do this?

Post Reply