USDF branch question
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
Well, class name it is, then. It's much more readable for modders who plan to write conversations in Notepad or whatever.
-
- Posts: 5125
- Joined: Wed Jun 11, 2008 4:07 pm
- Location: Castle Wut
Re: USDF branch question
So wait, I'm confused. Does this mean conversation IDs and the conversation UDMF property are totally useless to ZSDF, and so I -do- need multiple copies of my conversible actors defined because of the way ZSDF takes an actor name instead of an integer?
-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
Conversation IDs don't need to be defined in your actor if you're using the ZDoom namespace. Simply putting the actor's name in the USDF script will correctly attach your conversation to said actor.
If you want to use the conversation field in the thing's UDMF, then yeah, you need to define a conversation ID.
BTW, my attachment on page 2 finally works. I'm loving USDF!
If you want to use the conversation field in the thing's UDMF, then yeah, you need to define a conversation ID.
BTW, my attachment on page 2 finally works. I'm loving USDF!
-
- Posts: 5125
- Joined: Wed Jun 11, 2008 4:07 pm
- Location: Castle Wut
Re: USDF branch question
But what I mean is, let's say I have an actor named Scientist. But there's more than one scientist in this map, and the first scientist you talk to needs to say something else after a certain point in the map... I told my first dialogue script to use actor = 1; and I set the scientist's conversation to 1. But GZDoom tells me it expected a string and aborts the script.
-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
Maybe Thing_SetConversation should have another version that accepts a class name instead of mobj id? Currently it appears to only be the latter.
-
- Lead GZDoom+Raze Developer
- Posts: 49192
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: USDF branch question
The conversation ID's in Strife were essentially the class 'names'. The only way to reference a class was by its index in the class table.
For 'ZSDF' the ID parameter in the conversation serves a different purpose: It is used as a dialogue identifier to be used in UDMF things or with Thing_SetConversation (after all you need something to reference the dialogue by.) so it's more comparable to a tid, tag or line ID.
Essentially there's 2 ways to attach a dialogue to an actor:
1) the old fashioned way to define an actor type in the dialogue. With this all actors of the same type will run the same dialogue.
2) Give the dialogue an ID and use that to attach it to any thing on the map you like (or use a script to change it during the run of the level) With this you can give different actors of the same class different dialogues but you also can give actors of different classes the same dialogue.
The parameter is a tid. Which is the basic way to reference actors from ACS. No need to do an exception here.
For 'ZSDF' the ID parameter in the conversation serves a different purpose: It is used as a dialogue identifier to be used in UDMF things or with Thing_SetConversation (after all you need something to reference the dialogue by.) so it's more comparable to a tid, tag or line ID.
Essentially there's 2 ways to attach a dialogue to an actor:
1) the old fashioned way to define an actor type in the dialogue. With this all actors of the same type will run the same dialogue.
2) Give the dialogue an ID and use that to attach it to any thing on the map you like (or use a script to change it during the run of the level) With this you can give different actors of the same class different dialogues but you also can give actors of different classes the same dialogue.
Nash wrote:Maybe Thing_SetConversation should have another version that accepts a class name instead of mobj id? Currently it appears to only be the latter.
The parameter is a tid. Which is the basic way to reference actors from ACS. No need to do an exception here.
-
- Posts: 5125
- Joined: Wed Jun 11, 2008 4:07 pm
- Location: Castle Wut
Re: USDF branch question
Think I have it figured out then. Just one little bitty tiny problem.
How do I add Thing_SetConversation to ACC?

-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
Get the latest headers. http://mancubus.net/svn/zdoom/acc/trunk ... 49f44eadd6
-
-
- Posts: 3188
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: USDF branch question
I know Quasar has expressed interest in supporting USDF in Eternity once they get Strife support.Graf Zahl wrote:In any case, the only other port which I can ever see supporting USDF is Vavoom - which can implement the ZDoom namespace because it shares the same actor names.
In any case you didn't answer my question about using DoomEdNums as a fallback if a conversationID is undefined. Gez touched on it, but he seemed to assume I meant use DoomEdNums exclusively. What I'm thinking is if(ConverstationIDLookup == NULL) DoDoomEdNumLookup. May not seem perfectly user-friendly however I imagine Doom Builder and other editors could safely handle this.
-
- Posts: 5125
- Joined: Wed Jun 11, 2008 4:07 pm
- Location: Castle Wut
Re: USDF branch question
Huh. Having a problem with my script. Here it is (sans storyline dialogue
) and the error is supposed to be on line 90, but nothing is there except a closing bracket. >_>
Script error "MAP02"
No valid actor type defined in conversation

Script error "MAP02"
No valid actor type defined in conversation
Spoiler: DRUGS!
-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
This seems to be a bug. Setting the conversation field in a map thing doesn't seem to successfully attach the conversation to said thing. I ran into the same problem five minutes ago. Going to post a bug report.
-
- Lead GZDoom+Raze Developer
- Posts: 49192
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: USDF branch question
Blzut3 wrote:I know Quasar has expressed interest in supporting USDF in Eternity once they get Strife support.Graf Zahl wrote:In any case, the only other port which I can ever see supporting USDF is Vavoom - which can implement the ZDoom namespace because it shares the same actor names.
In any case you didn't answer my question about using DoomEdNums as a fallback if a conversationID is undefined. Gez touched on it, but he seemed to assume I meant use DoomEdNums exclusively. What I'm thinking is if(ConverstationIDLookup == NULL) DoDoomEdNumLookup. May not seem perfectly user-friendly however I imagine Doom Builder and other editors could safely handle this.
One word:
Ugh...
-
-
- Posts: 17468
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: USDF branch question
BTW, Ceeb, I'd just like to point out that you can use the "tag" property on your drug dealer's DECORATE to properly name him; effectively bypassing the need to explicitly define a name in each and every of your conversation's pages (which can be prone to typos and is just redundant IMO).
Code: Select all
actor DrugDealer
{
tag "Dealer"
// ... etc
}
-
- Posts: 5125
- Joined: Wed Jun 11, 2008 4:07 pm
- Location: Castle Wut
Re: USDF branch question
Good to know, although since I use one scientist, I need to give them different names.
-
- Posts: 382
- Joined: Fri Aug 28, 2009 1:46 pm
Re: USDF branch question
Maybe I'm missing something, but why can't ZDoom support int or string for the relevant fields (when in "ZDoom" namespace, of course)? As far as I can tell, the USDF syntax is strict enough that it should be possible to reliably detect which type of constant is being provided. And if ZDoom supports the "Strife" namespace anyways, it sounds like all of the requisite internal handling is in place.
Other than that, I don't see how conversation id is all that different from doomed number, and nobody blinks at the latter. Yes, non-Strife actors don't have the former by default, but the same could be said of Hexen's spawn numbers. (Sure, ZDoom defines those for non-Hexen actors, but that's just a ZDoom extension.) Personally, I see USDF as being just as much a storage format as UDMF along with all the same caveats. If editing raw USDF is too difficult, one should seek out an editor of some sort, just like with UDMF.
Other than that, I don't see how conversation id is all that different from doomed number, and nobody blinks at the latter. Yes, non-Strife actors don't have the former by default, but the same could be said of Hexen's spawn numbers. (Sure, ZDoom defines those for non-Hexen actors, but that's just a ZDoom extension.) Personally, I see USDF as being just as much a storage format as UDMF along with all the same caveats. If editing raw USDF is too difficult, one should seek out an editor of some sort, just like with UDMF.