🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
TIMED SPECIAL EFFECT LINKED LIST VERSION 2.1 ONWARD OF TIMED SPECIAL EFFECT LINKED LIST CAN CO-EXIST WITH TIMED SPECIAL EFFECT VERSION 1.X IMPORT GUIDE :
[Patch 1.31+ is needed to access the test map]
1. Install TimedEventLinkedList to your map if you do not use it yet
2. Copy the TimedSpecialEffect folder in the test map
3. Configure the TSELLConfig trigger
4. To utilize the system, refer to the TSELLSampleRegisterUnit and TSELLSampleRegisterPoint triggers SYSTEM INFORMATION :
A system designed to ease the pain of working with timed special effects in GUI. Whenever someone wants to create a timed special effect in GUI, they have to do the hassle of handling everything from the start to finish.
For example, creating a simple cloud effect in GUI when Silence is cast is going to look something like one of the following:
CloudVar1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Silence
Actions
Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
Wait 3.00 seconds
Special Effect - Destroy (Last created special effect)
CloudVar2
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Silence
Actions
Custom script: local effect u
Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
Custom script: set u = GetLastCreatedEffectBJ()
Wait 3.00 seconds
Custom script: call DestroyEffectBJ(u)
CloudVar1 is prone to bug when there are multiple silence casted at once.
CloudVar2 uses locals which requires some knowledge of custom script.
Both of these also has issues since they uses Wait action. Unless they use PreciseWait for LUA, precision will be an issue. All these doesn't include the fact that it is hard to do anything to these effects after they are created aside of destroying them. Don't forget that leaks also existed if not handled carefully.
With TimedSpecialEffectLinkedList, the issues above can be resolved quite easily. TimedSpecialEffectLinkedList provided an easy way of creating timed effects. Creating cloud similar to CloudVar1 and CloudVar2 with TSELL looks like the following:
TestEffect 2
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Silence
Actions
Set TSELL_Duration = 3.00
Set TSELL_EffectName = Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
Set TSELL_Point = (Target point of ability being cast)
Trigger - Run TSELL_RegisterTrigger (checking conditions)
Just set 3 variables, run the TSELL_RegisterTrigger and let the system handles the rest. TimedSpecialEffect uses Countdown Timer internally, thus it has better precision than waits. In addition, any effect created with TSE is MUI and leakless. TSELL stands for TimedSpecialEffect LinkedList, for those who are curious. The renaming is due to some internal issues during development of v2.0 that finalizes with a decision to alter the entire variable structure for better readability.
TimedSpecialEffect also provided support for extensive modifications while an effect is running. It is possible to create complex spells by attaching triggers to an effect. The following variables are exposed:
- TSELL__RemainingDuration: Get/Set the remaining time of the effect (yes, set, which means changing this value changes the remaining duration)
- TSELL__LoopTimer: Get/Set the period for each loop execution (yes, set, which means changing this value changes the period of the loop trigger)
- TSELL__Integer: Get/Set a free to use integer variable for your need (yes, set, which means changing this value changes it for the rest of the effect duration)
- TSELL__SpecialEffect: Get control of your effect, so any modification that you want to do to it can easily be done during any of the events
- TSELL__ActiveIndex: Get the index of the instance easily without knowing the detailed intricacies of TimedSpecialEffect
- TSELL__TargetUnit: Get the unit affected by TimedSpecialEffect, returns no unit if TargetUnit is not specified when registering
- TSELL__SourceUnit: Get the registered source unit of this TimedSpecialEffect, returns no unit if SourceUnit is not specified
- TSELL__Point: Get the point of the effect, returns position of TargetUnit when TargetUnit is used
NOTE: Use TSELL__Alloc** when accessing during the Allocation (START) phase
This is the entire register for Unit and Point variation:
TSELLSampleRegisterUnit
Events
Conditions
Actions
-------- CORE --------
-------- TSELL_Duration is the duration of the effect --------
Set TSELL_Duration = 10.00
-------- TSELL_TargetUnit determine which unit has this effect attached --------
Set TSELL_TargetUnit = (Triggering unit)
-------- TSELL_AttachPoint is only used in conjunction with TargetUnit to determine in which part of unit it is placed --------
Set TSELL_AttachPoint = left hand
-------- TSELL_EffectName is the string to the effect file --------
Set TSELL_EffectName = war3mapImported/Soul Bow Enchantment Necro.mdx
-------- EXTENSION --------
-------- TSELL_TargetUnitAliveCheck refers to whether the attached effect account whether the unit is alive or not --------
Set TSELL_TargetUnitAliveCheck = False
-------- TSELL_SourceUnit refers to the source of the buff, useful if the TargetUnit and SourceUnit are two different units --------
Set TSELL_SourceUnit = (Triggering unit)
-------- TSELL_SourceUnitAliveCheck whether the SourceUnit must be alive or not --------
Set TSELL_SourceUnitAliveCheck = False
-------- TSELL_ChanneledOrderID is used for buff tied with channeling spells --------
-------- The buff immediately ceased if the channeling spell ends --------
Set TSELL_ChanneledOrderID = blizzard
-------- TSELL_ChanneledOrderID is used for buff tied with channeling spells --------
-------- TSELL_OnEventAllocate is an event that runs when the effect is created (directly at moment of effect creation). Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventAllocate = TSELL_OnEventAllocate
-------- TSELL_OnEventLoop is an event that runs every TSELL_TimerForLoop seconds. Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventLoop = TSELL_OnEventLoop
-------- TSELL_TimerForLoop is the duration between each tick of the loop --------
-------- Setting this allows better control over the OnLoopEvent instead of dealing with TELL_TimerTIMEOUT global --------
-------- This variable cannot be lower than TELL_TimerTIMEOUT --------
Set TSELL_TimerForLoop = 1.00
-------- TSELL_OnEventDeallocate is an event that runs when the effect is about to be destroyed. Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventDeallocate = TSELL_OnEventDeallocate
-------- END --------
-------- After all core variables are set, run TSELL_RegisterTrigger --------
Trigger - Run TSELL_TriggerRegister (checking conditions)
TSELLSampleRegisterPoint
Events
Conditions
Actions
-------- CORE --------
-------- TSELL_Duration is the duration of the effect --------
Set TSELL_Duration = 16.00
-------- TSELL_EffectName is the string to the effect file --------
Set TSELL_EffectName = Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
-------- TSELL_Point is the position of the effect created --------
Set TSELL_Point = (Target point of ability being cast)
-------- TSELL_Scale for scaling the effect (point-based only) --------
Set TSELL_Scale = 1.00
-------- EXTENSION --------
-------- TSELL_SourceUnit refers to the source of the buff, useful if the TargetUnit and SourceUnit are two different units --------
Set TSELL_SourceUnit = (Triggering unit)
-------- TSELL_SourceUnitAliveCheck whether the SourceUnit must be alive or not --------
Set TSELL_SourceUnitAliveCheck = False
-------- TSELL_ChanneledOrderID is used for buff tied with channeling spells --------
-------- The buff immediately ceased if the channeling spell ends --------
Set TSELL_ChanneledOrderID = blizzard
-------- TSELL_ChanneledOrderID is used for buff tied with channeling spells --------
-------- TSELL_OnEventAllocate is an event that runs when the effect is created (directly at moment of effect creation). Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventAllocate = TSELL_OnEventAllocate
-------- TSELL_OnEventLoop is an event that runs every TSELL_TimerForLoop seconds. Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventLoop = TSELL_OnEventLoop
-------- TSELL_TimerForLoop is the duration between each tick of the loop --------
-------- Setting this allows better control over the OnLoopEvent instead of dealing with TELL_TimerTIMEOUT global --------
-------- This variable cannot be lower than TELL_TimerTIMEOUT --------
Set TSELL_TimerForLoop = 1.00
-------- TSELL_OnEventDeallocate is an event that runs when the effect is about to be destroyed. Refer to data with TSELL__ActiveIndex. --------
Set TSELL_OnEventDeallocate = TSELL_OnEventDeallocate
-------- END --------
-------- After all core variables are set, run TSE_RegisterTrigger --------
Trigger - Run TSELL_TriggerRegister (checking conditions)
TSE v2.x also comes with support for Timed Effect by Almia. TSE v2.x uses RemoveEffect by Pyrogasm. Due to multiple reasons, TSE v2.x and TSE v1.x are mutually exclusive, and both can be installed on the same map WITH NO ISSUES (as of v2.1). Feature-wise, TSE v2.x is superior, but TSE v1.x by itself is sufficiently rich in feature to allow for complex creations.
MEDIA SHOWCASE :
CHANGELOG :
v2.1.1:
- Cleaned left-overs of TSECompat feature for cleaner and faster code
v2.1:
- Removed support for backward compatibility with TimedSpecialEffect v1.x
>> refer to https://www.hiveworkshop.com/threads/timed-special-effect-v2-0-6.332579/#post-3614576 for more information
v2.0.6:
MANDATORY UPDATE FOR THOSE WHO USE VERSION 2.X WITH TSECompat TRIGGERS!
- Fixed a major issue with TSECompat
v2.0.5:
- Fixes TSECompat triggers
v2.0.4:
- Fix overlooked variables that not pointing to the right data in the allocation
v2.0.3:
- Final fix on bug from TimedEventLinkedList
- For checking data during allocation (START) phase, use TSELL__Alloc** instead of TSELL__**
v2.0.2:
- Further fix on the critical bug
- Reduces trigger by removing TSELLEmptyEvent and bind it to TELLEmptyEvent
v2.0.1:
- Fixed a critical bug from TimedEventLinkedList
v2.0: RELEASED
[This changelog is compared to TSE v1.7 since v2.0 development began around v1.7 release]
- New Requirement: TimedEventLinkedList (TELL)
- Deprecated LockInstance and variables related to this feature
- Rewrite the entire API of TimedSpecialEffect for better readability
- Point variable is now always usable, and point toward TargetUnit when TargetUnit is defined
- Fixed an issue with TimedSpecialEffect loop that existed within v1.7 version (technically, it is auto fixed due to TELL requirement)
- Additional variable for storing information: TSE_Integer
> It has come to my attention that spells using TSE has a hidden minor issue regarding level handling where the level stored might not be equal to the original level at time of cast if the registration is done long after spell has been cast
> TSE_Integer is added to allow storing a single integer data to resolve this, it can be for level or other uses (specifically data that needs to be passed between effects created at separate times)
> This issue is not present when the data is stored immediately OnIndexEvent (v1.7) during the casting phase of the spell (all past resources with TSE uses this method)
> To be clear, this issue arise when the following scenario happened:
[1] Hero cast ability
[2] Ability only create effect for visual
[3] After a delay, the effect create ANOTHER effect
[4] The ANOTHER effect deals damage based on level after another delay
> It is impossible to get the level at time of cast to attach for effect at [3] since the ability might have been levelled during the delay between [2] and [3]
- Improve effect removal with Pyrogasm RemoveEffect snippet
- Added TSECompat for backward compatibility support (please report if any resources that use TSE v1.x still breaks when you update to TSE v2.x)
> Be aware that TSELL-TSECompat is slower than TSE at the moment
- Added TimedEffectAlmiaCompat
KNOWN ISSUES:
- [RELATIVE] TSELL is slower due to more overhead compared to TSE v1.x, especially with TELL requirement underneath
- [MAJOR] Cannot create a new instance on deallocation phase
- [RESEARCH] Blizzard's new special effect natives only works when an effect is not attached to a unit
TSELLAllocation trigger:
Trigger - Run TSELL_OnEventAllocate (checking conditions)
The variable is null when the trigger is executed the first time. It looks intentional, but I know you use TSELL_EmptyEvent, perhaps it makes sense to use it here...
I have given this some food for thought, but since v2.0 has been a nightmare fuel of bugs, I decided they need to be separate so it helps ensuring compliance with the approval standard. I don't want to give an impression that this system is as stable as v1.8 when I have yet managed to guarantee every single major issues sorted out.
v1.8 is in full compliance of the standard (no bugs since those has been squashed since v1.4), so it is worthy of the current Approved status. v2.0 and the more recent v2.1 however, in my view, is sort of unstable personally with the numerous reports I have been getting from users who implements them in their map.
The point is. Is it a different resource? Is there any reason to use them both? If not, I think an update was the ideal, bugs or not. Moreover, you could have kept previous (stable) versions in the thread until the recent version would reach the same functionality quality.
The point is. Is it a different resource? Is there any reason to use them both? If not, I think an update was the ideal, bugs or not. Moreover, you could have kept previous (stable) versions in the thread until the recent version would reach the same functionality quality.
Some spells in spell section are already established with v1.x of the resources and updating them to v2.x is not an easy effort due to the difference of approach between both versions (it will require a full recode of those spells and it is a horrible nightmare to rewrite; I tried to bypass this via compatibility but that just ends with tons of bugs which costs like 6 patches with minimal results that I have to fall back from it and sever the connection of v2.x and v1.x). The way I see it is that this one is the 'feature rich' variant where I plan to add more implementations, while the v1.x will be the stable version I use for most spells unless the spells really need the experimental features provided by v2.x.
I also cannot just drop the entire v2.x since there are already existing spells using this version, so removing it is equal to permanently deprecate those spells unless I can remaster v1.x to acquire v2.x features.
Simply put:
v1.x:
Stable
Has minimal feature, sufficient for most spells as long as it doesn't require heavy data manipulations
Dynamic Indexing
v2.x:
Experimental
Has more features, allowing more complex spells (Myriad Crystal and Licht Regen for example); there's a planned feature based on request from this post
Trigger - Run TSELL_OnEventAllocate (checking conditions)
The variable is null when the trigger is executed the first time. It looks intentional, but I know you use TSELL_EmptyEvent, perhaps it makes sense to use it here too?
With RemoveEffect on TSELLDeallocation trigger, shouldn't the user be able to decide if they want the death animation to be played, hence using DestroyEffect instead?
All in all, it has some similarity to GUI Spell System, but designed for special effects, providing a variety of advanced options.
Approved
Note:Your Theory 2 trigger crashes when testing, I had to disable it.
🔨 Downloads and Uploads have been fixed! If you still have trouble downloading or uploading assets to or from Hive, please reach out to us in the Site Discussion board.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.