-
Notifications
You must be signed in to change notification settings - Fork 5
EEex.db Pattern Database
The pattern database is a windows style ini file used to store information about patterns that are looked for by the EEex.dll once it is loaded by the EEex.exe loader. The patterns defined within the database correspond to the addresses of EE game functions and address locations of EE game global variables.
Each pattern for a EE game function or EE game global variable is defined in an ini section name. Details about the section name and the key names found in section are:
-
[Pattern Name]- each section name (Pattern Name) should be unique and named to represent the pattern for the EE game function or the EE game global variable that it stands for. Section names that end with=should be changed to a text representation, such asequ. This is due to a limitation of windows style ini files not able to read key names that end with=. The section name (Pattern Name) is used to read a matching key name in the EEex.ini file, which is used to speed up subsequent loads of the EEex Loader by more quickly verifying patterns vs searching fully for all patterns. -
PatBytes- is a series of bytes in text hexidecimal format repesenting the pattern to match.PatBytesis required. Note: ifPatBytesis not defined or has no content, the pattern is not imported or processed. -
PatAdj- is an unsigned integer representing the value to adjust +/- the found pattern address by, to return the start of the function or the address to read a game global variable from.PatAdjis optional. -
VerBytes- is a series of bytes in text hexidecimal format repesenting the sub-pattern to check for and verify if the pattern found is the correct.VerBytesis optional. -
VerAdj- is an unsigned integer representing the value to adjust +/- the found pattern address by, to obtain an address to use for matching theVerBytessub-pattern (ifVerBytesis defined).VerAdjis optional. -
Type- is a integer value of0,1,2,3or4.0represents a pattern defined for a function.1represents a pattern for a game global variable (or a pattern to read aDWORDfrom an address).2represents a pattern to match multiple occurrences for, and to store in an array of addresses.3represents a pattern to read aBYTEfrom an address.4represents a pattern to read aWORDfrom an address.Typeis optional.
The first defined pattern should always be PatchLocation. This is the pattern to match that locates the patch location to change the EE game code to the EEex_LuaInit function found within the EEex.dll. EEex_LuaInit in turn initializes and registers the lua functions used by EEex in M__EEex.lua and other EEex lua files found in the EE game override folder.
An example of how the PatchLocation pattern entry might look:
[PatchLocation]
PatBytes=83C43085C075145050506AFF50FF35
PatAdj=-5
VerBytes=83C4186A00
VerAdj=24
An example of an EE game function pattern:
[CDerivedStats::GetLevel]
PatBytes=558BEC518D45FC50FF750CFF7508
PatAdj=0
VerBytes=8A00
VerAdj=22
An example of an EE game global variable pattern:
[g_pBaldurChitin]
PatBytes=6683F8FF0F84B6000000A1
PatAdj=34
Type=1
An example of a type 2 pattern:
[CreStructExpand]
PatBytes=68183B0000
Type=2
- PatBytes or VerBytes if defined must be a minimum of 4 bytes in length.
- PatBytes or VerBytes if defined must be less than 2048 bytes in length.
- Pattern Names should not have a
=at the end of the name. - The maximum text length of all section names (Pattern Names) in all sections of the EEex.db file is defined as 65536 bytes. At an average length of 32 characters (approx) per name, this roughly equates to about 2048 pattern entries that can be defined. Any more and the EEex.dll will need to be recompiled to include a higher max size.