======= FXR files for SFX Explained =======
===== Tools =====
* WitchyBND (version at time of writing is 2.4.0.1)
* Notepad++
===== General =====
SFX are the special visual effects that use models and textures to "simulate" glowing, fire, flames, and magic. They are located in the "sfx" folder of the game:
* Common Effects: SFX can appear everywhere, such as magic.
* For ER and AC6, there is the "sfxbnd_commoneffects.ffxbnd.dcx" that contains SFX that can appear everywhere, such as magic.
* For DS3, there is a separate "frpg_sfxbnd_commoneffects_effect.ffxbnd.dcx" and "frpg_sfxbnd_commoneffects_resource.ffxbnd.dcx" file and additional ones for the DLCs.
* Map SFX: Some SFX are exclusive to particular regions, e.g. "sfxbnd_m11.ffxbnd.dcx" for map 11.
* Character SFX: Some SFX are exclusive to special enemies, e.g. "sfxbnd_c3750.ffxbnd.dcx" for c3750.
After you unpack a .ffxbnd for **ER/AC6** there will be some folders inside:
* "texture" which holds the textures as .tpf files, can be (un)packed
* "model" which holds the models as .flver files, can only be converted/exported/imported
* "effect" which holds the .fxr files
* "animation" which holds the animation files (.hkx)
* "resource" which holds the resource lists (.ffxlist) files for FXR with the same ID. They __need__ to include the .tif and .sib file names (actually refers to .tpf and .flver files) that the .fxr file uses or they aren't loaded when the SFX is called.
For **DS3**, files are separated into 2 bnds:
* _effect.ffxbnd.dcx, which holds the fxr files
* _resource.ffxbnd.dcx, which holds the hkx (animation), model, and tex (texture) files. Also, there are no resource lists.
The .fxr files determine what the SFX looks like. To edit them, you need to convert them into .xml files with WitchyBND. When you are done with your edits, you need to convert the .xml back to .fxr with WitchyBND. You will then need to add any new .fxr files (and any new resources in ER/AC6) as entries in the _witchy-bnd4.xml (found in the effect folder) using Notepad++. Finally, repack the .ffxbnd with WitchyBND.
This tutorial will mention everything that is special for DS3 or ER/AC6 when editing. The SFX system has been slightly reworked and some fields or properties have changed.
===== References =====
These sheets contain all the calls of the FXR file which are explained in the example further down.
* [[https://docs.google.com/spreadsheets/d/1awj88NjfLzRZ4PZnWe0r5OFgpNqWrKNVMb2OPXbBmuQ/edit#gid=1323259003 | Dark Souls 3 FXR Notes]]
* [[https://docs.google.com/spreadsheets/d/12hKQg5kBvOJ_M0Udoz5GqS_2RX-d8YtaBapwpSJ2Csg/edit#gid=1424830463 | Elden Ring FXR Notes]]
* [[https://docs.google.com/spreadsheets/d/1gmUiSpJtxFFl0g04MWMIIs37W13Yjp-WUxtbyv99JIQ/edit#gid=31255113 | FXR IDs]]
At the present time, please use the Elden Ring FXR notes for AC6 edits and make note of any irregularities.
===== Spell SFX example =====
To give an overview, you can convert a spell .fxr file (e.g. Lightning Spear: f000525500.ffx -> f000525500.fxr.xml) and then open it with Notepad++. In Notepad++, collapse all sections (in view tab) so it looks like this:
==== Overview ====
This is an overview with all actions, effects, and containers collapsed:
The first Container is the "RootContainer" and always has the Id "2000" and holds every effect.
The "tag" value was added to everything to track what every effect is doing.
Note that you can change the Id of any container to "0", which disables it. Just make sure you remember or notate what it was originally! You can make in-file notes after the ">" of each line or write a tag as shown above.
Let's take a look at the "lightning spear model" Container:
As you can see, there are actually 2 lightning spear models: one getting spawned from the Container, and one child Container which is almost the same. The difference is their lifetime and scaling. One changes scaling over time and disappears, while the other doesn't and stays longer. This is often done for SFX which have an expanding model.
Here is a look at the "Effect" 1004 of the first one:
Only ER has the last 2 additional actions. Both effect 1004 and 1005 have a set number of slots and only specific actions can fill them or replace an action. 0 means there is not action set.
This could even be true for main actions which hold the texture, model or geometry. This occures if there is a parent effect node with only rotation or movement actions and several child effects which then are all affected by those actions.
Here is the expanded view of the action 128:
false
true
0
You can look up the actions and their fields & properties in the FXR notes. Ignore the "Unk" (unknown) tags at the top. Some actions don't have values for "Fields2", so they only have the closing tags like "" as seen in this example.
Important to note is that fields can only be set and will remain at the same value, while properties can be changed to different property and interpolation types to change over time.
Here is an example of a static value:
Here is an example of a value that changes linear over time:
To learn more about it, it is best to start out by dissecting a spell to analyze different parts of an sfx. This can be done by setting all effects to "0" except one, check what is left in-game and then give it a description.
Then compare the effect and the actions with the resource sheets.
This is essential to grasp the concept of visual effects if you have never worked with them.
Example:
Main actions for flames will have textures with slices on them and they will cycle through each of those at a certain speed which is all set with fields.
Small particles that are hovering in the air in a map area are not simply spawned everywhere but are spawned in a range and form around the player. Those ranges are the emitter form which can be e.g. a sphere or a box.
Drops, fog gates, bonfire reset screen, movement in the environment causing e.g. sand to whirl or water to splash is all sfx.