Jump to content

Easy Item Dialogs


Smoketest

Recommended Posts

I'm reposting this here from memory for anyone who still doesn't know how to do this.

 

The first thing to do is to make your item conversible. This is done by setting bit 11 in the item flags at offset 0x18. This tells the Infinity engine that a dialog can be attached to this item, so check for it. How does it check? The secret is in ITEMDIAL.2DA (short for Item Dialog).

 

Here are the default contents of that file:

2DA V1.0
*
              LABEL   FILE
SW2H14        5689    SW2H14

 

Item SW2H14 (.ITM) is the talking two-handed sword, Lilarcor. The label is displayed on a button that you will see if you right-click the item for options. In this case 5689 is the string reference for "Converse." Next is file SW2H14.DLG. Extensions are implied, so don't bother putting file.ITM in the first column or file.DLG in the third column. The game will know what to look for.

 

To add your own talking item, simply add a new row to ITEMDIAL.2DA. For example, if you want your mage to have a talking quarterstaff, you might do something like this:

2DA V1.0
*
              LABEL   FILE
SW2H14        5689    SW2H14
STAF01        5689    MYSTAFF

 

Remember to set the conversible flag in STAF01.ITM, and you'll need to write a dialog for the item, which in this example is named MYSTAFF.DLG. Just talk to the staff the same way you'd talk to Lilarcor. You could also give the item a personal name or something, as was done for Lilarcor. The sky's the limit, and any item can be made conversible.

 

While the method used to initiate a conversation is limited to the game interface for items with special abilities, item dialogs can be written like most other dialogs. You'd have to come up with an alternative method of initiating a dialog if you wanted the item to be able to initiate a dialog with you, rather than waiting on you to do it. If I remember correctly, one method involves creating an invisible character (with the item's name) near the party and having it start a dialog using the item's dialog file.

 

If you want your item to talk outside of a conversation, like Lilarcor does in and out of combat, you'll need to add scripting to BALDUR.BCS. Look at Lilarcor's example in BALDUR.BCS (and BALDUR25.BCS) to get an idea of how that's done.

Link to comment

You're still going to get the blue circle.

 

If it were me, and it isn't, I would go with something you're going to find in the Bridge district anyway, like a cat or a rat animation, assign it its own DV and dialogue file, and nothing else needs to be done.

Link to comment

Hey!

 

I made my own cat (!) and it talks to me very nicely ??? , I can make it like this:

"#something he says# (You hear something in the shadows, turn around and find out that it's a cat!)" The cat does *not* destroy itself after the conversation, and Fiars appears a couple of steps away from it. Huh?

Link to comment

That would depend on how you're handling the talking cat. If you are using a separate cre, as in not Fiars, and it has ist's own dialogue file, that isn't Fiars, and you want Fiars to join, you would do the following. I'm using Z_Cat as the cat's dialogue file.

 

This will start with the state where Fiars acutally joins. I'm making all this up, so it's going to be different for your mod, naturally.

 

IF ~~ THEN BEGIN FiarsChoice

SAY ~So, do you want me to join or not?~

++ ~I suppose.~ DO ~ActionOverride("Z_Fiars",JoinParty()) SetGlobal("Z_FiarsJoined","GLOBAL",1)~ EXIT

++ ~Not a chance.~ + Loser

END

 

IF ~~ THEN BEGIN Loser

SAY ~Your loss. Later.~

IF ~~ THEN DO ~EscapeArea() ActionOverride("Z_Fiars",EscapeArea())~ EXIT

END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...