Particles on Monsters
Particles are attached to monsters either as ambient decoration, or as part of a skill animation. In this tutorial we'll use the animation system to attach existing particles to a monster. We're not going to focus on making a good looking effect, instead focusing on the basic mechanics so that you can use them in your own projects.
Attaching Particles to the Monster's Animation
First, we need a monster to attach particles to. In the left pane of the editor, select the layout tab at the bottom, and right click in the white space above. Pick Units->Monster to create a new monster.
I'm going to use the Ezrohir Elite monster for this example, so select the new monster and look for the Monster property in the right hand pane. Select Ezro_Elite from the dropdown.
Your screen should look something like this:
Click the wrench and hammer button indicated in the screenshot above to open the animation editor with the animations for the selected monster.
Particles added to the bind animation will play as soon as the monster appears. This is the place to add any ambient or decorative particles that should always be on the monster.
Let's try that now. Right-click on the Bind animation, and choose Add New Trigger. Click on that new trigger (it's the new green dot) to select it. In the right pane, change the Name property to SpawnParticle_Stop_On_Death. That means, cryptically, that a particle will be spawned and then removed when the monster is killed.
The Layout File property is where we select the particle system we want to attach. Highlight the field, click the ellipses (...), and select a particle. I picked: media\particles\objects\poison_smoke.layout
Hit the Save button in the upper left corner of the animation window, and switch back to the main window. The monster should now have the particles you selected attached.
If you want to place the particle on a certain spot on the monster, you can use the Bone property to select a specific bone, and then use the Local Offset property to move the particle relative to the bone. Remember to save the animation to see the effects of any changes you make. Also, the local offset uses the orientation of whatever bone it's attached to, so you may have to experiment a bit to figure out which numbers you need to change.
You can also attach particles to other animations, and they will play when the animation reaches that point on the timeline.
To see an example of this, look for the Special_BellRing_Start animation (still on the Ezro Elite) and click on the rightmost green circle. If you look at your main editor window, you can see this bell ring animation playing, and the associated particles. These are added just like bind particles.
Any particles you attach on animations other than the bind need to be of limited duration. If you attach particles with infinite durations, they will stack up every time the animation plays and you'll have a big ugly expensive mess. So don't do that. :)
Using Unit Themes with Animations
Animations are shared between monsters that have the same mesh, but sometimes you will want them to have different particles. For example, if you have an ice skeleton and an fire skeleton and they use the same mesh with texture overrides, you will want the ice one to have ice particles and the fire one to have fire ones. To do that, you'll need to use Unit Themes.
You can use the unit theme editor to add new Unit Themes, it's available under the Data Editors menu of the main window. Just add a new one with whatever name you want, leave the properties blank, and save. You will then need to restart the editor. Then, you can edit a monster's unit file and add the unit theme to it. So, the fire skeleton would get your new theme "awesome_fire_skeleton".
Once that's set up, you can select that unit theme on triggers in the animation editor, and only monsters with that theme will use the trigger. So when you add a fire particle on the skeleton's bind animation, you'll set the Unit Theme property on the trigger to the new theme you made.
You can also attach particles directly from the unit theme, and you may need to if you're making a skill that can apply unit themes to any monster, but it's a lot easier to go through the animation editor if you have the option because you can save and instantly see how the monster looks.