AlternateToDWML

From The Battle for Wesnoth Wiki


These macros can be used in scenarios to have a scenario take place hour-by-hour (for example, a battle where you have to survive until morning). The illuminated varieties exist for use in [time_area] tags for something like a lighthouse (so that normal illumination doesn't stack, and so that the effect of the lighthouse works like that of the illuminates ability during the day and night.

Note that these have been mainlined in the 1.9.x series with some modifications.

# 24-hour clock time-of-day macros.

#define HOUR0
    [time]
        id=hour0
        name=_"0:00 - Midnight"
        image=schedule/schedule.png~CROP(0,195,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR1
    [time]
        id=hour1
        name=_"1:00"
        image=schedule/schedule.png~CROP(250,234,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR2
    [time]
        id=hour2
        name=_"2:00"
        image=schedule/schedule.png~CROP(125,234,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR3
    [time]
        id=hour3
        name=_"3:00"
        image=schedule/schedule.png~CROP(0,234,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR4
    [time]
        id=hour4
        name=_"4:00"
        image=schedule/schedule.png~CROP(250,273,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR5
    [time]
        id=hour5
        name=_"5:00"
        image=schedule/schedule.png~CROP(125,273,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR6
    [time]
        id=hour6
        name=_"6:00"
        image=schedule/schedule.png~CROP(0,273,125,39)
        lawful_bonus=-15
        red=-30
        green=-30
        blue=-5
    [/time]
#enddef

#define HOUR7
    [time]
        id=hour7
        name=_"7:00 - Dawn"
        image=schedule/schedule.png~CROP(250,0,125,39)
        red=-20
        green=-20
        sound=ambient/morning.ogg
    [/time]
#enddef

#define HOUR8
    [time]
        id=hour8
        name=_"8:00"
        image=schedule/schedule.png~CROP(125,0,125,39)
        lawful_bonus=15
    [/time]
#enddef

#define HOUR9
    [time]
        id=hour9
        name=_"9:00"
        image=schedule/schedule.png~CROP(0,0,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR10
    [time]
        id=hour10
        name=_"10:00"
        image=schedule/schedule.png~CROP(250,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR11
    [time]
        id=hour11
        name=_"11:00"
        image=schedule/schedule.png~CROP(125,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR12
    [time]
        id=hour12
        name=_"12:00 - Noon"
        image=schedule/schedule.png~CROP(0,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR13
    [time]
        id=hour13
        name=_"13:00"
        image=schedule/schedule.png~CROP(250,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR14
    [time]
        id=hour14
        name=_"14:00"
        image=schedule/schedule.png~CROP(125,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR15
    [time]
        id=hour15
        name=_"15:00"
        image=schedule/schedule.png~CROP(0,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR16
    [time]
        id=hour16
        name=_"16:00"
        image=schedule/schedule.png~CROP(250,117,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR17
    [time]
        id=hour17
        name=_"17:00"
        image=schedule/schedule.png~CROP(125,117,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR18
    [time]
        id=hour18
        name=_"18:00"
        image=schedule/schedule.png~CROP(0,117,125,39)
        lawful_bonus=15
        green=-10
        blue=-10
    [/time]
#enddef

#define HOUR19
    [time]
        id=hour19
        name=_"19:00 - Sunset"
        image=schedule/schedule.png~CROP(250,156,125,39)
        green=-20
        blue=-20
        sound=ambient/night.ogg
    [/time]
#enddef

#define HOUR20
    [time]
        id=hour20
        name=_"20:00"
        image=schedule/schedule.png~CROP(125,156,125,39)
        lawful_bonus=-15
        red=-20
        green=-30
        blue=-5
    [/time]
#enddef

#define HOUR21
    [time]
        id=hour21
        name=_"21:00"
        image=schedule/schedule.png~CROP(0,156,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR22
    [time]
        id=hour22
        name=_"22:00"
        image=schedule/schedule.png~CROP(250,195,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

#define HOUR23
    [time]
        id=hour23
        name=_"23:00"
        image=schedule/schedule.png~CROP(125,195,125,39)
        lawful_bonus=-25
        red=-40
        green=-40
        blue=-10
    [/time]
#enddef

# Alternate forced-illuminated times of day for lighthouses and such:

#define HOUR0_ILLUMINATED
    [time]
        id=illuminated-hour0
        name=_"0:00 - Midnight"
        image=schedule/schedule-illuminated.png~CROP(0,195,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR1_ILLUMINATED
    [time]
        id=illuminated-hour1
        name=_"1:00"
        image=schedule/schedule-illuminated.png~CROP(250,234,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR2_ILLUMINATED
    [time]
        id=illuminated-hour2
        name=_"2:00"
        image=schedule/schedule-illuminated.png~CROP(125,234,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR3_ILLUMINATED
    [time]
        id=illuminated-hour3
        name=_"3:00"
        image=schedule/schedule-illuminated.png~CROP(0,234,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR4_ILLUMINATED
    [time]
        id=illuminated-hour4
        name=_"4:00"
        image=schedule/schedule-illuminated.png~CROP(250,273,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR5_ILLUMINATED
    [time]
        id=illuminated-hour5
        name=_"5:00"
        image=schedule/schedule-illuminated.png~CROP(125,273,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR6_ILLUMINATED
    [time]
        id=illuminated-hour6
        name=_"6:00"
        image=schedule/schedule-illuminated.png~CROP(0,273,125,39)
        lawful_bonus=15
        red=-25
        green=-25
        blue=-3
    [/time]
#enddef

#define HOUR7_ILLUMINATED
    [time]
        id=illuminated-hour7
        name=_"7:00 - Dawn"
        image=schedule/schedule-illuminated.png~CROP(250,0,125,39)
        lawful_bonus=25
        red=-15
        green=-15
        sound=ambient/morning.ogg
    [/time]
#enddef

#define HOUR8_ILLUMINATED
    [time]
        id=illuminated-hour8
        name=_"8:00"
        image=schedule/schedule-illuminated.png~CROP(125,0,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR9_ILLUMINATED
    [time]
        id=illuminated-hour9
        name=_"9:00"
        image=schedule/schedule-illuminated.png~CROP(0,0,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR10_ILLUMINATED
    [time]
        id=illuminated-hour10
        name=_"9:1"
        image=schedule/schedule-illuminated.png~CROP(250,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR11_ILLUMINATED
    [time]
        id=illuminated-hour11
        name=_"11:00"
        image=schedule/schedule-illuminated.png~CROP(125,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR12_ILLUMINATED
    [time]
        id=illuminated-hour12
        name=_"12:00 - Noon"
        image=schedule/schedule-illuminated.png~CROP(0,39,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR13_ILLUMINATED
    [time]
        id=illuminated-hour13
        name=_"13:00"
        image=schedule/schedule-illuminated.png~CROP(250,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR14_ILLUMINATED
    [time]
        id=illuminated-hour14
        name=_"14:00"
        image=schedule/schedule-illuminated.png~CROP(125,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR15_ILLUMINATED
    [time]
        id=illuminated-hour15
        name=_"15:00"
        image=schedule/schedule-illuminated.png~CROP(0,78,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR16_ILLUMINATED
    [time]
        id=illuminated-hour16
        name=_"16:00"
        image=schedule/schedule-illuminated.png~CROP(250,117,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR17_ILLUMINATED
    [time]
        id=illuminated-hour17
        name=_"17:00"
        image=schedule/schedule-illuminated.png~CROP(125,117,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR18_ILLUMINATED
    [time]
        id=illuminated-hour18
        name=_"18:00"
        image=schedule/schedule-illuminated.png~CROP(0,117,125,39)
        lawful_bonus=25
    [/time]
#enddef

#define HOUR19_ILLUMINATED
    [time]
        id=illuminated-hour19
        name=_"19:00 - Sunset"
        image=schedule/schedule-illuminated.png~CROP(250,156,125,39)
        lawful_bonus=25
        red=-15
        green=-15
        sound=ambient/night.ogg
    [/time]
#enddef

#define HOUR20_ILLUMINATED
    [time]
        id=illuminated-hour20
        name=_"20:00"
        image=schedule/schedule-illuminated.png~CROP(125,156,125,39)
        lawful_bonus=15
        red=-25
        green=-25
        blue=-3
    [/time]
#enddef

#define HOUR21_ILLUMINATED
    [time]
        id=illuminated-hour21
        name=_"21:00"
        image=schedule/schedule-illuminated.png~CROP(0,156,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR22_ILLUMINATED
    [time]
        id=illuminated-hour22
        name=_"22:00"
        image=schedule/schedule-illuminated.png~CROP(250,195,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

#define HOUR23_ILLUMINATED
    [time]
        id=illuminated-hour23
        name=_"23:00"
        image=schedule/schedule-illuminated.png~CROP(125,195,125,39)
        red=-35
        green=-35
        blue=-7
    [/time]
#enddef

See Also

This page was last edited on 16 July 2019, at 14:28.