Night/Day

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Night/Day
Infiltrator
Member # 3040
Profile #0
How does the game determine whether certain squares are lit by the day/night cycle?

I'd like to make an indoor cave that is lit at the entrance if it is daytime, but not if it's at night.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
The Establishment
Member # 6
Profile #1
Day/night is a town-wide phenomena unfortunately. This is not to say that you may be able to exploit certain things to simulate it. The answer is that it is not possible, easily at least.

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00
Apprentice
Member # 4123
Profile #2
If you have the scripting knowledge or the patience to learn, (I don't have either right now I'm afraid. I'm going nuts with another problem.) you could probably have some outdoor script that changes floor tiles for you depending on what time of day it is. To keep it (relatively) simple, just create a couple of new terrain types with the same graphic as the one you want to use for the floor. Then use the te_icon_adjust property to lighten/darken the graphic and voila... You have three terrain graphics with the same pattern but different brightnesses. The scripting part might be a bit trickier, but I think it's doable.

That being said, that's a lot of work for a simple effect. It could look kinda neat though.

EDIT: Thinking more it, it would look cleaner if you created multiple terrains that were illuminated at different brightnesses with the te_light_radius property. The up side would be that you wouldn't have to try and figure which tiles needed to be illuminated and when. You could just change tiles to whatever amount of light you need. The down side is you would have at least one tile that would go straight from light to dark. You could combine the two techniques for a really nice effect, but it might take more work and tweaking than you'll want to do.

[ Monday, March 29, 2004 16:37: Message edited by: macman0 ]
Posts: 21 | Registered: Saturday, March 20 2004 08:00
Infiltrator
Member # 3040
Profile #3
The problem with your suggestions is that if the party were to stay in the dungeon for a long period of time, the lighting wouldn't be dynamically updated as per the day/night cycle. :(
Oh well, maybe I'll just have an in-between lighting at the entrance, and have it dark inside.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Apprentice
Member # 4123
Profile #4
Hmm... the outdoor script idea wasn't good. I think you could, however, use a terrain script for the effect I mentioned earlier. It should be able to update every 8 turns (or more if you'd like) just like a character. You could use that to switch terrain types. I think.
Posts: 21 | Registered: Saturday, March 20 2004 08:00