Post by zatarita on Sept 9, 2022 13:17:02 GMT 10
Hello!
I have recently thrown together a new tool used to modify stage FSE files. It has a slightly different workflow than the current tool set we use, so I figured it would be useful to make a tutorial. To explain the tool I have decided I will completely remake the FSE for the level r113 (The Farm at night). I chose this room because it gives me a chance to show off most of the features the tool can handle. I hope many of you will find the tool useful, and I am open to feed back c:
I have recently thrown together a new tool used to modify stage FSE files. It has a slightly different workflow than the current tool set we use, so I figured it would be useful to make a tutorial. To explain the tool I have decided I will completely remake the FSE for the level r113 (The Farm at night). I chose this room because it gives me a chance to show off most of the features the tool can handle. I hope many of you will find the tool useful, and I am open to feed back c:
Without any further adieu, Let's jump into it.
What Is An FSE File?
The FSE defines Trigger Areas that change sound settings when the player walks into it. The settings that can be changed with these trigger areas are footstep sounds, rain/wind volume, thunder, and can even trigger new sounds/music altogether. When put together; the FSE helps pull together a room by making the objects feel as though they interact with the space they are in. Changing foot step sounds from dirt to wood, Turning down the rain when entering a house, etc.
How To Modify An FSE File
In the past we could modify the FSE file using the SoP Tools; however, I wanted to make a new approach to modifying these files (and hopefully more in the future). I'm going to use my own FSE Tool. (Link)
This tool will decompile any FSE into an editable text file which can be recompiled back into an FSE once finished. for this tutorial I'm going to be using a supplied empty FSE to completely make a brand new FSE from scratch. Instead of explaining a summary of everything and getting lost in the technical. I figure we should jump straight in and let the example explain the tool.
Part 1 - Footstep Sound Effects
(Note all captions go with the image above it)
The first type of FSE we will look at is the Footstep sound effects. We're going to import an SMD file into max for reference. (If you dunno how to do that check out this link)
Once we get the model loaded into max. We're going to draw some splines in the scene. This area represents our trigger area.
Using the Rectangle Spline from the Splines menu I'm going to click and draw out a rectangle area. The one I made above Is just an example, I'm going to move that spline into the hut above it. This will allow me to change what footstep sound gets played inside the hut.
For this example I left them slightly above the ground so that they can be seen; However, I would actually recommend them starting just slightly under the ground instead.
I'm going to go ahead and do the same thing for all the other areas in the room that should have different footstep sounds.
Once we've defined all the trigger areas with the rectangle tool, I'm going to select them all and, under the modify tab, I'm going to select "extrude". This will turn all the 2d splines into 3d boxes.
We will be able to adjust the height of the trigger area by adjust the Amount slider in the Extrude modifier. This will make translating the trigger area over to our text file easier as this closely imitates how the game does it.
Currently if we adjust the Extrude Amount on one trigger area; it changes the extrude height for ALL the trigger areas. In order to make each Extrude unique, with all the trigger areas still selected, we need to right click the "Extrude" modifier and click "Make Unique". Then click yes when prompted if we want to make items unique. This will allow us to be able to go through and manually adjust each trigger area as needed.
Next I'm going to go through each trigger area I'm going to fine tune the Extrude Amount until it better fits the area I want to define.
This is my final product. I have defined an area for each space that has a unique foot sound. Now I need to translate all this into an FSE file to be used in game.
Included with the tool is an "empty.txt" file. This is an empty FSE definition. To get started I'm going to copy the empty file, and rename it to the name of the room we're using.
We're going to open the newly named text file, and update the count to reflect how many trigger areas we're trying to create. Then save and close the file.
Next we're going to drag our text file onto "FSE Refactor" this will apply any changes we have made. In this case it will generate the 8 entries we said we wanted.
Now if we open the file back up we will see that there are 8 entries for us to use. There are a few things we have to do first. We're going to go through the file and change all of the indexes from 0 to something unique. In my case I just counted up by one for each index. (0, 1, 2, 3, 4, 5, 6, 7) If you like at this point you can Refactor again to update the Entry number in the comment.
Next we're going to start to copy the trigger area to the text file. To start we're going to copy the Amount from the Extrude into the Height field of the first trigger area.
After that we're going to copy the Z position of the trigger area into the FloorPos.
We're going to convert the trigger area into an editable mesh or poly. Whichever you prefer.
Then under the modify tab we're going to select the vertices option.
Next we're going to pick a starting point. I prefer the bottom right corner; however, it doesn't matter which you chose so long as you always go clockwise around the area. In the bottom of the window we're going to copy the Y position of the first vertex into point1Y. Resident Evil 4 inverts the Y coordinate. When transferring the value over if it's positive make it negative, and if it's negative make it positive
Do that for all Y values in a clockwise pattern.
Finally do the same thing for all the x coordinates. These don't need to be inverted, just copy them as is. Once done; you've finished making our first trigger area.
I know this process is tedious, and I'm trying to find a better way to do this; however, manually transferring will always work. I'll update the tutorial in a later date if something changes. This is the quickest method I have found. I only takes me a few mins per area once I get into the swing of it.
Now that our trigger area is defined, all we need to do is tell the game which footstep sound we want to use.
Then we repeat for each of the trigger areas we have defined.
Some of the sounds are hard to differentiate. I'm not entirely sure how sounds get assigned to the index, so you might have to play around with the number until you get something you like.
Final Product
Part 2 - BGM Volume Control
In the first part we discussed Foot Step Sound effects, In this next part we're going to discuss using the BGM Volume Control. This type of FSE can control the rain and wind volumes.
Just like before we're going to define a retangular trigger area. But this time we're going to just do it right inside the door. This trigger area is going to change the volume of the rain and the wind in the room when you walk through it.
Following the same steps listed above, we're going to define a trigger area just inside the door for an interior area. In our case we added an additional 13 trigger areas
Like before we're going to update the count. In our case we're going to add 13 to our existing 8, which gives us 21 in total. Then refactor it like before to add our new entries
Also like previous we're going to need to update the indexes from 0 to something unique. Again, I just added one to each (8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
While I'm doing this I'm going to change the type to type 2. Which is used for BGM Volume Control
Then after doing that I'm going to refactor one last time. This will change the footstep parameters to BGM Volume Control parameters.
I'm going to change the Target from 0 to 3. This tells the game I wish to edit the Rain, and Wind sound parameters. You can see the available options in the comments to the right.
1(rain) + 2(wind) = 3
Next I want to tell the game I want to set the rain volume, and set the wind volume. To do that I will use the comments on the right and set the value 3
1(set rain volume) + 2(set wind volume) = 3
Next we will set the value we wish for the rain and wind to be set to. It is important to note that if you set the volume of Rain or Wind without setting the corresponding Duration Fade to at least 1 it will cause the game to crash (I'm assuming it's due to a division by zero.) So it is important to at least set it to one. For my final example I went with 100. (Which I later changed to 300)
Preview
Part 2b - BGM Volume Control Continued
You might of noticed that when I left the building the volume didn't turn back up. This is because we never defined trigger areas to reset the volume just outside the door to the building. So, we're going to define a few more trigger areas
Just like before we're going to go ahead and define the trigger areas outside the doors
And do the same thing for all exits.
Like before we're going to update the count for the FSE, refactor the FSE, update the indexes, and change the types to BGM Volume Control.
I'm hoping by now we've gotten enough practice to where I don't have to lay out each step; however, if you need to see part one for how to define
and copy the trigger area to file.
Notice how in the VolumeSetFlags I have 0 instead of 3. If we don't "Set" any volume, we're "Resetting" the volume back to what it was instead.
We still want to set the fade duration to help blend a smooth transition as we walk out of the building.
For our example we're going to use these settings for every trigger area defined to reset the volume of the rain.
And with all of that out of the way, we are FINALLY completely done.
Final Final Product
Thank you for your time!
If you have any questions feel free to ask. There is so much more to the FSE file, but this is hopefully enough to get you started, and experimenting on your own.
If you have any questions feel free to ask. There is so much more to the FSE file, but this is hopefully enough to get you started, and experimenting on your own.