Result box and using i.d.s with spaces

Post » Wed Jan 13, 2010 4:07 pm

So in my mod, Brathus Dahl (that's his i.d.) is supposed to have a greeting, and in the resultbox it says:
brathus dahl->addtopic "where is quator?"

But the error conflitc button says that it's messed up, specifically it can't find the object reference for it. So i tried adding in a _ to make it brathus_dahl, thinking that it would work. it didnt. Anyone know a solution to this?
User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm

Post » Wed Jan 13, 2010 12:12 pm

It should be "brathus dahl"->addtopic "where is quator?" Anything with a space (or spaces) must have quotes around it, otherwise the engine thinks you're referencing two (or more) different items.

[Edit]: you don't need to reference an NPC when you're using the addtopic command: just using the command and the new topic is fine: addtopic "where is quator?". Make sure that you spell the topic just like it is in the dialog database.
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Wed Jan 13, 2010 11:52 am

quote the reference

"like this"

should work.
User avatar
Joe Alvarado
 
Posts: 3467
Joined: Sat Nov 24, 2007 11:13 pm

Post » Wed Jan 13, 2010 2:38 pm

You can enclose an id in quotes, which resolves the issue.
"brathus dahl"->addtopic "where is quator?"


However, known topics are kept in a global list rather than being specific to a actor. Hence it is probably better to do:
addtopic "where is quator?"


Note:
You can that it doesn't need a fix from Morrowind Scripting for Dummies, which gives the definition of add topic as:
[no fix] AddTopic, "Topic"


[no fix] Indicates this function can never be used with a "fix" meaning it can not be called by a specified actor. Functions without this tag can be called by an actor, an object, or both.



EDIT:
Beaten to the punch by Jac
User avatar
james reed
 
Posts: 3371
Joined: Tue Sep 18, 2007 12:18 am

Post » Wed Jan 13, 2010 11:38 am

It should be "brathus dahl"->addtopic "where is quator?" Anything with a space (or spaces) must have quotes around it, otherwise the engine thinks you're referencing two (or more) different items.

[Edit]: you don't need to reference an NPC when you're using the addtopic command: just using the command and the new topic is fine: addtopic "where is quator?". Make sure that you spell the topic just like it is in the dialog database.

Ah that make's much more sense now, Thanks for the help, it's invaluable as always :D

EDIT: Thanks, I didn't realize that you didn't have to make it i.d. specific. Yay :D
User avatar
Jade Payton
 
Posts: 3417
Joined: Mon Sep 11, 2006 1:01 pm

Post » Wed Jan 13, 2010 7:02 pm

The logic behind unfixed AddTopic is that only the PC can known about and bring up topics (NPCs don't start talking about something at random). So, only one list you're adding to (the PC's known list).

And as Jac and Yacoby said, always quote your IDs. In the best case, having a space in it should be avoided, but that's not always possible with stock objects.
User avatar
zoe
 
Posts: 3298
Joined: Sun Nov 12, 2006 1:09 pm

Post » Wed Jan 13, 2010 11:17 am

The logic behind unfixed AddTopic is that only the PC can known about and bring up topics (NPCs don't start talking about something at random). So, only one list you're adding to (the PC's known list).

And as Jac and Yacoby said, always quote your IDs. In the best case, having a space in it should be avoided, but that's not always possible with stock objects.

This makes much more sense now, thanks for clarifying :D
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am


Return to III - Morrowind