[ZSDF]Random string support for YesMessage & NoMessage
Moderator: GZDoom Developers
-
- Posts: 2178
- Joined: Sun Jan 10, 2010 4:05 pm
- Location: Southern California
[ZSDF]Random string support for YesMessage & NoMessage
Pretty much what it says. USDF can already print a string chosen at random from a set list in the LANGUAGE lump for use by an NPC in their dialog, so it'd be helpful if YesMessage & NoMessage could do this too.
Last edited by amv2k9 on Fri Nov 18, 2016 3:32 pm, edited 1 time in total.
-
- Posts: 2100
- Joined: Sun Aug 18, 2013 9:41 am
- Location: Philadelphia, PA
Re: [USDF]Random string support for YesMessage & NoMessage
It can?amv2k9 wrote:USDF can already print a string chosen at random from a set list in the LANGUAGE lump for use by an NPC in their dialog

-
- Posts: 2178
- Joined: Sun Jan 10, 2010 4:05 pm
- Location: Southern California
Re: [USDF]Random string support for YesMessage & NoMessage
Yeah. You can see it in action in vanilla Strife. Just talk to any guard, peasant or beggar more than once. The strings are stored in LANGUAGE, under TXT_RANDOM_PEASANT_01-10, TXT_RANDOM_AGUARD_01-05 and so forth.TheMightyHeracross wrote:It can?amv2k9 wrote:USDF can already print a string chosen at random from a set list in the LANGUAGE lump for use by an NPC in their dialog
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: [USDF]Random string support for YesMessage & NoMessage
What's interesting is that those random strings are "dynamic" in the sense that you can use the same naming convention for totally new strings and ZDoom will detect them and have them use randomness too. Pretty neat.
-
- Posts: 2178
- Joined: Sun Jan 10, 2010 4:05 pm
- Location: Southern California
Re: [ZSDF]Random string support for YesMessage & NoMessage
Updated this to reflect the request being for ZSDF instead.
-
-
- Posts: 3200
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: [ZSDF]Random string support for YesMessage & NoMessage
This was already part of the USDF 2.2 draft which I kind of forgot about myself and was basically approved by lack of comment.
-
-
- Posts: 17481
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZSDF]Random string support for YesMessage & NoMessage
This was a very good proposal... I wonder why it was never implemented. :OMy suggestion is to add a byechoice block which contains all the options of the current choice block except it can't have a cost (thus can't display one) and it would not have closedialog (always true). This would still allow mod authors to create "can't back out" situations by having the dialog switch the current page and/or execute a line special. Pressing escape should be equivalent to selecting this option. Hiding the option could be implied by the text being empty.
-
-
- Posts: 3200
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: [ZSDF]Random string support for YesMessage & NoMessage
Like I said, I kind of forgot I did this (I don't even remember if it was questions during SVE development or something else that prompted it) and the recent interest in the Strife dialogs reminded me that I never implemented these things. I'll put that back on my short list unless someone else has an interest in taking a stab at it.