- Joined
- Mar 30, 2006
- Messages
- 60
Hi,
I have a pretty general question: What's the best option to create a custom-buff system that still interacts with regular WC3 dispel spells?
I am working on an altered melee map mod system which adds additional units/abilities/heroes to existing races, aswell as adding 2 entirely new races.
To make use of customized abilities and units I imported quite a lot of custom models, custom icons and spell effects. Which ofcourse make the map more performance hungry. That's why I want to make everything as optional as possible to avoid crashes.
To the system I'm currently using:
I mainly rely on hidden spellbooks, which contain custom buff auras to give the desired effects. In the following ability the spellbook contains a crit strike ability and the item armour buff ability +3.
The spellbook is applied with a dummy spell based on channel. After the spell is cast on a unit it's moved into a pre defined unit group.
I have a total of 20 unit groups in which buff-affected units are moved when they receive a spell.
The units that are in those groups are periodically checked for having the buff in place. If not the spellbook is removed and the unit aswell from the group. This is to make sure that the buffs to not extend over dispel abilities.
I know that this system works well enough for a low amount of ability triggers, but since I add 2 custom races (with 10 heroes, ~ 25 units, ~30 new techs, icons, custom models, spell effects etc), 5 new heroes for the existing races + 1 neutral hero + new neutral units, all with custom enhanced spells I realised that this system takes quite some performance through sheer numbers.
To make this more clear to see for everyone I'll include some trigger examples :
Example: Molten Armour
Adds critical strike + armour to the target unit. Dispelable by regular anti magic spells. (Spell theft, abolish magic etc.)
Next part, Unit group trigger:
It seems like this is getting pretty performance heavy once more than 4 players participate in the game and spells start hitting the field.
I'd just like to know whether there's an easier or faster version for my system possible. I ofcourse use custom text to remove points and other leaking objects, and define units/spells/integers in variables instead of using the GUI functions to save performance. Example:
I hope we can get a productive discussion going. In case someone wants to teach me a bit of custom triggering in JASS I'm of course open for that, but I am noob "real" scripting
Greetings
I have a pretty general question: What's the best option to create a custom-buff system that still interacts with regular WC3 dispel spells?
I am working on an altered melee map mod system which adds additional units/abilities/heroes to existing races, aswell as adding 2 entirely new races.
To make use of customized abilities and units I imported quite a lot of custom models, custom icons and spell effects. Which ofcourse make the map more performance hungry. That's why I want to make everything as optional as possible to avoid crashes.
To the system I'm currently using:
I mainly rely on hidden spellbooks, which contain custom buff auras to give the desired effects. In the following ability the spellbook contains a crit strike ability and the item armour buff ability +3.
The spellbook is applied with a dummy spell based on channel. After the spell is cast on a unit it's moved into a pre defined unit group.
I have a total of 20 unit groups in which buff-affected units are moved when they receive a spell.
The units that are in those groups are periodically checked for having the buff in place. If not the spellbook is removed and the unit aswell from the group. This is to make sure that the buffs to not extend over dispel abilities.
I know that this system works well enough for a low amount of ability triggers, but since I add 2 custom races (with 10 heroes, ~ 25 units, ~30 new techs, icons, custom models, spell effects etc), 5 new heroes for the existing races + 1 neutral hero + new neutral units, all with custom enhanced spells I realised that this system takes quite some performance through sheer numbers.
To make this more clear to see for everyone I'll include some trigger examples :
Example: Molten Armour
Adds critical strike + armour to the target unit. Dispelable by regular anti magic spells. (Spell theft, abolish magic etc.)
-
Molten Armour
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Molten Armour (neuneu)
-
-
Actions
-
Set TempUnit = (Target unit of ability being cast)
-
Animation - Change TempUnit's vertex coloring to (100.00%, 60.00%, 45.00%) with 10.00% transparency
-
Unit Group - Add TempUnit to MoltenGroup
-
Unit - Add Molten Armour Spellbook to TempUnit
-
-
Next part, Unit group trigger:
-
Alle GUI Trigger
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
-
[...]
-
Unit Group - Pick every unit in MoltenGroup and do (Actions)
-
Loop - Actions
-
Set TempUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(TempUnit has buff Molten Armour ) Equal to False
-
-
Then - Actions
-
Unit - Remove Molten Armour Spellbook from TempUnit
-
Animation - Change TempUnit's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Unit Group - Remove TempUnit from MoltenGroup
-
-
Else - Actions
-
-
-
-
-
[...]
It seems like this is getting pretty performance heavy once more than 4 players participate in the game and spells start hitting the field.
I'd just like to know whether there's an easier or faster version for my system possible. I ofcourse use custom text to remove points and other leaking objects, and define units/spells/integers in variables instead of using the GUI functions to save performance. Example:
-
Ambush
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Ambush (Farstrider)
-
-
Actions
-
Set TempUnit = (Triggering unit)
-
Set TempPoint = (Position of TempUnit)
-
Set TempAbilityLvl = (Level of Ambush (Farstrider) for TempUnit)
-
Set Temp_unitgroup = (Units within (((Real(TempAbilityLvl)) x 75.00) + 175.00) of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is Magic Immune) Equa
-
Sound - Play SylvanasWhat3 <gen> at 100.00% volume, attached to TempUnit
-
Sound - Destroy (Last played sound)
-
Unit Group - Pick every unit in Temp_unitgroup and do (Actions)
-
Loop - Actions
-
Set Temp_Unit = (Picked unit)
-
Unit Group - Add Temp_Unit to AmbushGroup
-
Unit - Add Ambush (Units) to Temp_Unit
-
Unit - Set level of Ambush (Units) for Temp_Unit to TempAbilityLvl
-
Unit - Order Temp_Unit to Orc Blademaster - Wind Walk
-
Unit - Remove Ambush (Units) from Temp_Unit
-
-
-
Custom script: call RemoveLocation( udg_TempPoint )
-
-
-
Flameshield
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Flameshield
-
Actions
-
Set TempUnit = (Triggering unit)
-
Set Temp_point = (Position of TempUnit)
-
Unit - Create 1 Dummy for (Triggering player) at Temp_point facing (Facing of TempUnit) degrees
-
Set Temp_Unit2 = (Last created unit)
-
Unit - Add a 2.00 second Generic expiration timer to Temp_Unit2
-
Unit - Add Flameshield (Armour) to Temp_Unit2
-
Unit - Set level of Flameshield (Armour) for Temp_Unit2 to (Level of Flameshield for TempUnit)
-
Unit - Order Temp_Unit2 to Human Priest - Inner Fire (Target unit of ability being cast)
-
Custom script: call RemoveLocation( udg_Temp_point )
-
I hope we can get a productive discussion going. In case someone wants to teach me a bit of custom triggering in JASS I'm of course open for that, but I am noob "real" scripting
Greetings
Last edited: