Strife characters with proper name tags? [Solved]

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Strife characters with proper name tags? [Solved]

Post by Nash »

Has anyone made a mod where the various characters in Strife are given proper "tag" properties that actually reflect the speaking character's name? For example, "Harris" instead of "Peasant4"?

Reason I ask is I'm making an HP bar mod that prints the actor's proper name with GetTag() and in Strife, unfortunately these unique characters don't get proper character name tags (most likely due to the nature of how Strife's dialog system works).

EDIT:

I added a proper GetCharacterName() function. Use this to get the dialog-defined character name, if the actor has one; otherwise it will output the same thing as GetTag().
Last edited by Nash on Mon Mar 15, 2021 2:45 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Strife characters with proper name tags?

Post by Graf Zahl »

It's not that easy. The actor types are recycled in multiple maps for different characters - the proper character names can only be retrieved from the assigned dialogues.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Strife characters with proper name tags?

Post by StroggVorbis »

You don't mean the Name property in ZSDF?

User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Strife characters with proper name tags?

Post by Nash »

I knew what the problem was. As Graf explained, it's not simple. The actor map objects are actually just generic "vessels" for these charaters, and it's the conversation ID and their respective map-specific dialog scripts that determine "who" a character is.

I was curious if anyone already made a mod that solves this in some way, eg via event handlers to reassign their name tags, on a case-by-case basis.. Otherwise I was planning to make one. It would be a bit tedious for sure, but there aren't that many unique characters I think.

In case someone has already solved this problem, it would sure just save me the effort. :P
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Strife characters with proper name tags?

Post by StroggVorbis »

Ah okay, thought my ZSDF conversion mod would help a bit with that :c
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Strife characters with proper name tags?

Post by Graf Zahl »

What's the point of such a mod? It'd be broken by design because it works against the intended design. Wouldn't it better to add a GetCharacterName method that extracts the needed info from the actual data?
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Strife characters with proper name tags?

Post by Nash »

I actually was thinking of an additional parameter to GetTag that will try to extract the character name from the map's dialog lump, but yeah, you're right. Sounds pointless to try to wrestle with it from the mode side.
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Strife characters with proper name tags? [Solved]

Post by Nash »

PSA: I've submitted GetCharacterName to GZDoom. Use that if you want to retrieve proper dialog-defined character names. It can be used as a substitute for GetTag; if no character name exists, it will output the same thing as GetTag.
Post Reply

Return to “General”