Skip to content

6.3. LSFX Effects Components Properties

ImmortalRDI edited this page Nov 26, 2023 · 9 revisions
Index

LSFX Index

Properties

Inside each EffectComponent is a list of attributes, or Property values. These values range from Color, Scale, Emit Rate and more. Within these properties, they can have just a few Frames node ids or even more. Furthermore, The Combined Time and Value nodes can range from a few, to hundreds, for a single property. This is where we will discuss the most common ones you can affect.

WARNING

Attempting to edit Time and Value nodes of EffectComponents with dozens or hundreds of nodes runs the potential risk of breaking the effect, and in tandem, your game. Meaning attempting to display the effect will result in an immediate crash to desktop. So edit these at your own risk, and always make back-ups.


Mesh/Material/Etc

Throughout every EffectComponent, you will find A Mesh GUID, Material GUID, Mesh Proxy GUID and/or an Attached VFX String. These are the core of the EffectComponent that give it substance. Without one of these Property values, the EffectComponent will do nothing. You can Index Search these UUIDs or Strings to see what they are. Otherwise, unless you have extensive model editing experience, there isn't much you can do here with these, except Attached VFX, which we will get into [later}(https://github.com/ImmortalRDI/BG3-Community-Library/wiki/8.-Advanced-Tips).

Lifetime

This Property affects the duration of the EffectComponent within the given Start and End Times. It'll usually look something like this, but with varying values.


<node id="Property">
	<attribute id="AttributeName" type="FixedString" value="Lifetime" />
	<attribute id="FullName" type="FixedString" value="Emitter.Behavior.Lifespan" />
	<attribute id="Type" type="uint8" value="6" />
	<children>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="0.4" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="0.4" />
				</node>
			</children>
		</node>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="0" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="0" />
				</node>
			</children>
		</node>
	</children>
</node>

As you can see, It has a Time and Value attribute ids. The Time Value 0 is the start of the effect, where as 1 would be the end time. The time, as well as many other values, are "percentage" based. The Time attribute will never exceed 1. This is not the case for the Value attribute, as this can range from very small decimal values to large whole numbers. In the case of this LifeTime, you'll see that it has 2 Frame nodes. One has a value of 0.4, but the second has both Values set at 0. Usually in this case, it means that the EffectComponent is a non looping component, as it does not have any value for the second `Frame.


Uniform Scale

This Property node affects the overall size and shape of the EffectComponent.


<node id="Property">
	<attribute id="AttributeName" type="FixedString" value="Uniform Scale" />
	<attribute id="FullName" type="FixedString" value="Particle.Appearance.Uniform Scale" />
	<attribute id="Type" type="uint8" value="6" />
	<children>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="1" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="1" />
				</node>
			</children>
		</node>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="0" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="0" />
				</node>
			</children>
		</node>
	</children>
</node>

As you can see from the example, the effect is set to not loop, and be 100% of the size of the associated Material or Mesh, that we will get into later. With Scale, if you are worried about making changes to a Uniform Scale that may have hundreds of nodes, you can always use the following to adjust the size of the EffectComponent instead, to a much safer degree.

  • Scale Modifier X
  • Scale Modifier Y
  • Scale Modifier Z

Scale Modifiers will multiply the X, Y and Z values, accordingly, of the Uniform Scale. You can find what X, Y, and Z affect in the Bounds section of the Merged tutorial section. There is also a System.Uniform Scale Property.


Rotation/Life

Rotation/Life is all about whether an EffectComponent rotates, and it's speed.


<node id="Property">
	<attribute id="AttributeName" type="FixedString" value="Rotation Rate/Life" />
	<attribute id="FullName" type="FixedString" value="Particle.Appearance.Rotation Speed" />
	<attribute id="Type" type="uint8" value="6" />
	<children>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="0" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="0" />
				</node>
			</children>
		</node>
		<node id="Frames">
			<attribute id="FrameType" type="uint8" value="0" />
			<children>
				<node id="Frame">
					<attribute id="Time" type="float" value="0" />
					<attribute id="Value" type="float" value="0" />
				</node>
				<node id="Frame">
					<attribute id="Time" type="float" value="1" />
					<attribute id="Value" type="float" value="0" />
				</node>
			</children>
		</node>
	</children>
</node>

As you can see in this case, the EffectComponent will not rotate, even if your LSFX has RadialForce and SpinForce.


Emitter Type

Emitter type is all about what pattern the EffectComponent will emit from it's position.


<node id="Property">
	<attribute id="AttributeName" type="FixedString" value="Type" />
	<attribute id="FullName" type="FixedString" value="Emitter.Type" />
	<attribute id="Type" type="uint8" value="1" />
	<attribute id="Value" type="int32" value="3" />
</node>

In this specific case, the value is 3. I'll explain how different Value numbers affect the EffectComponent.

  • 0 - Entirely Random at the edge of the defined radius.
  • 1 - Randomly Emit within the defined radius.
  • 2 - Emit at the max along the defined radius bounds.
  • 3 - Emits directly from the caster.
  • 4 - Emits entirely on the Y Axis only, making a straight line of the particles ascending to the sky.
  • 5 through 8 are usually pretty specialized for specific types of Particles.

Maximum Particle Count

This determines the maximum allowed particles for the EffectComponent duration. Depending on the type of particle, this can be a value of 1 or even up to 1000.


Initial Particle Count

Additionally, a little further down you can find an Minimum and Maximum values of Initial Particle Count. Having different numbers here, with the Minimum not exceeding the Maximum, can give the effect a bit of a randomization. Initial Particle Count will only happen once, at the beginning of the spell, then it will defer to the Maximum Particle Count and Emit Rate.


Emit Rate

Emit Rate affects the frequency of a Particle System emission rate. There is a secondary node called Emitter Rate Modifier that multiplies the values located here.

Brightness

Brightness is fairly straight forward as it controls the light level emitter, affecting how bright it is. For Brightness, Alpha, and Color, all three have two seperate Property attributes in most EffectComponent types. You will have to experiment with each to find out which will affect the particular EffectComponent.


Alpha

Unless you've done extensive work with colors, this might be confusing. Especially since it's referenced as both it's own Property as well as defined int he color section. This determines the opacity level of the EffectComponent. A value of 0 means the EffectComponent is completely transperant, whereas 1 means completely opaque.


Color

You guessed it, it's in the name. This defines the color of the EffectComponent. It uses the ARGB format, which stands for Alpha, Red Green Blue. Because combining Red, Green and Blue in various ways can lead to nearly any conceivable color, mixing with Alpha for transparency, that's why this is used. This means that each value is between 0 and 1. So, for example, if you want a partially see through red EffectComponent, you'd have a value like such "1 0 0 0.5" The BG3-Modders-Multitool has a color picker under file, in sRGB format, which will give you the RGB numbers of the associated color you picked. There are also some resources available that we will discuss later, regarding color.


Radius

This component is going to affect the radius of the emitter, or rather, the space that it fills. You'll see a few separate types of radius in an EffectComponent.

  • Cylinder: Emitter.Cylinder.Radius Which will be a Circle with a vertical axis. This will be paired with Emitter.Cylinder.Height, which will determine how high the vertical axis can go.
  • Sphere: Emitter.Sphere.Radius which will be exactly that, allowing particles to emit within the full scope of the defined sphere.
  • Circle: Emitter.Fixed Circle.Radius This is usually reserved for particles on a surface, as it is, as the name implies, a fixed circle.
  • Cone: Emitter.Cone.Radius Bottom and Emitter.Cone.Radius Top Will be paired together here, as they determine the size of the cast end, and position end of a cone effect.

Radius Scale

In case you are unsure of which radius will affect your EffectComponent, you can always adjust this instead, as it is a singular value that will act as a multiplier for each Radius type.


Position

This one deals with the position of where the EffectComponent will start. A value of 0 0 0 would mean it starts directly at the source, where as, 0 2 0 would be 2 meters above the source.


Velocity

This refers to the speed at which the particle will travel, if it is designed to be a moving particle. Some particles can move, and not have a velocity, but that is because they are affected by one of the Force Effects. A component with a velocity value higher than 0 will also often have a Velocity Angle which determines the initial angle of the velocity relation to the Axis.


Axis

This will be the XYZ plane on which the particle is or travels. There are various types, and I encourage you to play around with these until you get the desired effect.


More

There are more 100 more different types of EffectComponents, and we can't cover them all or you will be reading forever. As I usually say, I encourage you to to experiment.

However, there are two other things worth mentioning, as they will come in handy.

Phases

The first one is Phases. More often than not, if you find an LSFX with a Phases block, it will have 3 separate nodes that look like this:


<node id="Phases">
	<children>
		<node id="Phase">
			<attribute id="Duration" type="float" value="1" />
			<attribute id="PlayCount" type="int32" value="1" />
		</node>
		<node id="Phase">
			<attribute id="Duration" type="float" value="4" />
			<attribute id="PlayCount" type="int32" value="-1" />
		</node>
		<node id="Phase">
			<attribute id="Duration" type="float" value="1" />
			<attribute id="PlayCount" type="int32" value="1" />
		</node>
	</children>
</node>

Usually, in the event of an LSFX having this block, it means that some effects are intended to loop. Usually if an end time falls within the 3 parameters, the effect will loop.

Input

This usually means that the effect is supposed to spawn in a particular way. As far as I've discovered, there are two types of Inputs you can find.

Target Visual

For a Target Visual Input, it means the effect is usually intended to be attached to a specific bone, which is defined in the MEI.

Distance to Target

This particular one usually means that the effect will be beam-like, whether it be Sun Beam, Telekinetic Pull or Eldritch Blast.


Possibilities

Now, what if I told you that in your LSFX, you could replace parts. Say there is a particle you like from one effect, but liked the majority of effects in another. You can add that Particle System EffectComponent into your Effect file. Just make sure that if you plan on adding, replacing or removing effects, to delete the entire EffectComponent block, and nothing more.


Folder Structure

A few things to note


Clone this wiki locally