[ACS] Custom dialogue/choice menus (GetPlayerInput update!)

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

[ACS] Custom dialogue/choice menus (GetPlayerInput update!)

Post by Jimmy »

Here's a fairly quick set of scripts I whipped up a little while ago for a mate (it's also to be used in a much more extended form in one of my side projects). It allows the user to specify custom ACS-built menus that can do pretty much anything: shops, dialogue trees, speech choices, special consoles, you name it.

http://pastebin.com/f4b3149fb

I'm posting this here for anyone to use in their WADs, in case Strife dialogue scripts just aren't enough for them. :P They work best when put into libraries, then you can use the predetermined functions in any script at all. They aren't the best alternative to Strife dialogue scripts in the world (their implementation is a little bit sloppy), but they work alright for me. Any suggestions or advice are also appreciated.

It requires a KEYCONF lump in your WAD to work since I haven't figured out how to properly use GetPlayerInput yet. :? Thorry.
Last edited by Jimmy on Sun Nov 29, 2009 1:58 pm, edited 1 time in total.
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: [ACS] Custom dialogue/choice menus

Post by Xaser »

Oooh, wow! I was wondering if you'd release this. ;)

I haven't taken a look just yet, but chances are likely I'll make use of it for Psychic's campaign mode since Strife dialogue is finicky as hell. If I do, though, I'll take a stab at converting it to GetPlayerInput, which I'll happily share assuming I get around to it any time soon.
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [ACS] Custom dialogue/choice menus

Post by Jimmy »

I'd really appreciate it if you did that. :) I really want to figure it out myself but it's one of those things where I don't seem to be able to fathom it no matter what way I look at it. :P
User avatar
Alterworldruler
Posts: 622
Joined: Mon Dec 19, 2005 7:31 am

Re: [ACS] Custom dialogue/choice menus

Post by Alterworldruler »

Um Jimmy or anyone, can anyone explain how to make a completely new dialogue in that? Xenus 3 would gladly use this because Strife dialogues are way too LIMITED for me (not just me though) and those nasty workarounds piss me off so I would gladly use that.
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [ACS] Custom dialogue/choice menus

Post by Jimmy »

Ideally, you should know a lot about ACS in order to do that, but to be honest, it's just a case of creating a few "NPC" actors with the +USESPECIAL flag, and adding a couple more variables to the script that will be used when you come to print their name and dialogue to the screen.

I may in the near future simplify my own dialogue tree system so it can be used however anyone wants it.
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [ACS] Custom dialogue/choice menus

Post by Jimmy »

And now I have. :P

j-testmenu.zip - 25.6KB
See below for the link!
Spoiler: Screenshots!
There is no documentation yet. You'll have to rely on the comments I've left in the SCRIPTS lump. :P

There's also one minor flaw with it: using the 'use' key to select choices works for the most part but is known to bugger things up. Just use the custom bind in the meantime. :P (This still doesn't use GetPlayerInput, by the way. Make sure the controls are correctly bound before you try and use the menus. ;))
Last edited by Jimmy on Sun Nov 29, 2009 1:58 pm, edited 1 time in total.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway

Re: [ACS] Custom dialogue/choice menus

Post by jallamann »

cool!
User avatar
Enjay
 
 
Posts: 26573
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [ACS] Custom dialogue/choice menus

Post by Enjay »

jimmy91 wrote:There's also one minor flaw with it: using the 'use' key to select choices works for the most part but is known to bugger things up. Just use the custom bind in the meantime. :P
See, I hadn't read that bit and, yes, I can confirm that it is very easy to bugger things up when speaking to the green marine. You can very easily get stuck in an endless loop where you can't exit from the menu.
User avatar
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Re: [ACS] Custom dialogue/choice menus

Post by Dancso »

Spoiler:
I made this several days ago (unfinished of course) for use in my own mods, it uses GetPlayerInput and is pretty much able to do anything that could be used by a menu. There's no scrolling or boundaries.

I still have to get used to using the Case method instead of lots of Ifs and elses.

Feel free to edit and use.
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [ACS] Custom dialogue/choice menus

Post by Jimmy »

Update with GetPlayerInput goodness!

j-testmenu.zip - 30.3KB

Also: The dialogue choices now scroll in a more "animated" fashion, and there's been a few changes to the setup of the menus themselves. Check the comments in the SCRIPTS lump for what's new. :P
Lishy
Posts: 32
Joined: Tue Mar 22, 2011 5:20 pm

Re: [ACS] Custom dialogue/choice menus (GetPlayerInput updat

Post by Lishy »

Me and Jimmy were talking on IRC. We want to get this mod compatible but there are some issues.

For example, since the conversations and buy menus are done with single scripts and extensive use of "suspend", I foresee problems when multiple players attempt to "use" the same NPC - conceivably, player 1 could walk up to the NPC that player 2 is talking to, press "use" and player 2 would either buy something he didn't want to, or lose the menu as a result. (Player 1 might also experience some oddities with parts of menu refreshing on his own screen, without it having been initiated for him in the first place.)

Anyone think they can fix this? :|

(In order to compile its scripts via DB2, save the uncompiled version of the ACS lump to C:\Program Files (x86)\Doom Builder 2\Compilers\Skulltag directory for example, and also the compiled one as dialog.o as opposed to dialog.acs for the uncompiled. And then make sure to set it in acc.cfg via
DIALOG = "DIALOG.acs";)
User avatar
Jimmy
 
 
Posts: 4725
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [ACS] Custom dialogue/choice menus (GetPlayerInput updat

Post by Jimmy »

Yeah, it's rather important that the problem with different players using the same NPC in online play gets fixed, because that's at the moment the only problem with the scripts' setup that shows up in online play that I know of. The menu system hasn't really been tested online yet, so there could be a few others, but it would be very helpful if someone could help us with limiting a menu/dialogue script to just one user once it's been initated.

Here's the scenario I imagine: Player 1 walks up to NPC, presses "use" (for the NPC's thingspecial is ACS_Execute) and starts off a conversation, which freezes him in front of the NPC. Once the dialogue box is up and the first line of dialogue drawn, the script suspends itself, then continues when the player presses use again. (See the "MAP SCRIPTS" section of the pastebin link in the first post for exactly how this works.)

Player 2 comes along and doesn't realize there's a conversation going on between Player 1 and the NPC. Player 2 presses use - the conversation continues for Player 1, rather than Player 2's action doing nothing (or indeed starting again for player 2).

So, a failsafe of sorts needs to be installed in the current set of scripts to stop this from happening. Of course, it's been a while (just over two years) since I looked at these scripts, so unfortunately I'm a little unfamiliar with it all. :? Any help would be appreciated.
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it

Re: [ACS] Custom dialogue/choice menus (GetPlayerInput updat

Post by RV-007 »

I was thinking to do a simple dialogue thing later on. Maybe this wad can help me with this project.
Could the dialogues be based on actors/objects than maps?
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it

Re: [ACS] Custom dialogue/choice menus (GetPlayerInput updat

Post by RV-007 »

Does this ACS script work for doom or doom1 wad?
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: [ACS] Custom dialogue/choice menus (GetPlayerInput updat

Post by Xaser »

RV-007 wrote:Does this ACS script work for doom or doom1 wad?
Image

You didn't even try it, you monkeynut.

Return to “Resources”