Jump to content

Any danger in SetDialogue("",Myself)?


Xyx

Recommended Posts

I wrote a script that has Thieves automatically Hide In Shadows when the player turns on stealth mode (with a hotkey.) Because hidden characters cannot be healed and leaving the shadows can take such a long time, I have the Thief initiate dialogue with himself (PlayerDialog(Myself)) when stealth mode is turned off. This instantly reveals him.

 

This works fine for the main character and for the NPCs that I tried it on. You get a little red "<GABBER>- has nothing to say to you" line in the text area, but that's not a big deal.

 

However, if you start a multiplayer game and make more than one custom character, the not-Player1 character will actually initiate dialogue and say "Why do you waste my time with idle banter?", complete with pausing the game and forcing you to click End Dialogue. It would appear that the not-Player1 characters have MULTIG.DLG assigned, which handles being kicked out of the party.

 

I can SetDialogue("",Myself) before initiating dialogue. This seems to work fine. However, I'm afraid it'll mess something up that I don't know about... break the game somehow. I'm not familiar with how the game handles dialogues. Is there any danger in doing this?

Link to comment

You should create a spell with effect 47 (Remove Invisibility) and call it from your script. It's much easier and doesn't have any side effects.

 

Using SetDialogue("",Myself) on a party member is dangerous because mods or the game itself could change it any time.

Link to comment
You should create a spell with effect 47 (Remove Invisibility) and call it from your script. It's much easier and doesn't have any side effects.

I'm a bit of a purist and I wouldn't want my script to do anything that the player (or one of the default scripts) couldn't also order the character to do.

 

Plus, it will break Multi-player kickout dialogues and any mods that depend on non-protagonist PCs using multig.dlg.

Well, that's the funny thing... I did actually kick someone out after that and it still seemed to work fine.

 

Maybe the game resets the dialogue when someone gets kicked out. Wouldn't that be necessary anyway, considering other parts of the game can call SetDialogue() as well?

Link to comment

I'm a bit of a purist and I wouldn't want my script to do anything that the player (or one of the default scripts) couldn't also order the character to do.

The game doesn't offer many ways to make oneself noticeable at will, so I personally don't have a problem (ab)using a spell effect as long as it's in the spirit of AD&D rules. But this is up to you.

 

By using PlayerDialog(Myself) you're merely exploiting a side effect which works in BG2 but might work or not in GemRB or the upcoming BGEE.

Link to comment
The game doesn't offer many ways to make oneself noticeable at will

No, but it does offer this one. You can press F1 and then click on yourself and it'll immediately make you visible. You can also open a container or click on an item on the ground.

 

By using PlayerDialog(Myself) you're merely exploiting a side effect which works in BG2 but might work or not in GemRB or the upcoming BGEE.

This is undoubtedly blasphemous, but I have never heard of either. What are the odds of anyone wanting to use my script with those?

Link to comment

Archived

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

×
×
  • Create New...