Jump to content

Easy Item Dialogs


Smoketest

Recommended Posts

Since you don't want item dialogs...

 

As someone suggested, you could look at what the game does and copy the effects to your invisible dialog character. For example, DECK.CRE has two items equipped; one (IMPINVIS.ITM or MAGE01.ITM; they do the same thing) provides invisibility while worn, and the other (NOCIRC.ITM) disables the foot circle.

 

Don't use a bird animation if you want your dialog to have external links. (See the this IESDP Archive Topic for more info.)

 

Edit: NOCIRC.ITM may be a ToB item, so you might consider providing your own version of the items if you plan to support people who only have SoA.

Link to comment

You're welcome, and I haven't gone away. For a change, I've decided to stop modding for awhile and actually play some games. :p

 

I'm hanging on to the BG series. It's easy to modify and the games are still fun to play. I like the story a lot, too. It's not every day I get to have divine blood in my veins. :p

Link to comment

At the risk of pointing out the obvious, modders can add their conversible items to the existing itemdial.2da, rather than overwriting the existing one. This allows compatibility with other mods, which is a good thing.

 

Here's the code to add to the tp2:

APPEND ~itemdial.2da~
~##XXXX	5689  ##DIALOG~
UNLESS ~##XXXX~

 

##XXXX is the item code (## is your unique prefix), 5689 is the "conversible" flag, and ##DIALOG is the item's dialogue file.

 

Nice and simple.

Link to comment

Yes, but it requires horrible bloat in baldur.bcs. Lilarcor does this.

 

Basically, what you would do would be put a script block in baldur.bcs, or in an area script, if the dialogue is only intended to happen in a specific area, or in an NPCs override script, if the item is intended only for one NPC. That script block would contain the item check, preferably HasItemEquiped() rather than PartyHasItem(), and some other conditions. If the conditions were true, it would spawn an invisible creature on top of Player1. The invisible creature has the same dialogue file as the item, so you don't need to create a new one. The reason for spawning the invisible CRE is that creatures can run script but items can't. At the end of the dialogue, you would destroy the creature.

Link to comment
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.

 

For newbie coders such as myself who find "set bit 11 at offset 0x18" less than clear (sorry, I just don't do bit-setting) -

 

1. Copy your item stub into the Override folder so that NearInfinity can see it. (Use a unique prefix+name so that it won't be confused with anything else.)

2. Use NearInfinity to view the .itm file

3. Look at the flags (Sellable, Droppable etc.) that have cheerful green tickies. If the Conversable flag doesn't have a ticky, go to the Edit tab.

4. You'll see a long list of item attributes. Near the top is Flags. Left click on Flags, look at the edit box that pops up at the bottom. Left click on Conversable. Save item.

5 If you want, go back to the View tab and check that Conversable is now green-tickied.

6 When you're happy with everything, Export your edited itm back into your Mod folder.

7 Append the ~itemdial.2da~ in your tp2 file as described above.

 

APPEND ~itemdial.2da~

~##XXXX 5689 ##DIALOG~

UNLESS ~##XXXX~

 

For people who know what they're doing, editing bit 11 is probably just one line of code added to the tp2, but I don't know what that line of code would be.

 

***

 

Using the string "5689" apparently labels the button with "Converse"? Is there a string that will label the button "Read"?

 

Thanks for all the advice in the tutorial - it was really helpful.

Link to comment

For people who know what they're doing, editing bit 11 is probably just one line of code added to the tp2, but I don't know what that line of code would be.

WRITE_LONG 0x18 THIS BOR BIT11

 

Using the string "5689" apparently labels the button with "Converse"? Is there a string that will label the button "Read"?

If there isn't already one, you can add the string yourself. For example:

OUTER_SET strref = RESOLVE_STR_REF (~Read~)
APPEND itemdial.2da ~##XXXX %strref% ##DIALOG~
UNLESS ~##XXXX~

Link to comment

Archived

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

×
×
  • Create New...