Smoketest Posted September 2, 2004 Share Posted September 2, 2004 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
Bardess Posted February 6, 2007 Share Posted February 6, 2007 I'm sure lost in all of this... I don't really need a talking item, but, can someone please tell me how to make an invisible character? Link to comment
Miloch Posted February 7, 2007 Share Posted February 7, 2007 Have him drink a potion of invisibility? Or force an invisibility spell on him? I'm not a scripting ninja but there might be some examples in this. Link to comment
berelinde Posted February 7, 2007 Share Posted February 7, 2007 Sorry, Miloch, but that won't work. He'll go visible or partially visible as soon as he initiates dialogue. Link to comment
Bardess Posted February 7, 2007 Share Posted February 7, 2007 I can make something up... A fog, or a cat, or a corpse... As long as the players wouldn't mind, though. Hmm, I really can... Link to comment
Miloch Posted February 7, 2007 Share Posted February 7, 2007 Yeah. Well I guess you could have an alternate CRE with a blank BAM animation or something... Link to comment
berelinde Posted February 7, 2007 Share Posted February 7, 2007 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
Kulyok Posted February 7, 2007 Share Posted February 7, 2007 Actually, you could just add dialogue into Player1 dialogue file: CHARNAME: (You hear a disembodied voice.) Hey, where is my beer? Link to comment
Bardess Posted February 7, 2007 Share Posted February 7, 2007 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
berelinde Posted February 7, 2007 Share Posted February 7, 2007 If you want the cat to destroy itself afterward, you could just give it a DestroySelf() command at the end of its dialouge. Or, you could just let it wander off, once Fiars is there and joins. Link to comment
Bardess Posted February 7, 2007 Share Posted February 7, 2007 Ok, how do I order the cat to wander off? I can't believe what we are discussing! Link to comment
berelinde Posted February 7, 2007 Share Posted February 7, 2007 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
drake127 Posted February 7, 2007 Share Posted February 7, 2007 Look how Deck of Many Things makes its invisible creature (deck.itm, deck.cre). It may help you or just copy and edit. Link to comment
Bardess Posted February 7, 2007 Share Posted February 7, 2007 I'm lazy, I may look later. So, the EscapeArea command will make a creature get lost, but using its legs? Link to comment
berelinde Posted February 7, 2007 Share Posted February 7, 2007 If you check the IESDP, you'll find that EscapeArea() will make the creature leave forever via the nearest exit, using its legs. If you want it to just wink out of existence, use DestroySelf(). Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.