Idea: new WML tag [repeated_message]

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Idea: new WML tag [repeated_message]

Post by Dugi »

I think that it might be useful to add a WML tag that would show a message with options repeatedly until the selected option contains a [break] tag. Optionally, options that were selected before would disappear.

It would be useful to allow the player to ask some questions about less important stuff without forcing him to go through the dialogue. It might motivate campaign writers to add some lore or background information without annoying players with unwanted long dialogues.

Example:
Scout: We have seen dwarven settlements in the mountains. We might want to get there!
Leader: Very well. Is it reachable?
Scout: We are quite sure that the path we found leads right into that village.
Leader: Nice work, Marcyn.
Scout: Any more questions, Captain?
Leader (options):
  • Any signs of possible trouble on the way?
  • Are you sure that the orcs haven't gone this way?
  • How many villages are ahead?
  • Do you think that we can get our horses there?
  • Does anybody remember this man? I cannot, so I can't be sure if he isn't an impostor luring us into a trap.
  • No more questions. Thank you for your assistance.


I can do it in lua without problems, I just want to know if it's a good idea or not. Doing it in WML was very bug prone.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: Idea: new WML tag [repeated_message]

Post by ForestDragon »

there is a [do] and [while], look at some of the shop code i used in my first addon:

Code: Select all

        [set_variable]
            name=choosingdone
            value=no
        [/set_variable]
        [while]
            [variable]
                name=choosingdone
                equals=no
            [/variable]
            [do]
                [message]
                    image="portraits/cloaked2.png"
                    caption="Trader"
                    speaker=Trader
                    message= _ "<i>So, what can i do for you, stranger?</i>"

                    [option]
                        message=  {MENU_IMG_TXT "icons/coins_copper.png" _"I want to buy a few things"}
                        [command]
        [set_variable]
            name=choosingdone
            value=yes
        [/set_variable]
                           {CLOAKED_TRADER_BUY_1}
                        [/command]
                    [/option]
                    [option]
                        message=  {MENU_IMG_TXT "icons/cloak_leather_brown.png" _"Talk"}
	 [show_if]
	     [variable]
                  name=traderrep
                  greater_than=2
             [/variable]
	 [/show_if]
                        [command]
                           {CLOAKED_TRADER_TALK}
                        [/command]
                    [/option]
                    [option]
                        message=  {MENU_IMG_TXT "icons/boots_elven.png" _"Sorry, but i got to be going, i have an undead threat to defeat, after all."}
                        [command]
#                            [if]
#                                [variable]
#                                    name=traderrep
#                                    greater_than_equal_to=3
#                                [then]
                            [message]
                                speaker=Trader
                                caption="Trader"
                                image="portraits/cloaked2.png"
                                message= _ "<i>It was nice dealing with you, i am looking forward to the next time we meet</i>."
                            [/message]
#                            [set_variable]
#                                name=shoppingdone
#                                value=yes
#                            [/set_variable]
                                    [set_variable]
                                        name=tradermet
                                        add=1
                                    [/set_variable]
                                    [set_variable]
                                        name=traderrep
                                        add=3
                                    [/set_variable]
        [set_variable]
            name=choosingdone
            value=yes
        [/set_variable]
#                                [/then]
#                                [else]
#                            [message]
#                                speaker=Trader
#                                caption="Trader"
#                                image="portraits/cloaked2.png"
#                                message= _ "<i>As you wish</i>."
#                            [/message]
#                                    [set_variable]
#                                        name=tradermet
#                                        add=1
#                                    [/set_variable]
#                                    [set_variable]
#                                        name=traderrep
#                                        add=1
#                                    [/set_variable]
#                                [/else]
#                            [/if]
                        [/command]
                    [/option]
                [/message]
            [/do]
        [/while]
you get the idea
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Idea: new WML tag [repeated_message]

Post by Dugi »

ForestDragon wrote:there is a [do] and [while], look at some of the shop code i used in my first addon:
Dugi wrote:I can do it in lua without problems... Doing it in WML was very bug prone.
I know how to do it, but putting that together in WML is an ugly piece of code. It's impractical to do with macros, I used to copy it from one scenario to another, but it created a lot of bugs. Many newbie campaign makers are also unfamiliar with variables. Having a WML tag for it would also encourage writers to do it.
Last edited by Dugi on August 23rd, 2016, 12:12 pm, edited 1 time in total.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: Idea: new WML tag [repeated_message]

Post by ForestDragon »

well, your idea could be useful to shorten that kind of mess indeed, i just wanted to point it out, but i agree with you
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Idea: new WML tag [repeated_message]

Post by zookeeper »

I can't say I really see how a simple [while] loop with some [option]s is particularly ugly or bug-prone, even if you added variable-based state tracking so that every option can only be chosen once.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: Idea: new WML tag [repeated_message]

Post by ForestDragon »

zookeeper wrote:I can't say I really see how a simple [while] loop with some [option]s is particularly ugly or bug-prone, even if you added variable-based state tracking so that every option can only be chosen once.
i agree with you, i used it in a campaign (almost) all over, and no issues related to the [while] loop, besides, dugi, i seen you implement a few WML tags using Lua, so you could make that if wanted to
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Idea: new WML tag [repeated_message]

Post by Dugi »

i seen you implement a few WML tags using Lua, so you could make that if wanted to
Yeah, that is not a problem, I have it even partially implemented and it saved me from a lot of nuisance when writing Affably Evil. I am not talking about the work, I just want to know if it would be accepted if I make a pull request with it. What I want is to make it easily available to everyone.

I am thinking more about the implications of its widespread use. It would be cool if (using HttT as example) the player was allowed to ask Delfador about details of his lectures, to ask Li'sar more deeply about her story, to let him learn who Kalenz actually is (when I was playing it all those years ago, I never learned who that zany is), to ask at some point how is Chantal going...
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Idea: new WML tag [repeated_message]

Post by beetlenaut »

Dugi wrote:It would be cool if (using HttT as example) the player was allowed to ask Delfador about details of his lectures, to ask Li'sar more deeply about her story, to ask at some point how is Chantal going...
In this case, it shouldn't be in the normal story dialog. It should be accessible at any time. If it was only visible in the story dialog, a player would feel obligated to explore all the options one after the other for fear of not being able to ask those questions later and missing important information. They would feel like they had to read everything before continuing to play. If it were in a right-click dialog or menu option, the player could explore the information when they were bored or wanted a short break, and wouldn't feel like they had to do it at a specific time, making it truly optional.
Dugi wrote:to let him learn who Kalenz actually is
What? That's the biggest reveal in the plot!
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Idea: new WML tag [repeated_message]

Post by Dugi »

beetlenaut wrote:In this case, it shouldn't be in the normal story dialog. It should be accessible at any time. If it was only visible in the story dialog, a player would feel obligated to explore all the options one after the other for fear of not being able to ask those questions later and missing important information.
Afaik, large number of players skip the dialogues and read only the objectives... if they read something at all, I've had a bug report telling that some scenario does not end even if all the enemy leaders are defeated in a scenario where the objectives was to reach the other border of the map. Others skim them quickly, missing some details and not understanding some parts of the plot.
beetlenaut wrote:What? That's the biggest reveal in the plot!
Nah, he just something like I am a big hero (from another story) and then he returns to being the same pantaloon as before. I have played through the whole campaign without knowing who that guy was, he was like another Delfador, just less friendly and with better melee. I had to play through Legend of Wesmere to get some idea who he was and I chose that one only because I like the elvish faction.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Idea: new WML tag [repeated_message]

Post by zookeeper »

Dugi wrote:Yeah, that is not a problem, I have it even partially implemented and it saved me from a lot of nuisance when writing Affably Evil. I am not talking about the work, I just want to know if it would be accepted if I make a pull request with it. What I want is to make it easily available to everyone.
Well, depends on what the API is like and how much it complicates the [message] implementation.
Dugi wrote:I am thinking more about the implications of its widespread use. It would be cool if (using HttT as example) the player was allowed to ask Delfador about details of his lectures, to ask Li'sar more deeply about her story, to let him learn who Kalenz actually is (when I was playing it all those years ago, I never learned who that zany is), to ask at some point how is Chantal going...
Well, if we're talking about game design, I actually don't find that dialogue mechanic very appealing in itself. If I'm invested in the game, all it means is that I'll have to click on each option, because if I don't, I miss out on some content. The only time I try to quickly breeze through a discussion and only get the piece of information I think I need right now is when I'm not particularly invested and don't care if I end up missing out on something.

Now, that's not to say it can't be used; after all, someone who wants to not miss anything only needs to click through everything on their first playthrough and can skip them on subsequent ones. And certainly a majority of my all-time favorite games of all time are RPG's with dialogue options. So it's not a bad mechanic as such, but whether it works well depends on the game. In a typical RPG you can consistently reward the player for actually exploring what an NPC might have to say and thinking about your responses (that's what RPG stands for, after all), and you can (usually) choose when to initiate dialogue with an NPC and continue it later if you want, and so on. Mainline Wesnoth storytelling is almost entirely linear, there's no "talk to" mechanic so you can choose when to talk to someone, the point of the game is strategy, not discussions, and the interface is awkward for long dialogue anyway. So is it really something that would work if used often in a mainline campaign? Maybe, maybe not, but it's not obvious that that's a good way to incorporate the extra dialogue. The extra stories you could squeeze out of Delfador could just be spaced apart and delivered in the traditional manner, too.
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Idea: new WML tag [repeated_message]

Post by beetlenaut »

Dugi wrote:Afaik, large number of players skip the dialogues and read only the objectives... if they read something at all
Yes, some people do that, but this feature is not for them anyway!
Dugi wrote:I have played through the whole campaign without knowing who that guy was
Then you must be one of the people who skips the reading. It's explained in the story dialog before the first scenario starts. (I thought you meant the real explanation at the end. Maybe you skipped that too.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Idea: new WML tag [repeated_message]

Post by Dugi »

zookeeper wrote:Well, depends on what the API is like and how much it complicates the [message] implementation.
It complicates it only a very little. In the usual case, it only requires adding an empty [break] tag. Here is a sample of using its early version in a campaign (here it's just to let the player throw in some useless ideas):

Code: Select all

        [repeating_message]
            speaker=Antipos
            first=_"Do you see a way to get more money from it?"
	    message=_"Any other ideas?"
	    [option]
		message=_"We might hire them as mercenaries."
		[command]
			[message]
			    speaker=Antipos
			    message=_"I fear that their hatred towards your family is too strong for that. Would you mind being hired by somebody who ruined your life before, Judas?"
			[/message]
			[message]
			    speaker=Judas
			    message=_"No, but as far as I know, most mercenaries would."
			[/message]
		[/command]
	    [/option]
	    [option]
		message=_"How about paying a necromancer to slaughter them?"
		[command]
			[message]
			    speaker=Antipos
			    message=_"That would connect us with necromancy. Rumours about necromantic overlords would spread and that is not quite what you want."
			[/message]
		[/command]
	    [/option]
	    [option]
		message=_"We might have my sister marry their leader and redirect them against our other enemies or subvert them."
		[command]
			[message]
			    speaker=Acanthamoeba
			    message=_"No! I am getting convinced that you are <i>mocking</i> me with suggestions like this."
			[/message]
			[message]
			    speaker=Krux
			    message=_"Living as a spy and outlaw at the same time has so much romance in it, so much adventure. I would like living like that, but, unfortunately, it is very rare that a bandit leader is a woman. And even more rare that it is a pretty one. So I can only envy you."
			[/message]
			[message]
			    speaker=Acanthamoeba
			    message=_"I do not see it like you."
			[/message]
			[message]
			    speaker=Krux
			    message=_"Fine, fine. It is my moral obligation not to go against your will."
			[/message]
		[/command]
	    [/option]
	    [option]
		message=_"No."
		[command]
			[message]
			    speaker=Antipos
			    message=_"That is a pity."
			[/message]
			[break]
			[/break]
		[/command]
	    [/option]
        [/repeating_message]
Regarding usage, it would surely be more useful in non-linear campaigns. I still somehow think that it could be used in normal campaigns, but it appears that I am against the consensus here.
beetlenaut wrote:Yes, some people do that, but this feature is not for them anyway!
It is for them, to allow them to quickly skip and filter out everything that isn't of the greatest importance.
beetlenaut wrote:Then you must be one of the people who skips the reading. It's explained in the story dialog before the first scenario starts.
How am I supposed to remember that :augh: :doh: The story was mainly about Asheviere usurping the throne and Delfador saving some kid, that is what I did remember.
Tad_Carlucci
Inactive Developer
Posts: 503
Joined: April 24th, 2016, 4:18 pm

Re: Idea: new WML tag [repeated_message]

Post by Tad_Carlucci »

My concern is how the repeating message tag would handle state changes. [show_if] can cause sections to appear or disappear as the player selects responses based upon storing values or other such changes. But, I wonder if that is robust enough to handle the myriad paths which might occur. I can see the tag growing to a huge size as more and more special-case branches are added.

I have seen dialogs such as this proposes in other games. Usually, it works well; especially when it's simply a drill-down for information. But, I do remember a few times when I 'gamed' the system by trying each possible response until I found the one (or the sequence) which created the situation I wanted. Sure, I can use save/restore for that, but this sort of drill-down conversation can make it far easier and quicker.
I forked real life and now I'm getting merge conflicts.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Idea: new WML tag [repeated_message]

Post by Dugi »

My current implementation inserts a piece of variable setting code in the possibilities to know what was pressed. It also stores the whole tag (which is necessary to get any information from it), removes the options which should no longer appear and calls the rest as a regular WML message. Things like [show_if] work like always, without any changes, because this code does not touch it. It does not boil down to overly complicated cases.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: Idea: new WML tag [repeated_message]

Post by ForestDragon »

beetlenaut wrote:
Dugi wrote:Afaik, large number of players skip the dialogues and read only the objectives... if they read something at all
Yes, some people do that, but this feature is not for them anyway!
i, on the other hand, read the dialog, and skip the gameplay using :debug :lol:
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Post Reply