• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Questions about MUI

Status
Not open for further replies.
Level 3
Joined
Jun 7, 2011
Messages
59
So i am in a process of making a map. It is my first time doing a map and i'm having some hard time figuring some stuff out. I did my share of creating abilities and some simple systems.

What i want to know is, what's MUI exactly? I heard that MUI spells are better, but why?Somewhere i heard that it allows multiple units to cast the same abilties at the same time without causing any bugs or smthing. In my map, however, i don't plan on allowing 2 of the same hero type to be in play, and none will have a same ability.

Also, how do you work with the "Channel" spell? I use other abilities such as chain lightning, silence and others for the casting spells(then trigger everything etc.) but i heard that you can make 4 spells based on channel without triggering cooldowns on the others when 1 is casted. Is that true?

Finally, is there an icon requests thread anywhere? Or do i have to make a thread if requesting one?
 
Click here for great tutorial about MUI/hashtables.

People tend to make thier spells/abilities MUI because it enables many unit cast the same spell without bugging. Imagen it like this: each ability casted in proper MUI trigger will act like alone private spell.

Without MUI casting the same ability by differend units will make irritating actions.

Look on this:
  • Init
    • Events
      • Unit - Starts the effect of the ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • Set Your_unit = (Target of Ability being cast)
      • Wait 6 seconds
      • Set Life of (Your_unit) to (Life of (Your_unit) + 100)
If lets say caster A casts it on given target B, and after a while (like 2-3) sec other unit C cast the same ability on another unit D, only the second one (target D) will be healed by a total amount of 200. MUI spells will call a private functions for each case (just to understand).

Channel.

Channel is comfortable spell for many issues, At first it has various differend options, it can be invisible, visible(ect), it gives opportunity to show effect for given amount of time, ables user to set animation time (anything you wish) and last, the most important:

Enables user to create all types of abilities:
Passive/Active No target/Active Target unit/Active Target Point.

It also gives chance to add variations like Tiny's Toss in dota.
Its ability based on channel with choosen option: Target and added AoE.
Look at this:
help5.png


Data - Art duration speaks for itself.
Data - Base order id. Here we stop for a while.

In warcraft3 each spell has differend ID (indentification number) and thats they unit can cast many spells without bugging. If we put many spells with same ID on same unit, when it casts spells there will be a lot of strange events going on.
You can make as you said 4 Channel-based abilities (and much more) without having bugs - but remember that you have to set different ID for each of them. To do this just click on the field and from list chosse ability whatever you wish except, the unit you wish to give this ability to, do not have spell with same id already.

Data - disable other abilities - set to False when you want your unit to cast many spells (so usually go False immidiately)

Data - Fallow through time - Animation time - dont use default 180 sec, it means unit will stay for 3mins doing nothing but channeling..
Set to 0 if you want 0 cast animation, but for good effect keep about 1-1,5sec here.

Data - Options - here you choose options about your ability (like: if you want it to be visible check on 'Visible')

Data - Target type - important field, choose how your Channel-based spell should act, depending of Target type (no target/point/unit or even unit&point)

If you wish to give AoE component, fill field Stats - area of Effect.
 
Last edited:
Level 3
Joined
Jun 7, 2011
Messages
59
Ok, another quick question, thanks for your help with this.

The data-options-visible means you can see the spell icon, while its vice versa for invisible, or did i get something wrong?

Also, when i code bonus spell damage done with attacks, it happens instantly instead of when the projectile hits. is there any way i can change that, in GUI that is.
 
The data-options-visible means you can see the spell icon, while its vice versa for invisible, or did i get something wrong?
Yes, visible (checked on) - you will see the icon.
Unselected visible - you wont see icon.

Also, when i code bonus spell damage done with attacks, it happens instantly instead of when the projectile hits. is there any way i can change that, in GUI that is.
Is spell damage triggered? And, what is the source of projectille?
 
Level 3
Joined
Jun 7, 2011
Messages
59
Source of the projectile would be the caster(the attacker)
Spell damage is triggered

The spell goes like, when activated, caster gains attack speed and deals a % of his max mana as damage on each attack
 
I bet you did it like this:
  • Events
    • Unit - Unit is attacked
  • Conditions
  • Actions
    • Unit - Damage Unit <...>
Don't you? 'Attacked' event occurs each time unit starts animation (prepares attack on given unit) but it does not mean that it already dealt damage.

You have to use damage system or learn how to refer to damage source.
Best to use systems like this. Its great for GUI users, easy to get familiar with.

Your trigger will now look like this (if you use linked system):
  • Events
    • GDD_Event becomes Equal to 0.00
  • Conditions
  • Actions
    • Unit - Damage Unit <...>
This will be proper added damage, and projectile wont hit target after damage via trigger is done.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
MUI basically means that an ability can be used by any number of units at the same time without any faults occuring. Any number of units is defined by a reasonable number of units than can be expected to cast the ability at once (usually this is about 2^13 due to how the dynamic arrays of WC3 work but numbers around 100 are also probably acceptable).

There are 2 basic approaches to do this.
1. Thread approach, where you use locals in functions and hashtables between functions to provide simultanious cast support.
2. Instance approach, where you map each spell instance to space in a set of arrays which gives each spell instance a unique ID number.

1 provides the most simultanious casts (probably far beyond the game engine limits) but is slower due to the abstraction needed with the data. 2 is the fastest method (as there is much less data abstraction) but is limited to the approximate 2^13 limit of arrays or less if arrays get mapped for something else or instances use multiple indicies in an array.

The speed difference comes down to the complexity of interpreteded hash structures compared to interpreted arrays. 1 will be faster in the case of a single function chain though but few abilities use just 1 function chain.
 
Level 3
Joined
Jun 7, 2011
Messages
59
Thanks for everything guys. One more thing, can someone give me the animation string for footman/captain's defend.
 
Status
Not open for further replies.
Top