Conditions
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).
We will work on it in the next release, thanks for suggestion ;)
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. :)
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
... 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:
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