Strife dialogue layout

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Strife dialogue layout

Postby neoworm » Sat Jan 02, 2021 1:45 pm

Is it possible to somehow change layout of Strife dialogue system? Changing where the aswers are, where name of the NPC is etc.
User avatar
neoworm
 
Joined: 23 Sep 2005
Location: Czech Republic

Re: Strife dialogue layout

Postby Player701 » Tue Jan 05, 2021 3:32 am

Yes, it is. This can be done by defining a custom conversation menu class. I suppose you could subclass the built-in ConversationMenu class to use it as foundation for your own. I haven't worked with it myself, but it seems to have quite a few useful virtual methods you can override. Some of them control the drawing process, so it's theoretically possible to only customize the layout without having to rewrite the entire code from scratch.

To add your custom conversation menu class to the game, there are at least 2 options:

  1. ZSDF allows you to override the conversation menu class on a per-conversation basis.
  2. There is a gameinfo key called DefaultConversationMenuClass which allows you to override the conversation menu globally via MAPINFO.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Strife dialogue layout

Postby neoworm » Tue Jan 05, 2021 3:12 pm

Ok, thanks. I got it somewhat working. It will be a little struggle to make it look well for my needs, but I can work with that now. I just got rid of all the dynamic scalling and position everything within 320x200 resolution to get pixel perfect alignment. I hope I am not getting into some kind of awful conflict with weird screen rosolutions.

Also it's kinda annoying that I can't use ZDooM screenshot function from inside the dialogue.
User avatar
neoworm
 
Joined: 23 Sep 2005
Location: Czech Republic

Re: Strife dialogue layout

Postby Tormentor667 » Tue Jan 05, 2021 4:12 pm

AFADoomer did that for Blade of Agony by the way
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Strife dialogue layout

Postby Enjay » Tue Jan 05, 2021 4:29 pm

neoworm wrote:Also it's kinda annoying that I can't use ZDooM screenshot function from inside the dialogue.

You've probably worked out that it's because the dialogue is a menu, and the screenshot function doesn't work inside a menu. I agree, it is a bit annoying but there are workarounds (e.g. running GZDoom windowed, switching away from the game when a dialogue is open and using PrtScr to send the view to the Windows clipboard, then pasting into a paint program of some sort).
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Scripting

Who is online

Users browsing this forum: Player701 and 0 guests