Daytime and lightlevel question - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Daytime and lightlevel question (/Thread-Daytime-and-lightlevel-question) Pages: 1 2 |
Daytime and lightlevel question - Khizag - 06-15-2012 06:52 PM Hi I'm working (hell, thousands of bugs!) on an old italian shard and I've found a strange custom script. It does a lot of stuff about local time and lightlevel and I would like to remove it. So the question is: How the daytime and the lightlevel works on sphere .56b? I mean, I think that a day inside the shard (without this custom script) isn't long like a real day. And what about the lightlevel of LOCAL, REGION, and SECTOR? How it changes? Can someone explain or link some docs? Thank you! RE: Daytime and lightlevel question - darksun84 - 06-16-2012 02:09 AM Sector are the ones that manages light level,and players have a Light field which you can use to override sector's light level. RE: Daytime and lightlevel question - Khizag - 06-16-2012 06:25 PM Ok, but how the daily light works? Every how much time it changes? How many "real" minutes is long a "virtual" day? I would like to understand this mechanism, how Sphere is trying to replicate the "revolution movement" of our world? Ok, not the details, I would like to know the effects. For example, when Vesper is in light, in other distant sectors is night, how can we know where? And how can we know how much time is left to see the night in Vesper? RE: Daytime and lightlevel question - Gil Amarth - 06-17-2012 07:20 AM At sphere.ini you have this lines: Code: DungeonLight=27 Later you have the next line: PHP Code: // Length of the game world minute in real world in seconds With this you have 1 real minute for 1 world minute. If you set this quantity to 15 (for example), you have 4 world minutes for 1 real minute, 4 world hours, for 1 real hour, 4 world days for 1 real day, etc... As far I know, the revolution movement of the world is the same for all the map. The map it´s only a small continent of the world, so it´s the same time at Yew, or Vesper o Moonglow. There is no day in one corner of the map, and night on the other. If it´s night, it´s night at the whole map. RE: Daytime and lightlevel question - Khizag - 06-19-2012 07:28 AM Ok thanks! GameMinuteLength will be very useful. Hmm so the "revolution" effect is done by this damn custom script... argh! I think that create one item for every sector (6144 every x minutes) is not a good idea, right? This is why I would like to remove this script. I will try to do the same things without create items RE: Daytime and lightlevel question - Gil Amarth - 06-19-2012 05:59 PM It is easier than you think, from Spherewiki: Quote:Information for Advanced Scripters You can change all sectors from a region with this command, if you have a region who cover the whole world, you can change them all when you want. RE: Daytime and lightlevel question - Khizag - 06-19-2012 07:50 PM Very nice! So I've only to decide the "meridians" regions if I don't want the same light level for all sectors over the world. Or there is a method to do something like: REGION.SECTORS LIGHT <value_not_constant_for_all_sectors> ? RE: Daytime and lightlevel question - Gil Amarth - 06-19-2012 09:53 PM You can use: REGION.SECTORS LIGHT <value_not_constant_for_all_sectors> But somehow you have to specify what sector you want to change, and what sectors not. You can put a tag to every sector you want change, or specify meridians with regions. I think is better and faster the second option. RE: Daytime and lightlevel question - Khizag - 06-19-2012 11:58 PM Yes, I like the "meridians regions" solution, it's simpler So, thank you very much! RE: Daytime and lightlevel question - Khizag - 06-22-2012 08:10 AM Hmm... I'm here again... So, I've defined my region: Code: [AREADEF a_lightband_5] And a function that should bring the night all over this region Code: [FUNCTION f_world_light_update] But when I try to use this test item: Code: [ITEMDEF i_light_update] The light remains the same. The PG goes at the right position and says "DEBUG: 4590,100,5" but but no light changes... where is the problem? Ah, and there aren't errors in the log. |