USDF branch question

Archive of the old editing forum
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.

Re: USDF branch question

Postby Nash » Mon Aug 23, 2010 2:17 pm

Well, class name it is, then. It's much more readable for modders who plan to write conversations in Notepad or whatever.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Ceeb » Mon Aug 23, 2010 2:30 pm

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?
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: USDF branch question

Postby Nash » Mon Aug 23, 2010 2:33 pm

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!
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Ceeb » Mon Aug 23, 2010 2:52 pm

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.
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: USDF branch question

Postby Nash » Mon Aug 23, 2010 2:54 pm

Maybe Thing_SetConversation should have another version that accepts a class name instead of mobj id? Currently it appears to only be the latter.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Graf Zahl » Mon Aug 23, 2010 2:56 pm

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.

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: USDF branch question

Postby Ceeb » Mon Aug 23, 2010 3:07 pm

Think I have it figured out then. Just one little bitty tiny problem. :P How do I add Thing_SetConversation to ACC?
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: USDF branch question

Postby Nash » Mon Aug 23, 2010 3:08 pm

User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Blzut3 » Mon Aug 23, 2010 3:25 pm

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.

I know Quasar has expressed interest in supporting USDF in Eternity once they get Strife support.

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.
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: USDF branch question

Postby Ceeb » Mon Aug 23, 2010 3:26 pm

Huh. Having a problem with my script. Here it is (sans storyline dialogue :P ) 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

Spoiler: DRUGS!
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: USDF branch question

Postby Nash » Mon Aug 23, 2010 3:28 pm

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.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Graf Zahl » Mon Aug 23, 2010 3:54 pm

Blzut3 wrote:
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.

I know Quasar has expressed interest in supporting USDF in Eternity once they get Strife support.

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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: USDF branch question

Postby Nash » Tue Aug 24, 2010 9:04 am

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 allExpand view
actor DrugDealer
{
tag "Dealer"
// ... etc
}
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: USDF branch question

Postby Ceeb » Tue Aug 24, 2010 11:09 am

Good to know, although since I use one scientist, I need to give them different names.
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: USDF branch question

Postby DavidPH » Tue Aug 24, 2010 12:48 pm

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.
User avatar
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 2 guests