Sie sind auf Seite 1von 4

RE4UHD SAR EAR Tool Tutorial

Tools by Son of Persia


Tutorial by Mr.Curious

SAR EAR TOOL DESCRIPTION


The SAR & EAR are both files that are contained within the UDAS archives in the stage folders. Each of
these files serve the function of activating/deactivating lights (SAR) and effects (EAR) using triggerzones.
The tools for these files can handle both kind of files as they are quite similar in structure and function.

SAR & EAR FILE DESCRIPTIONS


SAR
While we are not sure exactly how the SAR file exactly works we do know that it is the file that controls
where certain lights are triggered (only up to 2 lights). While we can use the CAM to deactivate entire
lighting Groups, the SAR file can turn off individual lights within a Lighting Group.

EAR
Essentially the EAR file contains triggerzones to activate/deactivate effects within certain Effect Groups in
the EFF file. Unlike the SAR file, the EAR file does not contain as many limitations as to how many effects
can be activated/deactivated.

FILE EXTRACTION
To extract an EAR of SAR file simply place the file in the same folder as the
RE4UHD_SAR_EAR_Tool.exe and .bat files. Double click on the SAR_EAR_Extract.bat file. Once this is
complete you will see that a new folder has been generated (depending on which file type is used). Inside
this new working directory are a .txt file and .obj files. We are now able to edit the parameters in the .txt
file and/or edit the triggerzones using the .obj file. For more information on this part of the process please
see read the ‘Understanding the extracted OBJ files’ section of the ‘Universal Concepts’ document
that is provided with this release.

It should also be understood (as with all Son of Persia tools), that the amount of sub-object layers in the
.obj file must match the values in the EventCount = section of the extracted .txt files. If we are to remove
or add entires, these must match.

WORKING WITH THE SAR FILE


SAR trigger areas only affect player and enemies, not the stage models. As mentioned above, the SAR
entry only affects 2 lights at the same time and they are always the same for all groups. So, if we are
planning to use the SAR file we msut make sure that the lights we want to be activated/deactivated are
ALWAYS in the same order in all the Lighting Groups. If we are only using 1 Lighting Group then we do not
have to worry about this. So far we have only experiemnted using the SAR-EAR tool using Type 5 lights,
so we are unsure if what the results will be with Type 2 and other Light Types.

Once we have an extracted SAR file we can open .txt file to see the contents. Let's have a look at an
example of an extracted SAR file:

Index = 0x1 ---- ID OF THE EVENT (# Event 1 = Index = 0x1)


Offset[1] = 0x1
Offset[2] = 0x13 ----LIGHT 1 ( 0x13 = 19th light in the LIT file.It will deactivate/tone down light 19 for ALL
LIT groups)
Offset[3] = 0x1 ----- LIGHT 2 ( 0x1 = 2nd light in the LIT file. It will deactivate/tone down light 2 for ALL
LIT groups)
Offset[4] = 0x1
Offset[5] = 0x1
TriggerZoneHeightBoundary1 = 2000.000000
TriggerZoneHeightBoundary2 = 10563.557617
UnknownValue = 2000.000000
TriggerZoneCorner0_X = 73956.796875
TriggerZoneCorner0_Y = -1662.605469
TriggerZoneCorner1_X = 81356.281250
TriggerZoneCorner1_Y = 1099.443359
TriggerZoneCorner2_X = 84325.484375
TriggerZoneCorner2_Y = -7005.798828
TriggerZoneCorner3_X = 77198.578125
TriggerZoneCorner3_Y = -9760.255859
Offset[52..55] = 0x0
Offset[56..59] = 0x20 ----- INTENSITY OF THE LIGHT | 0x0 = LIGHT TOTALLY DEACTIVATED

WORKING WITH THE EAR FILE


Understanding the EAR file’s role with Effects
One more thing we must understand while editing the EAR file is how is works in tandem with the EFF
files. This relationship is very important because the EAR file controls which Effect Group folders get
activated. Simply put, each Effect Group folder is linked to an entry in the room’s EAR file.

While we are not sure exactly how the EAR file exactly works we do know that it is the file that controls
where certain effects are triggered. The effects were probably designed this way to conserve CPU usage
so that effects are only 'on' when the player is within a certain visible range of the effect. The other
reason for this is because there are often times that we only want an effect to be seen in certain areas of
a room (like having rain only visible outside of buildings).

How the EAR & EFF files work together


(this part of the tutorial also appears in the RE4UHD EFF Tool Tutorial but is also here for your reference)
As described in the EFF tutorial, there are certain scenarios in which we might want to have an effect
only appear in certain places in a room. This is where the EAR file comes into play. We can use the EAR
triggerzones to limit certain effects to only activate when we walk through certain areas. To start learning
this we need to identify first which Effect Group folders are linked to the EAR file triggerzones.

Before we look at a working example we need to understand that each Entry in the Table_2.txt file
relates to the Effect Group folder in the Effect 1 folder. For example, ‘Entry 1’ in the Table_2.txt file
relates to Effect Group 1 folder, and ‘Entry 2’ in the Table_2.txt file relates to Effect Group 2 folder and
so on. If there are Effect Group 14 folders then there will also be 14 Entries in the Table_2.txt file.

To identify the relationship between the EAR file entries and the EFF Table_2.txt file let’s use a working
example.. So we need to do the following:

STEP 1.
Extract r101 EAR and EFF files

STEP 2.
Open EFF Table_2.txt - This Table contains IDs for every Effect Group folder located in the Effect 1
folder.

STEP 3.
After extracting the r101 EAR file, open the extracted EAR r101_12.txt

STEP 4.
We look at both files and look for a match in certain values/offsets to find the triggerzone ID form the EAR
file:

Table_2.txt : (from the extracted EFF file):


...
Entry_9_index = 0xA
Entry_9_unknown = 0x4

r101_12.txt (from the extracted EAR file):


..
# Event 17
Index = 0x11
Offset[1] = 0x1
Offset[2] = 0x4

Entry_9 is responsible for the effects in Effect 1\Effect Group 9 folder and has an ID #04 We pay strict
attention to this number and search the r101_12.txt file for a match at Offset[2].(we are looking for
Offset[2] = 0x4)

If we look at Offset[2] in Event 17 we see that the matching value is Offset[2] = 0x4
This match tells us that Event 17 is the event for the triggerzone that controls where the effects of Effect
1\Effect Group 9 will be activated/deactivated.

This means that all of the effects in the Effect 1\Effect Group 9 folder will be activated/deactivated when
the player enters the triggerzone of Event 17 of the EAR file.
Now there may be times when we simply want the effects of a certain Effect Group folder to be activated
all the time no matter where we are in the room. So for example, if we want to activate the effects in
Effect 1\Effect Group 9 to be seen everywhere we can do two things:

1 – Edit the Table_2.txt entry to read Entry_9_unknown = 0xFFFF. The FFFF value allows the effect to
be read anywhere instead of using the ID for an EAR Event.

2 – We can edit the triggerzone model.obj file in the EAR file Event 17 in 3DsMax to span the size of the
entire room.

While this may seem a bit complicated because there are several files and values to deal with this setup
gives us a tremendous freedom to choose where effects are activated/deactivated.

In the EAR line Offset[2] and the EFF Table_2.txt Entry_X_unknown are the key. If they both match,
the effect group is activated in that trigger area.

This concludes the SAR - EAR Tool Tutorial

Happy Modding!

Mr.Curious
12 - 2018
https://www.youtube.com/user/kalamalkakid/
http://residentevilmodding.boards.net/user/5592

Das könnte Ihnen auch gefallen