Keira2 icon indicating copy to clipboard operation
Keira2 copied to clipboard

Conditions

Open DDuarte opened this issue 10 years ago • 5 comments

In behalf of Malcrom, I'm feature requesting a page to do conditions in an easier way without having to know what each number means by heart (similar to SAI).

DDuarte avatar Sep 21 '15 23:09 DDuarte

We will work on it in the next release, thanks for suggestion ;)

Helias avatar Sep 22 '15 10:09 Helias

Here is a suggestion for what the fill-in page could look like, in order to make the overview easier:

SourceTypeOrReferenceId  [     ] ▼  List from https://trinitycore.atlassian.net/wiki/display/tc/conditions#conditions-SourceTypeOrReferenceId
SourceGroup              [   0 ]    Manual input from user. Depends on SourceTypeOrReferenceId. See wiki.
SourceEntry              [   0 ]    Manual input from user. Depends on SourceTypeOrReferenceId. See wiki.
SourceId                 [   0 ]    Default 0 except for CONDITION_SOURCE_TYPE_SMART_EVENT = 22 => SourceType (smart_scripts.source_type)
ElseGroup                [   0 ]    Default 0, user input if other. Allows building grouped conditions. See wiki.
ConditionTypeOrReference [     ] ▼  List from https://trinitycore.atlassian.net/wiki/display/tc/conditions#conditions-ConditionTypeOrReference
ConditionTarget          [   0 ] ▼  Boolean 0 or 1. Depends on SourceType. See wiki.
ConditionValue1          [   0 ]    Manual input from user. Depends on ConditionTypeOrReference. See wiki.
ConditionValue2          [   0 ]    Manual input from user. Depends on ConditionTypeOrReference. See wiki.
ConditionValue3          [   0 ]    Default 0 unless ConditionType = 2 (ITEM), 13 (INSTANCE_INFO), 31 (OBJECT_ENTRY_GUID) (other values available)
NegativeCondition        [   0 ] ▼  Boolean 0 or 1. NegativeCondition ON => ConditionType is NOT true
ErrorType                [   0 ] ▼  Default 0 unless CONDITION_SOURCE_TYPE_SPELL = 17 -> Id from /src/server/game/Miscellaneous/SharedDefines.h:839)
ErrorTextId              [   0 ] ▼  Default 0 unless CONDITION_SOURCE_TYPE_SPELL = 17 -> Id from /src/server/game/Miscellaneous/SharedDefines.h:1033
ScriptName               [  '' ]    Default blank (NUL char) - only used for specific condition scripts
Comment                  [ ' ' ]    Manual text input or JSON generated text

When creating new conditions on my own, I find it easier to use a vertical fill-in instead of how it looks in the sub-application "Condition-Editor" started from SAI-editor. Here is the generic text-only table I use just to fill in so I don't forget any of the values to be used:

SourceTypeOrReferenceId  : 
SourceGroup              : 
SourceEntry              : 
SourceId                 : 
ElseGroup                : 
ConditionTypeOrReference : 
ConditionTarget          : 
ConditionValue1          : 
ConditionValue2          : 
ConditionValue3          : 
NegativeCondition        : 
ErrorType                : 
ErrorTextId              : 
ScriptName               : 
Comment                  : 

For me, it would be just as easy to have only a set of blank boxes to fill in for each line, as long as the field names were locked and non-selectable. The advantage of using text-only (in Notepad++) is that I can copy the vertical column (block edit) and convert it to a horizontal line with commas. :)

ghost avatar Mar 06 '16 01:03 ghost

So che è una cagata da fare, ma per fare quegli switch/case ho bestemmiato. Prendete pure spunto da qua: https://gitlab.com/chester/ConditionCreator/tree/master/ConditionMGR

LuigiElleBalotta avatar Feb 17 '17 08:02 LuigiElleBalotta

... and for those of us who don't read Italian well enough, could you confirm this translation or rewrite it? From http://translate.google.com/ :

I know it's a piece of shit to do, but to do those I blasphemed switch / case. Well take a cue from here:

ghost avatar Feb 17 '17 16:02 ghost

I know it's very easy to do, but I said some blasphemy to those switch/case functions.. Take examples from the link (you could directly copy/paste and rename variables to fit php language)

Hope my english is good

LuigiElleBalotta avatar Feb 17 '17 17:02 LuigiElleBalotta