Always "night" tile? (for caves)

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Always "night" tile? (for caves)

Post by Rya »

I want to know how I can make certain parts of a map being indepedent of daytime. It's usually used for caves. Can I do this somehow with the map editor or do I need WML? Is there a guide for it? If you have large caves it would be pretty annoying to set every single maptile in WML, I'd assume.

Also does this + illuminate cause "neutral" or "day"?
Wesnoth
The developer says "no".
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Always "night" tile? (for caves)

Post by Ceres »

You need to do it in WML, use the [time_area] tag. You also don't need to set each tile individually, because the Standard Location Filter supports ranges like x=1-45.
Also does this + illuminate cause "neutral" or "day"?
Since "Underground" is basically the same as night, with illumination you'd get neutral.
Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Re: Always "night" tile? (for caves)

Post by Rya »

Hmm, I was thinking: Couldn't I just say that all cave-like tiles count as underground?

That would be something like...

Code: Select all

[time_area]
terrain=Cave
{UNDERGROUND}
[/time_area]
Wesnoth
The developer says "no".
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Always "night" tile? (for caves)

Post by Ceres »

Yes, that would be possible too. However, it only works if [time_area] is in an [event] (e.g. prestart).
The location filter should be terrain=U*, because all cave terrain codes start with U.
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Always "night" tile? (for caves)

Post by JaMiT »

Rya wrote:Also does this + illuminate cause "neutral" or "day"?
The standard "illuminates" ability increases the lawful bonus by 25, up to a maximum of +25. So if you set your cave to use the "underground" schedule, the resulting lawful bonus would be -25 (underground) + 25 (illuminates) = 0. If you instead use "deep underground", the result would be -30 (deep underground) + 25 (illuminates) = -5, for a small penalty to lawful (and liminal) units and a small bonus to chaotic units.

(If you define custom terrain, it is also possible to define an illumination level for that terrain, but that is more work than just defining a [time_area] for what you want.)
Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Re: Always "night" tile? (for caves)

Post by Rya »

Deep underground? =o
Are there more types like this? For example something that is always 0 (neutral)?
Wesnoth
The developer says "no".
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Always "night" tile? (for caves)

Post by 8680 »

Rya wrote:Are there more types like this? For example something that is always 0 (neutral)?
Dawn? Dusk? Indoors?
Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Re: Always "night" tile? (for caves)

Post by Rya »

Can I find a list of all of them somewhere?
Wesnoth
The developer says "no".
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Always "night" tile? (for caves)

Post by 8680 »

Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Re: Always "night" tile? (for caves)

Post by Rya »

Thanks!
Wesnoth
The developer says "no".
Post Reply