Effects (.pfx) - emd4600/SporeModder-FX GitHub Wiki

Effects are one of the most interesting features in SporeModder FX. In some game engines they are known as "visual effects" (Unity) or "particles".

Effects are created in .pfx files. When you create a mod, you add your custom effects in an effect directory ( .effidr) file. When you are creating a new effect, SporeModder FX provides you with an Effect Editor which you can use to test your changes in real time.

The best way to learn is to look at existing effects. Here you have a project with all the effects in Spore: https://mega.nz/file/zQ011ZoQ#pmNVuZ2vVSe7qf7VrMeYtZsWQsnGQL6_3mskTvUiNZA

The .pfx file

Effects are organized in components: particles, decals, models,... are example of components. There is one special component, the effect, which is a collection of components. When you want to use an effect in Spore, you are playing the effect component, which in turn plays all its components, etc

Basic example

Let's see a basic example of a .pfx file:

particles test_particles
	texture effect-star
	color (1, 0, 0) (0, 0, 1)
	alpha 0 1 1 1 0
	life 4
	rate 800 200 500 0 -loop 8.5

effect MyCustomEffect
	particles test_particles

export MyCustomEffect

Let's break down this example. First, we declare a particles component, called test_particles. The name of the components does not matter, as it's only used inside the .pfx file. This component defines a particle system with certain attributes: a spawn rate, color, texture, etc.

After that, we declare an effect component. That effect component just plays the test_particles component, but we could add more if we wanted.

Finally, we export our effect component, which was named MyCustomEffect. Exporting an effect means it can be used by Spore: in a creature part, in an adventure object, in an ability, etc. In this case, it will have the name MyCustomEffect.

Note that inside an effect component, all the subcomponents are played at the same time; if you want to play them in order, use a sequence component.

List of effect components

List of effect resources

  • [effectMap]
  • [material]
  • [splitter]