Skip to content

Commit

Permalink
more creating infrastructure for support convos
Browse files Browse the repository at this point in the history
(untested)
see nemaara/A_New_Order#73
  • Loading branch information
cooljeanius committed Dec 16, 2023
1 parent b2116ea commit 0b25bc0
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 21 deletions.
1 change: 1 addition & 0 deletions _main.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Version "+{~{LDR_PATH}/dist/VERSION}
# ...some sort of error?
#endif

{./lua}
{./macros}
[units]
{./units}
Expand Down
9 changes: 9 additions & 0 deletions lua/ano_wml_tags.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
-- (stub file that I may possibly put stuff in in the future)

if not wml_actions then wml_actions = {} end

function wml_actions.get_support_between(cfg)
local char1 = cfg.char1
local char2 = cfg.char2
-- TODO
wesnoth.set_variable(ano_support_level, 0)
end

37 changes: 37 additions & 0 deletions macros/conversations_support.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#textdomain wesnoth-A_New_Order

#define SUPPORT_CONVO CHAR1 CHAR2 CCONVO BCONVO ACONVO SCONVO
[get_support_between]
char1={CHAR1}
char2={CHAR2}
[/get_support_between]
# TODO: check if player already had the support convo for a specific support level before playing its dialogue
[switch]
variable=ano_support_level
[case]
value="C"
{CCONVO}
[/case]
[case]
value="B"
{BCONVO}
[/case]
[case]
value="A"
{ACONVO}
[/case]
[case]
value="S"
{SCONVO}
[/case]
[else]
{DEBUGMSG1 "Error: unhandled support level $ano_support_level between {CHAR1} and {CHAR2}."}
[/else]
[/switch]
#enddef

# Other things to consider:
# - When the support convos play will affect which portraits the characters should have,
# which in turn will affect which message macros should be used. Maybe the opportunity
# to do them should be limited to only a single one of the exploration scenarios?
{SUPPORT_CONVO Gawen Reme {} {} {} {}}
4 changes: 2 additions & 2 deletions macros/elvish_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# FIXME: This can lead to two messages in a row in S12:
[message]
speaker=Elorain
# See scenarios/11_Council_in_Freetown for where these randomly-chosen phrases come from:
#po: See scenarios/11_Council_in_Freetown for where these randomly-chosen phrases come from:
message=_"Ha! $ano_elorain_$random "
image=portraits/elorain.png
[/message]
Expand All @@ -60,7 +60,7 @@
{RANDOM 1..10}
[message]
speaker=Milildur
# See scenarios/11_Council_in_Freetown for where the randomly-chosen phrases come from:
#po: See scenarios/11_Council_in_Freetown for where the randomly-chosen phrases come from:
message=_"Ha! $ano_milildur_$random "
image=portraits/milildur.png
[/message]
Expand Down
40 changes: 21 additions & 19 deletions translations/wesnoth-A_New_Order.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.wesnoth.org/\n"
"POT-Creation-Date: 2023-12-16 03:20 UTC\n"
"POT-Creation-Date: 2023-12-16 20:39 UTC\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -341,7 +341,7 @@ msgstr ""
#. [unit_type]: id=Akladian Protector, race=akladian
#. [campaign]: id=A_New_Order
#: A_New_Order/units/akladians/Akladian_Protector.cfg:4
#: A_New_Order/_main.cfg:56
#: A_New_Order/_main.cfg:59
msgid "Akladian Protector"
msgstr ""

Expand Down Expand Up @@ -399,7 +399,7 @@ msgstr ""
#. [unit_type]: id=Akladian Clansman, race=akladian
#. [campaign]: id=A_New_Order
#: A_New_Order/units/akladians/Akladian_Clansman.cfg:4
#: A_New_Order/_main.cfg:53
#: A_New_Order/_main.cfg:56
msgid "Akladian Clansman"
msgstr ""

Expand Down Expand Up @@ -438,7 +438,7 @@ msgstr ""
#. [unit_type]: id=Akladian Warrior, race=akladian
#. [campaign]: id=A_New_Order
#: A_New_Order/units/akladians/Akladian_Warrior.cfg:4
#: A_New_Order/_main.cfg:54
#: A_New_Order/_main.cfg:57
msgid "Akladian Warrior"
msgstr ""

Expand Down Expand Up @@ -555,7 +555,7 @@ msgstr ""
#. [unit_type]: id=Akladian Shieldguard, race=akladian
#. [campaign]: id=A_New_Order
#: A_New_Order/units/akladians/Akladian_Shieldguard.cfg:4
#: A_New_Order/_main.cfg:55
#: A_New_Order/_main.cfg:58
msgid "Akladian Shieldguard"
msgstr ""

Expand Down Expand Up @@ -729,11 +729,13 @@ msgid "Now, I will meet the best marksman... Death never misses."
msgstr ""

#. [message]: speaker=Elorain
#. See scenarios/11_Council_in_Freetown for where these randomly-chosen phrases come from:
#: A_New_Order/macros/elvish_macros.cfg:51
msgid "Ha! $ano_elorain_$random "
msgstr ""

#. [message]: speaker=Milildur
#. See scenarios/11_Council_in_Freetown for where the randomly-chosen phrases come from:
#: A_New_Order/macros/elvish_macros.cfg:64
msgid "Ha! $ano_milildur_$random "
msgstr ""
Expand Down Expand Up @@ -1162,28 +1164,28 @@ msgstr ""
msgid "Stingy bastard."
msgstr ""

#: A_New_Order/macros/ano_macros.cfg:464
#: A_New_Order/macros/ano_macros.cfg:502
msgid "getunit $x1 : $y1 : $ano_tmp.description"
msgstr ""

#: A_New_Order/macros/ano_macros.cfg:468
#: A_New_Order/macros/ano_macros.cfg:506
msgid "getunit $x1 : $y1 : $ano_tmp.id"
msgstr ""

#: A_New_Order/macros/ano_macros.cfg:906
#: A_New_Order/macros/ano_macros.cfg:947
msgid "This is a debug message. If you see it, then it means I forgot to delete it from the release scenario."
msgstr ""

#. trailing space is intentional here, since further text is supposed to be spliced on at the end:
#: A_New_Order/macros/ano_macros.cfg:915
#: A_New_Order/macros/ano_macros.cfg:957
msgid "This is a debug message. If you see it, then it means I forgot to delete it from the release scenario. "
msgstr ""

#: A_New_Order/macros/ano_macros.cfg:1066
#: A_New_Order/macros/ano_macros.cfg:1114
msgid "The unit $ano_loyal[0].name became LOYAL."
msgstr ""

#: A_New_Order/macros/ano_macros.cfg:1072
#: A_New_Order/macros/ano_macros.cfg:1122
msgid "Scenario notes:"
msgstr ""

Expand Down Expand Up @@ -11588,17 +11590,17 @@ msgid "yet she is still alive"
msgstr ""

#. [event]
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2328
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2327
msgid "This underling has incredible luck!"
msgstr ""

#. [event]
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2329
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2328
msgid "What do you mean, Bor?"
msgstr ""

#. [event]
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2330
#: A_New_Order/scenarios/04_Battle_of_Barnon.cfg:2329
msgid "I don't know how to explain this. But... For example, I was so sure our warriors will kill that $tmp, $tmpg|!"
msgstr ""

Expand Down Expand Up @@ -17560,27 +17562,27 @@ msgid "ANO"
msgstr ""

#. [campaign]: id=A_New_Order
#: A_New_Order/_main.cfg:53
#: A_New_Order/_main.cfg:56
msgid "Trivial"
msgstr ""

#. [campaign]: id=A_New_Order
#: A_New_Order/_main.cfg:54
#: A_New_Order/_main.cfg:57
msgid "Normal"
msgstr ""

#. [campaign]: id=A_New_Order
#: A_New_Order/_main.cfg:55
#: A_New_Order/_main.cfg:58
msgid "Difficult"
msgstr ""

#. [campaign]: id=A_New_Order
#: A_New_Order/_main.cfg:56
#: A_New_Order/_main.cfg:59
msgid "Impossible"
msgstr ""

#. [campaign]: id=A_New_Order
#: A_New_Order/_main.cfg:59
#: A_New_Order/_main.cfg:62
msgid ""
"The old kingdom of Wesnoth has fallen before barbarian hordes. The occupying barbarians are on the brink of civil war, the seeds of Wesnothian rebellion are kept alive by old legends, while bandits and Dunefolk mercenaries roam the land. Can Gawen Hagarthen unite these disparate factions against a common foe?\n"
"\n"
Expand Down

0 comments on commit 0b25bc0

Please sign in to comment.