SLF: include_borders=yes doesn't work with [time_area]?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
User avatar
WhiteWolf
Forum Regular
Posts: 427
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

SLF: include_borders=yes doesn't work with [time_area]?

Post by WhiteWolf » January 21st, 2019, 10:57 pm

Hello,

Apparently [time_area] has no option to influence the schedule on the map borders.
In the Standard Location Filter there is a 'include_borders' key, but it just doesn't seem to work.

What I am precisely aiming at, is that I have a [terrain_graphics], that is only active at a certain time of day. At one point I wish to change the time of day on the whole map to trigger the terrain_graphics (namely rain) everywhere, including the borders of the map for consistency. Changing the schedule through a [time_area](include_borders=yes) for the whole map works, but not on the borders - those stay as the default schedule of the map, therefore the terrain_graphics is not triggered there either.

Is there any other way to change the schedule on the whole map, or is there another recommended approach to trigger scenario-toplevel terrain_graphics on/off?

Thanks,
WhiteWolf
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now for 1.14, with new bugs!

User avatar
WhiteWolf
Forum Regular
Posts: 427
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: SLF: include_borders=yes doesn't work with [time_area]?

Post by WhiteWolf » February 2nd, 2019, 3:27 pm

damiendidid wrote:
January 31st, 2019, 1:21 pm
Hi, I would also like to know if there is another way to change the calendar on the whole map, thanks
Here's one idea, it's not good enough for me but who knows, might help you.
List out the time schedule for each turn. Don't use {DEFAULT_SCHEDULE} macro's, use {MORNING}, {AFTERNOON}... etc, and repeat up to the last turn.
Then after that, put the new schedule you will want to change to.

Then in the revelevant turn modify the maximum number of turns and the current turn number to match the new schedule.
Here's a simple example in a scenario with 7 turns:

Code: Select all

[scenario]
    turns=7
    {MORNING}
    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING} # this is the 7th turn, and here the normal scenario would end
    # here you can list the changed schedule - but you must also know it's length else it will repeat from the beginning. In this example there is only 2, changing back and forth
    {MY_CUSTOM_DAY_1}
    {MY_CUSTOM_DAY_2}
    {MY_CUSTOM_DAY_1}
    {MY_CUSTOM_DAY_2}
    ... for as many turns as you expect*
    
    
    # fire this event when you wish to change the schedule
    [event]
        name=change to new time of day
        [modify_turns]
            add= the new max turn limit. this should match the number of new schedule macros above at the (*) mark!
        [/modify_turns]
        [modify_turns]
            current=7 # set it to the start of the new schedule
        [/modify_turns]
    [/event]
[/scenario]
I know, it's ugly far-streched and very map-specific, therefore I don't use this, but it should be an at least working method to change the schedule on the whole map, without using [time_area]'s. It might work for you.
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now for 1.14, with new bugs!

gfgtdf
Developer
Posts: 1133
Joined: February 10th, 2013, 2:25 pm

Re: SLF: include_borders=yes doesn't work with [time_area]?

Post by gfgtdf » February 2nd, 2019, 10:57 pm

there is also replace_schedule ( https://wiki.wesnoth.org/DirectActionsW ... chedule.5D ) to change the wholöe maps timescedule.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
WhiteWolf
Forum Regular
Posts: 427
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: SLF: include_borders=yes doesn't work with [time_area]?

Post by WhiteWolf » February 2nd, 2019, 11:17 pm

Oh, so easy. Pity I didn't know about this before. Thanks :)
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now for 1.14, with new bugs!

Post Reply