"The Old Stream Farm" and Environment.xml

Your forum for all discussions around Modding.
Frag
Posts: 173
Joined: Wed Sep 18, 2019 4:01 pm

"The Old Stream Farm" and Environment.xml

Post by Frag »

Hi everyone,

I usually modify successfully the environment.xml of the maps to get more aggressive winter. I do this to change the game pace during winter and play around with snow removal equipment. So far, I had no problem to edit "Yukon Valley", "Camden" and "UnbreonValley".

I recently started to play with "The Old Stream Farm", but to my surprise there are no environment.xml file in this mod zip. So I guess it uses some default weather.

The environment.xml file is usually found in the maps\xml\environment.xml (like Yukon Valley) or directly in the \maps\environment.xml (like Camdem)

I have two questions

#1

I tried to copy the Yukon Valley environment.xml file in the \maps folder of The Old Stream Farm zip file to get a similar weather for testing purpose. But for some reasons the weather does not seem to be affected. Briefly, anyone knows what environment file I could use (I know how to edit it, but did not find a way to ADD it to this map). Also is there something specific tasks to be done somewhere else within the mod zip to tell the application that this file must be loaded?

#2

Anyone knows how the weight value works in this section. Some says the maximum value is 20. I saw some maps with 95 in there. Briefly, I would really like to understand what the value of this variable represent. Is the maximum depth of the snow? What are the limits on that value?

<object typeName="SNOW" class="WeatherObjectRain" weight="12">
<rain filename="$data/sky/snow.i3d" />

<variation weight="1" minHours="4" maxHours="8" minTemperature="-16" maxTemperature="-4">
<clouds presetId="RAIN_1" />
<rain dropScale="0.5" />
<wind angle="24" speed="8" cirrusSpeedFactor="0.80" />
</variation>

Thank you all
Eische
Posts: 3773
Joined: Thu Oct 18, 2018 5:17 pm

Re: "The Old Stream Farm" and Environment.xml

Post by Eische »

You need to reference to the environment file in the map.xml file.
Playing on PC - Win10
Ryzen 3600
RX 5500XT
16GB Ram
How to post log file
How to upload pictures
Please report bugs for FS22 using the bugtracker
Frag
Posts: 173
Joined: Wed Sep 18, 2019 4:01 pm

Re: "The Old Stream Farm" and Environment.xml

Post by Frag »

Eische wrote: Sun Feb 20, 2022 7:42 am You need to reference to the environment file in the map.xml file.
Ok that did it!

Thanks Eishe, I owe you one on this! You just made my day.
User avatar
drewCZ
Posts: 50
Joined: Thu Jul 16, 2015 12:01 pm
Location: Earth, Europe, Czechia

Re: "The Old Stream Farm" and Environment.xml

Post by drewCZ »

About weights mentioned here:
viewtopic.php?f=895&t=192442&p=1518792#p1518792

But I'm curious if somewhere is somebody who knows details about wind speed and direction. Resp. how big is the variation to written values?
Thanks
Ticho aka DrewCZ
FS2013 24/7 dedisrv 'Posledni JZD', MRmods | down 2016=R.I.P.
FS15 | more than a year of pain
FS17 dedi srv, multiplayer+MR !Forever! | Thanks old pal, but moved to 19
FS19 Seasons+GEO+VCA+REA+Cam+Mass+MaizePlus | 6th ingame Year | we are still WORKS in MP!
FS22 - MP moved! Real map+Industries+Relight, Hard Level, Definitely profitable w/ modern machinery
jitrief
Posts: 15
Joined: Tue Jul 27, 2021 7:26 pm
Location: Talagante, Chile
Contact:

Re: "The Old Stream Farm" and Environment.xml

Post by jitrief »

hello Frag I have some doubts about it and I want to take advantage of the topic

I have also been editing the environment.xml file to make climates more according to the map I am playing, but it has thrown me fatal errors in the log.

I took a mapUS environment and changed the latitude, the temperature ranges of all seasons and the weights. Then I pasted it in the folder where the xml files of the map are, and in the map.xml I gave it the address of the new environment.xml in the mod map
(the one the map used was from the base game <environment filename="$data/maps/mapFR/environment.xml" />)

When I start and load the game, it freezes on loading and throws these errors in the log

Code: Select all

2022-12-25 23:28 Error: Failed to open xml file 'C:/Users/Documents/My Games/FarmingSimulator2022/mods/FS22_CAMPO_ARGENTINO_22/environment.xml'.
2022-12-25 23:28 LUA call stack:
   dataS/scripts/misc/Logging.lua (119) : printCallstack
   dataS/scripts/environment/Environment.lua (164) : fatal
   dataS/scripts/missions/mission00.lua (434) : load
   dataS/scripts/missions/mission00.lua (240) : loadEnvironment
   dataS/scripts/utils/Utils.lua (472) : oldFunc
   dataS/scripts/FSBaseMission.lua (1018) : load
   dataS/scripts/gui/MPLoadingScreen.lua (280) : onConnectionRequestAcceptedLoad
   dataS/scripts/gui/base/Gui.lua (700) : update
   dataS/scripts/main.lua (1238) : update
2022-12-25 23:28 Error: Running LUA method 'update'.
dataS/scripts/misc/Logging.lua(121) : Fatal Error: Could not load environment 'C:/Users/Documents/My Games/FarmingSimulator2022/mods/FS22_CAMPO_ARGENTINO_22/environment.xml'
I have tried making a completely new game, I have tried putting the environment.xml of the base maps, but everything is solved when I put this address again <environment filename="$data/maps/mapFR/environment.xml" />

is the environment file dependent on other xml's that i should modify as well?
User avatar
drewCZ
Posts: 50
Joined: Thu Jul 16, 2015 12:01 pm
Location: Earth, Europe, Czechia

Re: "The Old Stream Farm" and Environment.xml

Post by drewCZ »

Hi @jitrief,
seems to be like the wrong path to your custom environment.xml file, set up in the "main" map.xml.
Please send the row with a path from map.xml and also the exact (physical) location of that environment.xml.
Cheers
Ticho aka DrewCZ
FS2013 24/7 dedisrv 'Posledni JZD', MRmods | down 2016=R.I.P.
FS15 | more than a year of pain
FS17 dedi srv, multiplayer+MR !Forever! | Thanks old pal, but moved to 19
FS19 Seasons+GEO+VCA+REA+Cam+Mass+MaizePlus | 6th ingame Year | we are still WORKS in MP!
FS22 - MP moved! Real map+Industries+Relight, Hard Level, Definitely profitable w/ modern machinery
jitrief
Posts: 15
Joined: Tue Jul 27, 2021 7:26 pm
Location: Talagante, Chile
Contact:

Re: "The Old Stream Farm" and Environment.xml

Post by jitrief »

Thank you very much drewCZ.
It was my mistake with the location of the environment.xml, I forgot to add the folder where I left the file in the path of the map.xml hahahaha, thank you very much for the quick response and happy holidays
User avatar
drewCZ
Posts: 50
Joined: Thu Jul 16, 2015 12:01 pm
Location: Earth, Europe, Czechia

Re: "The Old Stream Farm" and Environment.xml

Post by drewCZ »

Great!
Glad to help you.
God bless you and happy farming in next year 🙂

🎄
Ticho aka DrewCZ
FS2013 24/7 dedisrv 'Posledni JZD', MRmods | down 2016=R.I.P.
FS15 | more than a year of pain
FS17 dedi srv, multiplayer+MR !Forever! | Thanks old pal, but moved to 19
FS19 Seasons+GEO+VCA+REA+Cam+Mass+MaizePlus | 6th ingame Year | we are still WORKS in MP!
FS22 - MP moved! Real map+Industries+Relight, Hard Level, Definitely profitable w/ modern machinery
Frag
Posts: 173
Joined: Wed Sep 18, 2019 4:01 pm

Re: "The Old Stream Farm" and Environment.xml

Post by Frag »

Guys, let's say you change the environment.xml file to a map and you have a campaign already running on that map. How long will it take to apply?

Briefly, I have no issue changing the environment file and start a new campaign. It will be applied right away. But if I want to continue an existing campaign, it seems that it does not apply on the spot. I think that it could take few days for the game to generate the weather of the future days.

Anyone noticed how it works?
User avatar
drewCZ
Posts: 50
Joined: Thu Jul 16, 2015 12:01 pm
Location: Earth, Europe, Czechia

Re: "The Old Stream Farm" and Environment.xml

Post by drewCZ »

I don't care... Here we have two ways how to reset the weather briefly.
1. you can delete the forecast part of environment.xml located in save. exactly everything inside the forecast tag >>>

Code: Select all

    <daysPerPeriod>1</daysPerPeriod>
    <weather timeSinceLastRain="408">
        <forecast>

        </forecast>
        <fog currentMieScale="1.000000" lastMieScale="1.000000" targetMieScale="1.000000" alpha="1.000000" duration="1.000000" nightFactor="0.000000" dayFactor="0.000000"/>
        <snow height="0.000000"/>
    </weather>
2. If you aren't familized with XML editation, you can download tools for advanced ingame functions. i.e. this one EDC

Backup before changes ;-)

cheers
Ticho aka DrewCZ
FS2013 24/7 dedisrv 'Posledni JZD', MRmods | down 2016=R.I.P.
FS15 | more than a year of pain
FS17 dedi srv, multiplayer+MR !Forever! | Thanks old pal, but moved to 19
FS19 Seasons+GEO+VCA+REA+Cam+Mass+MaizePlus | 6th ingame Year | we are still WORKS in MP!
FS22 - MP moved! Real map+Industries+Relight, Hard Level, Definitely profitable w/ modern machinery
mike34s
Posts: 3
Joined: Wed Jul 05, 2023 6:22 am

Re: "The Old Stream Farm" and Environment.xml

Post by mike34s »

Eische wrote: Sun Feb 20, 2022 7:42 am You need to reference to the environment file in the travle map.xml file.
I did it too, thanks
Post Reply