User Tools

Site Tools



Layout Files

By: OedipusTex

In Basic Skill we briefly discussed the FILE setting on the EVENT_TRIGGER. What we said about it then was that the FILE was a reference to a .Layout file that defined the hit area, along with particle effects and sounds. Let's take a look in it now.

Opening Layout Files

The fastest way to open the Layout file for an EVENT is to select the EVENT in the skill tree browser and click the “Open Layout” button that appears under the skill's code window when an EVENT is selected. We need to make sure we select EVENT_TRIGGER and not EVENT_TRIGGER_FOUR, because the Layout is attached to the EVENT_TRIGGER in this case. (In fact, skills can have dozens of layouts, one per EVENT, though most have only 1 or 2, and some have none. Elemental Boon has only one, on an EVENT_TRIGGER.)

The image below shows how this is done.


The Layout will load in the main work area. If we minimize the Skills Editor and take a look (making sure Layout is selected from the tabs on the bottom left of the screen) we see something like this:


Contents of a Layout File

Elemental Boon's layout has 5 objects. You can see them in the Layout panel on the left side of the screen.

DamageEffect is a renamed Damage Shape object. Did you wonder how spells know whether they've hit a target? Damage shapes are how. We'll be taking a better look at the properties of a damage shape shortly.

A LayoutLinkParticle is a reference to a Particle Effect created in Torchlight 2's Particle Editor. There are three of these in Elemental Boon, each referencing a different particle effect. If you want to see what the particle effect looks like, select it from the tree on the left, then click then Magnifying Glass icon that appears at the top of the Layout panel (it appears next to the green checkmark). This will load that particle effect into the particle editor and allow you to start editing them. We won't be doing that now, but you may want to try clicking each LayoutLinkParticle to see how each particle effect looks.

Two Timeline objects. Timeline objects allow you to control when something happens with the skill–just putting a reference to it in the Layout isn't enough. For example, at what point does the damage effect activate? How long is it active? When does each particle fire? When do sounds take place? These things are all controlled from Timeline objects.[/list]

Damage Shapes Go back and click on the DamageEffects Damage Shape on the left. On the right, make sure you have the Properties panel displaying. (if you don't see the Properties panel at all, go to the menu at the top of the screen and click View > Properties.)

Damage Shape Properties

On the properties panel there are several settings that control various aspects of the damage shape. Below is a brief discussion of the most commonly used elements. (Keep in mind that due to lack of documentation and not a lot of data I am unsure what several settings do, and always copy values from existing spells to ensure the damage shapes work).

  • ENABLED Seems to refer to whether the Damage Shape is enabled from the moment the Layout loads. This usually seems to be set to False. Why? Because most skills, including Elemental Boon, enable their Damage Shapes using Timelines.
  • MAX UNITS HIT The maximum number of units this damage shape can hit per burst. A “burst” seems to be defined as one period of Enablement. If a timeline enables, then disables, then enables again via a Timeline, then it seems this value resets itself. FYI setting it to 0 seems to mean “infinite.”
  • SHAPE The shape of the damage area. Elemental Boon is set to Angle, which means a flat circular or cone shaped area. Other options are Box, Line, Point, and Sphere.
  • UNITTYPE Refers to the type of unit to limit the damage shape to. In this case it is set to the UnitType PLAYERS_AND_PETS. When the spell fires, only units of that UnitType will be included in the collection of objects the damage shape returns to the power as having been “hit.” In the case of Elemental Boon, this is slightly redundant, because as we saw earlier in the spell's affix code, we limited the application of the Elemental Boon Affix to Self, Friend, and Pet anyway. But redundancy is sometimes useful. Anyway, if this portion of the damage shape were set to something inappropriate, say, MONSTER, then nothing would happen at all because other settings in the spell already limit it to hitting/affecting the caster and his or her allies.
  • MAXRADIUS The maximum radius to use for the damage shape. Elemental Boon uses a FIXED radius of 12 meters.
  • MINRADIUS The minimum radius to use. Ignored because USE MAX ONLY is true. In fact, as far as I know USE MAX ONLY is set to true for all damage shapes and MINRADIUS is never used. But there may be some use for it I'm not aware of.
  • USE MAX ONLY Indicates that the game should ignore the MINRADIUS and draw the shape using MAXRADIUS instead.
  • SHAPE VISIBLE Indicates whether the shape is visible in the editor. Turning this is off or on is sometimes helpful when editing particle effects at the same time as the damage shape.

LayoutLinkParticles are links back to particle objects. As discussed earlier, it's possible to view the particles being linked by clicking the spyglass icon when a layoutlink is selected. You can change the Particle Effect the LayoutLinkParticle loads by changing the LAYOUT FILE Property in the property tree. You can also scale particle systems or change their orientation. And that's pretty much it for LayoutLinkParticles–assuming you particle effect is set up, changing the call to the effect is very easy.


Timelines tell the Layout when to do various things with other elements in the file.

In order to make edits to a Timeline, you need to load the special timeline editor. To do this, click on the Timeline in the Layout panel and select the wrench icon. You'll get a screen like this, from the first of the two timelines:


This timeline references two of the LayoutLinkParticles we looked at a second ago (the one labeled _clone and the one labeled _clone_clone.) Look at the yellow section of the screen. There are two long lines, each with a black dot on them near the beginning, the name of the LayoutLinkParticle, and the statement Event: Start Particle. All that is is this timeline saying “Start both of these particle systems right away.” If you were to use the mouse to drag the dot further to the right, you could delay the activation of the particle by as much time as is represented by its new position on the timeline.

Let's look at the second timeline next:


This timeline has 4 lines:

  • DamageEffect Event Enable: Enables the gathering of enemies inside the damage shape
  • DamageEffect Event Disable: Closes the damage shape–no more allies can be hit by it if they wander into its area after this point. In other words, allies have to be within Elemental Boon's reach at any point within about 1 second of casting to be hit by it.
  • StartParticle: This is just kickstarting another particle system.
  • Force Stop Particle: Forces the particle system to stop. This happens 15 seconds into the power and explains why the column of light particle effect this power produces lasts for so long after you initially cast it.

Continue the Walkthrough with Elements of a Passive Skill

layout_files.txt · Last modified: 2015/11/18 12:50 by phanjam