American Eagles Modding Forums


Hi! You are currently viewing forum as a guest. For more features please login or register!

Member Login



Lost your password?

Forum Stats

Latest Member


Not a member yet? Sign Up!



*



January 29, 2023, 03:29:16 AM

Author Topic: Sunrise sunset  (Read 2925 times)

0 Members and 1 Guest are viewing this topic.

Offline homebuilder (OP)

Sunrise sunset
« on: March 30, 2020, 06:25:01 AM »
Hey folks hope everybodys doing well! I was wondering if theres a way to change what time the sun comes up and sets everyday? I would like to have the sun come up around five and set around nine, which is a little bit more realistic for summer time around me. I dont really play seasons mod and Ive heard that you can do that with that mod.

Thanks
 

Offline hoot

  • Eagles Club
  • Sr. Member
  • *
  • Posts: 213
  • Thanked: 61 times
  • If it's stupid but works, it ain't stupid.
Re: Sunrise sunset
« Reply #1 on: March 30, 2020, 06:54:13 PM »
Hi,  you can edit the sunrise/sunset with a custom environment.xml file.  Look in the map's xml file to see which environment it is using now.
Code: [Select]
<environment filename="$data/maps/mapUS_environment.xml" />
Copy that file out of the game's directory (the path on the line above) and paste it into your map's folder where the map's xml and i3d are.  You can rename it also to make sure that you don't get it mixed up with the default one.   Change the line in the xml file so that it uses the file you edit.
Code: [Select]
<environment filename="maps/yourMaps_environment.xml" />

Edit the lines in that environment.xml for the sunRotation.  I have not tried it but the lines for sunrise and sunset are indicated.  It may just be trial and error to find the values you want to use.
Code: [Select]
<sunRotation heightAngleLimitRotation="60" heightAngleLimitRotationStart="56" heightAngleLimitRotationEnd="80">
        <key value="0"   time="0*60" />
        <key value="80"  time="6.5*60" />
        <key value="-80"  time="6.5*60" /> <!-- sunrise 6 -->
        <key value="0"   time="12*60" />
        <key value="80"  time="19.5*60" />
        <key value="-80"  time="19.5*60" /> <!-- sunset 20 -->
        <key value="0"   time="24*60" />
    </sunRotation>
 

Offline homebuilder (OP)

Re: Sunrise sunset
« Reply #2 on: March 31, 2020, 02:56:18 AM »
Ok great! Ill try it!!!
Do you think Ill need to start a new game???

Thank you very much!
 

Offline hoot

  • Eagles Club
  • Sr. Member
  • *
  • Posts: 213
  • Thanked: 61 times
  • If it's stupid but works, it ain't stupid.
Re: Sunrise sunset
« Reply #3 on: March 31, 2020, 11:10:55 AM »
Do you think Ill need to start a new game???
Probably not, but as always make a back-up of the map and make a back-up of that savegame folder.  Having a back-up or two of everything can turn a disaster into a learning experience :).
 

Offline homebuilder (OP)

Re: Sunrise sunset
« Reply #4 on: March 31, 2020, 04:16:20 PM »
OK That didn't work :-[  I did try starting a new game but no luck
 

Offline ddversatile

Re: Sunrise sunset
« Reply #5 on: April 03, 2020, 01:19:09 PM »
OK That didn't work :-[  I did try starting a new game but no luck
What did you change in the lines that hoot showed?  How did it not work, did the sunrise and sunset not change or did we break the maps sun altogether?
 
The following users thanked this post: hoot

Offline homebuilder (OP)

Re: Sunrise sunset
« Reply #6 on: April 10, 2020, 08:43:55 AM »
First of all, thank you Hoot for the help!!! Im sorry I shouldve explained what I changed a little bit better. I set the sun rise and set to the times I wante, using a 24hr clock. I started a new game and the sun worked fine but I didnt notice a difference in the sun rise and sun set. The game continues to work fine but no changes to the sun.
Thanks for all the help!!
 

Offline ddversatile

Re: Sunrise sunset
« Reply #7 on: April 11, 2020, 12:24:48 PM »
First of all, thank you Hoot for the help!!! I�m sorry I should�ve explained what I changed a little bit better. I set the sun rise and set to the times I wante, using a 24hr clock. I started a new game and the sun worked fine but I didn�t notice a difference in the sun rise and sun set. The game continues to work fine but no changes to the sun.
Thanks for all the help!!

<!-- sunset 20 -->  Did you change this line? I don't think changing this line will make a difference, It looks to be more like a translation of the time unit to its left : <key value="-80"  time="19.5*60" />

I think the 19.5 is your hour, i would try changing it, not the *60 though.  Once again make sure you back up your savegame and your original map. 
 

Offline homebuilder (OP)

Re: Sunrise sunset
« Reply #8 on: April 11, 2020, 03:43:36 PM »
Thank you for the Help!!!
This is what I changed. Would love to figure this out.






Code: [Select]
<sunRotation heightAngleLimitRotation="60" heightAngleLimitRotationStart="56" heightAngleLimitRotationEnd="80">
        <key value="0"   time="0*60" />
        <key value="80"  time="4.5*60" />
        <key value="-80"  time="4.5*60" /> <!-- sunrise 6 -->
        <key value="0"   time="12*60" />
        <key value="80"  time="21.5*60" />
        <key value="-80"  time="21.5*60" /> <!-- sunset 20 -->
        <key value="0"   time="24*60" />
    </sunRotation>
 

Offline ddversatile

Re: Sunrise sunset
« Reply #9 on: April 12, 2020, 09:47:42 PM »
Thank you for the Help!!!
This is what I changed. Would love to figure this out.






Code: [Select]
<sunRotation heightAngleLimitRotation="60" heightAngleLimitRotationStart="56" heightAngleLimitRotationEnd="80">
        <key value="0"   time="0*60" />
        <key value="80"  time="4.5*60" />
        <key value="-80"  time="4.5*60" /> <!-- sunrise 6 -->
        <key value="0"   time="12*60" />
        <key value="80"  time="21.5*60" />
        <key value="-80"  time="21.5*60" /> <!-- sunset 20 -->
        <key value="0"   time="24*60" />
    </sunRotation>

That looks like it should work.  What I'm looking towards now is that your map isnt using this file that you've edited.

Where is the environment.xml that you've edited in your map folder, I will put an example of how it should look like if you put it in your mapname/maps folder.  Also, did you look in your maps "yourmap.xml" file and change this "    <environment filename="$data/maps/mapUS_environment.xml" />  " to something like     <environment filename="maps/mapUS_environment.xml" />" />

Make sure the file names match (the file you copied and edited and the filename path in the xml i showed above.
 

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
2782 Views
Last post May 20, 2013, 12:52:24 AM
by kiddsick
0 Replies
1197 Views
Last post March 31, 2020, 03:03:11 PM
by MikeLowery


Powered by EzPortal