Jump to content

[patch] Implement possibility to sort gossip-menu texts if many conditions match


Schmoozerd

Recommended Posts

What bug does the patch fix? What features does the patch add?

a possibilty to put the right gossip menu text if many conditions match

For which repository revision was the patch created?

10043

Is there a thread in the bug report section or at lighthouse?

none

Who has been writing thisfix? Please include either forum user names or email addresses.

Me

Patch:

http://paste2.org/p/868753

Needed SQL change:

ALTER TABLE gossip_menu ADD COLUMN priority TINYINT(0) UNSIGNED NOT NULL DEFAULT 0 AFTER text_id;

Remark: It might be an idea to put this priority column also as key - this would give the possibilty to model OR checks for the conditions

Example where it is used: (working very lovely except closing of the gossip-dialogue)

http://paste2.org/p/868755

Description why it is needed:

In this example, we have three text_IDs:

text1: used for all players

text2: players who could take the quest and don't have the quest-starting item

text3: players who have the item (or perhaps always after this quest, don't know for sure)

Abstract:

text3: condition A

text2: condition B && C

text1: condition ~A && (~B || ~C)

this is not possible to modell with momentarily system.

And I think a similar situation might happen for other Gossip-menus as well.

Atm the choice which menu text is displayed is random (that is, depending on the text_id)

So, I had the idea instead of providing support for very complex condition-checks, to just use simple conditions, and a priority - such that the default text can be used without condition, but with the lowest priority

Edit:

Reject this now, as of a few conditions that were added since this patch, my original example doesn't hold any more.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use