Page 1 of 2

Extended Strife Dialog Format

Posted: Tue Jun 16, 2015 8:38 am
by Lavender Moon
I've got a GPL fork of GZDoom, and I've been working on a extending the ZSDF to make it more useful for new games. Additions:

Code: Select all

Page
{
    ForceChoice = bool; // Requires the player to make a choice, rather than backing out of the conversation.
                        //    If there is only one option, attempting to back out will select that option.
                        //    If there are no options, this property is ignored. In all cases, hitting escape
                        //    will bring the player to the menu. It is not possible to save while in a
                        //    conversation. The player can still back out by hitting a number key larger than
                        //    the amount of choices available (later on, I'll make Tab also exit the menu).
    Choice
    {
        DisplayIfHasItem = "ClassName";   // Only let the player see the option if they have this item.
        DisplayIfHasItemAmount = int;     // Only let the player see the option if they have X amount
                                          //    of the item specified by DisplayIfHasItem.
        DisplayIfLacksItem = "ClassName"; // Only let the player see the option if they do not have this item.
        Cost
        {
            PayCost = bool;               // If false, the cost is not actually taken, only checked for.
            PassFormat = "format string"; // The format string used to format the choice when the player can
                                          //    afford to buy it. %c represents the cost, %o represents the
                                          //    amount  the player owns, and %s represents the choice's Text
                                          //    property.
            FailFormat = "format string"; // The format string used to format the choice when the player can
                                          //    not afford to buy it. %c represents the cost, %o represents the
                                          //    amount the player owns, and %s represents the choice's Text
                                          //    property.
        }
    }
}
I've eliminated most of the bugs that have cropped up, and the only ones I know of are that pausing while in the initial animation will stop it and that the SaveAngle property is not saved when pausing and unpausing. I haven't been able to test multiplayer, however. Would anyone be willing to test it out for me?

Download Link

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 8:47 am
by Nash
YES PLEASE :D

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 10:19 am
by Xeotroid

Code: Select all

ForceChoice = bool;
Oh my god. Yes. YES.

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 11:27 am
by TheBadHustlex
Its pretty damn nice that GZDoom gets a way to do dialogs that actually focus on something else then just buying stuff.
Beeing able to just escape a conversation is probably the most unsuiting thing for dialogs that are supposed to be relevant for quests, the story and such. I'm more then glad that someone made it possible to eliminate that.

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 9:23 pm
by Lavender Moon
It's not part of (G)ZDoom proper yet, only my fork. I'd like to get some projects testing it first and making sure it's robust enough to be usable for something more complex than the demo PK7 I provided before I send Randi or Graf a pull request. Are there any features you would like to see in the ESDF?

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 11:38 pm
by TheBadHustlex
I could test it. I use a lot of Dialogs in my project, so maybe I will come across some stuff that could be implented/improved.

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 11:42 pm
by edward850
Xeotroid wrote:

Code: Select all

ForceChoice = bool;
Oh my god. Yes. YES.
This has been discussed to death and it isn't happening. You must always be able to close menus (because that's what they are, menus).

Re: Extended Strife Dialog Format

Posted: Wed Jun 17, 2015 11:43 pm
by Woolie Wool
I'm disappointed that you did not call it Advanced Strife Dialogue Format, because ASDF.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 12:43 am
by Triple S
edward850 wrote:
Xeotroid wrote:

Code: Select all

ForceChoice = bool;
Oh my god. Yes. YES.
This has been discussed to death and it isn't happening. You must always be able to close menus (because that's what they are, menus).
Ah, but you are able to close the menu! You either pick a choice, or attempt to close the menu normally and have the predetermined option picked for you. No matter what, you can still close the menu.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 12:57 am
by edward850
That's not quite what the description said.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 2:04 am
by Lavender Moon
Triple S wrote:
edward850 wrote:
Xeotroid wrote:

Code: Select all

ForceChoice = bool;
Oh my god. Yes. YES.
This has been discussed to death and it isn't happening. You must always be able to close menus (because that's what they are, menus).
Ah, but you are able to close the menu! You either pick a choice, or attempt to close the menu normally and have the predetermined option picked for you. No matter what, you can still close the menu.
There's two different interactions with conversations now:

Escape will always open the main menu. I understand that Graf's main problem with not letting you leave the conversation was that it would be possible to lock the player in a conversation, unable to access the menu, and require them to kill the process. In my implementation, when you hit Escape, you enter the menu and can modify options, load a saved game, or exit the application. You can't currently save while in a conversation, but that may be supported in the future.
Tab will (in the future, currently 0 will if there's not 10 selectable options) attempt to back out of the menu. If ForceChoice is set and there is more than one option, then it will play the usefail sound. In the future, I'll allow the modder to set a choice as the default choice when attempting to back out of a conversation.

* * * * *

Also, I'm reposting this link because I'm not sure if people saw it: Here's the link to the current version of the fork, and a .pk7 containing the test script I used while making it.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 2:07 am
by edward850
Lavender Moon wrote:You can't currently save while in a conversation, but that may be supported in the future.
Then it's already broken. You can save literally at any point, for a start. Notably in multiplayer, in which different players can be in different dialogue states.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 3:36 am
by Lavender Moon
edward850 wrote:
Lavender Moon wrote:You can't currently save while in a conversation, but that may be supported in the future.
Then it's already broken. You can save literally at any point, for a start.
I haven't been able to attempt to save from the main menu in any way other than selecting the save option, which currently gives the message "You can not save while in a conversation," and I haven't been able to save at all while in a conversation proper.
edward850 wrote:Notably in multiplayer, in which different players can be in different dialogue states.
Thanks for pointing that out. I'll make sure to disable saving while any players are in a conversation, rather than just the current player.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 3:39 am
by edward850
Lavender Moon wrote:I haven't been able to attempt to save from the main menu in any way other than selecting the save option, which currently gives the message "You can not save while in a conversation," and I haven't been able to save at all while in a conversation proper.
wait 70; save kjashdf; -> Begin conversation.
In a netgame, have anybody else save.
Lavender Moon wrote:Thanks for pointing that out. I'll make sure to disable saving while any players are in a conversation, rather than just the current player.
This is already a terrible idea, and I doubt it will even actually work. Arbitrarily locking saves is not the answer. Arbitrarily locking anything is not the answer.

Re: Extended Strife Dialog Format

Posted: Thu Jun 18, 2015 7:43 am
by Nash
aaaaaaaaaaand Edward comes in to piss on the parade as expected! I knew it was too good to be true!