Moved all the objectives-related macros to a new objective-utils.cfg file.
This commit is contained in:
parent
9762f47e5e
commit
ed990359ae
3 changed files with 109 additions and 102 deletions
|
@ -1,61 +1,9 @@
|
|||
#textdomain wesnoth
|
||||
# Utility macros for defining carryover gold, mostly in the [endlevel] tag.
|
||||
# Macros for describing the current scenario's carryover in the objectives
|
||||
# dialog are in objective-utils.cfg.
|
||||
|
||||
#define NEW_GOLD_CARRYOVER PERCENTAGE_NUMBER
|
||||
carryover_add=yes
|
||||
carryover_percentage={PERCENTAGE_NUMBER}
|
||||
#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_NOTE
|
||||
_"Early finish bonus."#enddef
|
||||
|
||||
#define NO_EARLY_FINISH_BONUS_NOTE
|
||||
_"No early finish bonus."#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_CAPTION
|
||||
_"<small>(early finish bonus)</small>"#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_FOOTNOTE
|
||||
"<span foreground='white'><small> " + _"(early finish bonus)" + "</small></span>"#enddef
|
||||
|
||||
#define NO_GOLD_CARRYOVER_NOTE
|
||||
_"No gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_100
|
||||
_"
|
||||
100% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_40
|
||||
_"
|
||||
40% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_20
|
||||
_"
|
||||
20% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define OBJECTIVE_FOOTNOTE TEXT
|
||||
"<span foreground='white'><small> " + {TEXT} + "</small></span>"
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE_CAPTION
|
||||
caption= _ "Alternative objective:"
|
||||
#enddef
|
||||
|
||||
#define BONUS_OBJECTIVE_CAPTION
|
||||
caption= _ "Bonus objective:"
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE OBJECTIVE_TEXT
|
||||
[objective]
|
||||
{ALTERNATIVE_OBJECTIVE_CAPTION}
|
||||
description={OBJECTIVE_TEXT}
|
||||
condition=win
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE_BONUS OBJECTIVE_TEXT
|
||||
[objective]
|
||||
{ALTERNATIVE_OBJECTIVE_CAPTION}
|
||||
description={OBJECTIVE_TEXT}+{EARLY_FINISH_BONUS_FOOTNOTE}
|
||||
condition=win
|
||||
[/objective]
|
||||
#enddef
|
||||
|
|
106
data/core/macros/objective-utils.cfg
Normal file
106
data/core/macros/objective-utils.cfg
Normal file
|
@ -0,0 +1,106 @@
|
|||
#textdomain wesnoth
|
||||
# Utility macros for use in the objectives dialog or for defining the whole
|
||||
# [objectives] tag.
|
||||
|
||||
#define SET_OBJECTIVES SIDE SUMMARY_TEXT NOTE_TEXT CONDITION_WML
|
||||
# Sets the objectives for a given player
|
||||
# Side 0 means every player. Does not affect gameplay,
|
||||
# except that it tells the player what the objectives of a scenario are.
|
||||
#
|
||||
# For example, we could set the objective for all players to: "survive for
|
||||
# 3 turns" with this:
|
||||
#! {SET_OBJECTIVES 0 "Survive for 3 turns" () ()}
|
||||
#
|
||||
[objectives]
|
||||
side = {SIDE}
|
||||
summary = {SUMMARY_TEXT}
|
||||
note = {NOTE_TEXT}
|
||||
{CONDITION_WML}
|
||||
[/objectives]
|
||||
#enddef
|
||||
|
||||
#define VICTORY_CONDITION DESCRIPTION
|
||||
# Used in conjunction with SET_OBJECTIVES this sets a victory condition
|
||||
# (marked green).
|
||||
#
|
||||
# For example we could tell player 2 to win by killing all other players
|
||||
#! {SET_OBJECTIVES 0 "Kill eachother." (
|
||||
#! {VICTORY_CONDITION "Kill all other players."}
|
||||
#! )}
|
||||
#
|
||||
[objective]
|
||||
condition = "win"
|
||||
description = {DESCRIPTION}
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define DEFEAT_CONDITION DESCRIPTION
|
||||
# Used in conjunction with SET_OBJECTIVES this sets a defeat condition
|
||||
# (marked red).
|
||||
#
|
||||
# For example we could tell all players that they lose if they die.
|
||||
#! {SET_OBJECTIVES 0 "Survive." (
|
||||
#! {DEFEAT_CONDITION "Death of your leader."}
|
||||
#! )}
|
||||
#
|
||||
[objective]
|
||||
condition = "lose"
|
||||
description = {DESCRIPTION}
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_NOTE
|
||||
_"Early finish bonus."#enddef
|
||||
|
||||
#define NO_EARLY_FINISH_BONUS_NOTE
|
||||
_"No early finish bonus."#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_CAPTION
|
||||
# Deprecated; use the below EARLY_FINISH_BONUS_FOOTNOTE instead
|
||||
_"<small>(early finish bonus)</small>"#enddef
|
||||
|
||||
#define EARLY_FINISH_BONUS_FOOTNOTE
|
||||
"<span foreground='white'><small> " + _"(early finish bonus)" + "</small></span>"#enddef
|
||||
|
||||
#define NO_GOLD_CARRYOVER_NOTE
|
||||
_"No gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_100
|
||||
_"
|
||||
100% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_40
|
||||
_"
|
||||
40% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define NEW_GOLD_CARRYOVER_NOTE_20
|
||||
_"
|
||||
20% of finishing gold carried over to the next scenario."#enddef
|
||||
|
||||
#define OBJECTIVE_FOOTNOTE TEXT
|
||||
"<span foreground='white'><small> " + {TEXT} + "</small></span>"
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE_CAPTION
|
||||
caption= _ "Alternative objective:"
|
||||
#enddef
|
||||
|
||||
#define BONUS_OBJECTIVE_CAPTION
|
||||
caption= _ "Bonus objective:"
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE OBJECTIVE_TEXT
|
||||
[objective]
|
||||
{ALTERNATIVE_OBJECTIVE_CAPTION}
|
||||
description={OBJECTIVE_TEXT}
|
||||
condition=win
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define ALTERNATIVE_OBJECTIVE_BONUS OBJECTIVE_TEXT
|
||||
[objective]
|
||||
{ALTERNATIVE_OBJECTIVE_CAPTION}
|
||||
description={OBJECTIVE_TEXT}+{EARLY_FINISH_BONUS_FOOTNOTE}
|
||||
condition=win
|
||||
[/objective]
|
||||
#enddef
|
|
@ -17,53 +17,6 @@
|
|||
#define EVERYWHERE
|
||||
x,y=1-999,1-999 #enddef
|
||||
|
||||
#define SET_OBJECTIVES SIDE SUMMARY_TEXT NOTE_TEXT CONDITION_WML
|
||||
# Sets the objectives for a given player
|
||||
# Side 0 means every player. Does not affect gameplay,
|
||||
# except that it tells the player what the objectives of a scenario are.
|
||||
#
|
||||
# For example, we could set the objective for all players to: "survive for
|
||||
# 3 turns" with this:
|
||||
#! {SET_OBJECTIVES 0 "Survive for 3 turns" () ()}
|
||||
#
|
||||
[objectives]
|
||||
side = {SIDE}
|
||||
summary = {SUMMARY_TEXT}
|
||||
note = {NOTE_TEXT}
|
||||
{CONDITION_WML}
|
||||
[/objectives]
|
||||
#enddef
|
||||
|
||||
#define VICTORY_CONDITION DESCRIPTION
|
||||
# Used in conjunction with SET_OBJECTIVES this sets a victory condition
|
||||
# (marked green).
|
||||
#
|
||||
# For example we could tell player 2 to win by killing all other players
|
||||
#! {SET_OBJECTIVES 0 "Kill eachother." (
|
||||
#! {VICTORY_CONDITION "Kill all other players."}
|
||||
#! )}
|
||||
#
|
||||
[objective]
|
||||
condition = "win"
|
||||
description = {DESCRIPTION}
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define DEFEAT_CONDITION DESCRIPTION
|
||||
# Used in conjunction with SET_OBJECTIVES this sets a defeat condition
|
||||
# (marked red).
|
||||
#
|
||||
# For example we could tell all players that they lose if they die.
|
||||
#! {SET_OBJECTIVES 0 "Survive." (
|
||||
#! {DEFEAT_CONDITION "Death of your leader."}
|
||||
#! )}
|
||||
#
|
||||
[objective]
|
||||
condition = "lose"
|
||||
description = {DESCRIPTION}
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define SIDE_PLAYER SIDE TEAM_NAME DESCRIPTION GOLD_AMOUNT INCOME_AMOUNT SIDE_WML
|
||||
# Defines a multiplayer side in a scenario that is controllable by the player.
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue