Author Topic: [Mapper] Lightday parameter in object properties - how does it work?  (Read 3236 times)

Offline Rikers

  • pixel nazi
I'd like to make some rays of light in a dark building interior (separate map), without fixing the time for the map, so the interior always stays dark (As it would if f.e. time was fixed at 5:00), but the rays only show up in game-daytime. I tried different values but have no idea which numbers represent what.  I also tried changig the Daycolor values to the same one, and while it made the building dark at all times, it also somehow it made the rays "invisible" (the lighthex didint produce light at anytime, at least in the mapper.) Any ideas?

Offline Lexx

  • Rotator
  • Mexican Apple Thief
If it is a separate map, I'd say you actually should set a fixed time. Then you can place scenery / item graphics that look like sun rays, which will be shown / hidden via script based on current time. Additionally you can place weak light sources which are only visible at daytime.

I did a similar approach with the cave interior entrances in 2238. The bright entrance light was only visible at day, and not in the night. Was always wondering why no other server was doing this, as it doesn't even require additional scripting.



(The global map light in the daytime screen is just because I've set the time in the mapper. Ingame the caves are fixed at 00:00 or 03:00 (whatever it was) and therefore dark, except for the light at the entrance.)
« Last Edit: May 26, 2014, 08:39:20 pm by Lexx »

Offline Rikers

  • pixel nazi
Okay, thank you very much! Currently I'm not able to test it myself, and changing time in the mapper works regardless if the time is fixed or not. Actually, some time ago I discovered this value (daytime=30) in those 2238 cave  maps, and that's when I began to wonder... earlier I just thought it's only 0 or 1. Okay, so that should settle it.

But what does that number (30) actually represent? Are there other "useful" values that you know of?


Re: [Mapper] Lightday parameter in object properties - how does it work?
« Reply #3 on: June 02, 2014, 11:08:50 am »
How do you setup light in underground areas? I want to make the area's light consistent regardless of the time of the day.

Offline Mayck

  • Rotator
  • ...shhhh...
Re: [Mapper] Lightday parameter in object properties - how does it work?
« Reply #4 on: June 02, 2014, 11:32:18 am »
How do you setup light in underground areas? I want to make the area's light consistent regardless of the time of the day.
Not sure if there's some more elegant way to do it:
1. open your .fomap file in text editor
2. in the Header section on the beginning of the file find line that says "Time" (there should be -1 next to it by default)
3. set the value to preferred time of the day:
  • -1 = means light would be changing with time of day
  • 0 = light as in midnight
  • 300 = light as in 3:00 in the morning
  • 1400 = light as in 14:00

It can also be changed via scripts as far as I remember (if you want lighting to change when you start a generator for example).


Offline Lexx

  • Rotator
  • Mexican Apple Thief
Re: [Mapper] Lightday parameter in object properties - how does it work?
« Reply #5 on: June 02, 2014, 01:28:01 pm »
If you are using the 2238 source as base, it's also possible to set the map time in the map settings of the world editor.

Re: [Mapper] Lightday parameter in object properties - how does it work?
« Reply #6 on: June 02, 2014, 01:42:37 pm »
Thanks for the help, it worked! :)

If you are using the 2238 source as base, it's also possible to set the map time in the map settings of the world editor.

I tried to make world editor work with FOnline SDK but I failed to make it happen. There are lots of code changes need to be made to make it work and I probably missed something. I will try again later

Offline Wipe

  • Rotator
  • Random is god
Re: [Mapper] Lightday parameter in object properties - how does it work?
« Reply #7 on: June 02, 2014, 09:33:38 pm »
It can also be changed via scripts as far as I remember
Yep, #MapTime [value]
« Last Edit: June 02, 2014, 09:35:11 pm by Wipe »
Games are meant to be created, not played...