Grammarsalad / readmes

0 stars 0 forks source link

Eeex #3

Open Grammarsalad opened 5 years ago

Grammarsalad commented 5 years ago

Template: https://gibberlings3.github.io/Documentation/readmes/readme-mymod_2017.html

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. You can do this like so:
COPY_EXISTING ~EEex_Brd.lua~ ~override~
SPRINT old @500016// tra ref
SPRINT new @500017// tra ref
REPLACE_TEXTUALLY ~%old%~ ~%new%~

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. You can do this like so:
COPY_EXISTING ~EEex_Brd.lua~ ~override~
SPRINT old @500016// tra ref
SPRINT new @500017// tra ref
REPLACE_TEXTUALLY ~%old%~ ~%new%~

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

Opcode #403: ScreenEffects

Description:
The resref field in Opcode #403 defines a Lua function that is called whenever an effect is being added to the target creature. The Lua function's signature can be seen in the following example:
See below for use example

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded.

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

Opcode #403: ScreenEffects

Description:
The resref field in Opcode #403 defines a Lua function that is called whenever an effect is being added to the target creature. The Lua function's signature can be seen in the following example:
See below for use example

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded.

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

Opcode #403: ScreenEffects

Description:
The resref field in Opcode #403 defines a Lua function that is called whenever an effect is being added to the target creature. The Lua function's signature can be seen in the following example:
See below for use example

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded.

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ```

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

Opcode #403: ScreenEffects

Description:
The resref field in Opcode #403 defines a Lua function that is called whenever an effect is being added to the target creature. The Lua function's signature can be seen in the following example:
See below for use example, or click here

Opcode #404 (OverrideButton)

Parameter #1: Replaced Button
Parameter #2: Replacing Button
Description:
Param1 is the button type to replace, (ids match what is defined by EEex_ACTIONBAR_TYPE in M__EEex.lua). See Below
Param2 is the button type to replace with, (ids same as above).

Opcode #405 (OverrideButtonIndex)

Parameter #1: Index to Override
Parameter #2: Replacing Button
Special: Action Bar Config
Description:
Overrides a button based on index and actionbar configuration:
Param1 = Button index to override
Param2 = Button type to override with
Special = Actionbar config to match (-1 to match any class home)

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

B3_CuBar.lua

Enables customization of a character's actionbar ingame through a graphical interface. Simply hold shift with the character you want to alter selected, and change the buttons as you wish For an example of use in game, see here

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded.

EEex_SetAreaGlobal(areaResref, globalName, value)

Sets variable in ARE

EEex_SetGlobal(globalName, value)

Sets variable in GAM

EEex_SetActorLocal(actorID, localName, value)

Sets variable in CRE

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ``` ### Opcode #403 Sample Credit: Bubb

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???

Grammarsalad commented 5 years ago

EEex

##### Author: [Bubb](https://forums.beamdog.com/profile/Bubb) ##### Contributors: fearless, OlvynChuru, CrevsDaak ##### 0.5.0-alpha ##### Languages: ? Relevant? ##### Platforms: EEex will support MacOS and Linux on launch, however, the current alpha version only supports Windows. ##### GitHub: https://github.com/Bubb13/EEex

\page

Table of Contents

\page

Notes

Overview

EEex is an executable extender for Beamdog's Enhanced Edition of the Infinity Engine. Its goal is to externalize certain parts of the engine to grant modders a greater degree of control over otherwise hardcoded mechanics. EEex does not make any gameplay changes itself - it merely enables other mods to do so.

Just give me the link!

Alpha versions of this project can be found here

What does it do?

EEex, when installed, directly modifies the game's executable in order to insert a loader. This loader is used to alter the game's code on startup; the modifications that are made depend on the version of EEex installed, and any installed mods that make use of EEex's capabilities.

Compatibility

BG2:EE v2.5.16.6 is the only supported game at the time of writing. However, at the time of launch, EEex should be compatible with all Enhanced Edition Games.

Bug Reporting

If you should encounter any bugs, please report them to the authors at the EEex forum. In addition, EEex is available on GitHub, so fixes and changes can be submitted by the community.

Installation

Special Note for Siege of Dragonspear from Steam/GOG

Good Old Games (GOG) and Steam both package the additional content for Siege of Dragonspear in a method that WeiDU, the tool used to install this mod, cannot access. You must run a program called Modmerge on your SoD installation before you can install this or any other WeiDU-based mod.

Enhanced Editions Note

The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows

EEex for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, extract the files to your game folder.

When properly extracted, your game directory will contain setup-EEex.exe and the folder EEex. To install, double-click setup-EEex.exe and follow the instructions on screen.

You can run setup-EEex.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X

TBD

Linux

TBD

Note for Complete Uninstallation

In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-EEex --uninstall at the command line to remove all components without wading through prompts.

\page

## Contents ## Main Component The main component installs all DF:LEKDCH ## Information for Modders: ## Updated Opcodes

Opcode #42

Special: Force the slot modification

Opcode #62

Special: Force the slot modification

Opcode #218

Resource Key: Fire spell

Opcode #280

Parameter #1: Surge Roll
Special: Show hardcoded graphical effects

Opcode #319:

Power: Mode
Parameter #1: IDS Entry / Value
Parameter #2: IDS File / Stat Type

Opcode #324:

Special: Strref

\page

## New Opcodes

Opcode #400: Set Temporary AI Script

Parameter #1: Irrelevant
Parameter #2: Type
Description:

Opcode #401: Set Extended Stat

Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Stat
Description:

Opcode #402: Invoke Lua

Parameter #1: Lua Value 1
Parameter #2: Lua Value 2
Special: Lua Value 3
Description:

Opcode #403: ScreenEffects

Description:
The resref field in Opcode #403 defines a Lua function that is called whenever an effect is being added to the target creature. The Lua function's signature can be seen in the following example:
See below for use example, or click here

Opcode #404 (OverrideButton)

Parameter #1: Replaced Button
Parameter #2: Replacing Button
Description:
Param1 is the button type to replace, (ids match what is defined by EEex_ACTIONBAR_TYPE in M__EEex.lua). See Below
Param2 is the button type to replace with, (ids same as above).

Opcode #405 (OverrideButtonIndex)

Parameter #1: Index to Override
Parameter #2: Replacing Button
Special: Action Bar Config
Description:
Overrides a button based on index and actionbar configuration:
Param1 = Button index to override
Param2 = Button type to override with
Special = Actionbar config to match (-1 to match any class home)

\page

## Modules These can be enabled in EEex_INI.lua by flipping the relevant entry to true.

B3_Hotke.lua

Allows the definition of more complex hotkeys. There is some documentation at the top of the file in the form of examples, though I don't know if this is sufficient.

B3_Invis

When enabled allows party-controlled creatures with Opcode #193 to see / attack invisible creatures. If "B3Invis_RenderAsInvisible" (at the top of the file) is set to true the detected invisible creatures will render as if under broken-improved invis.

B3_Portr

When enabled suppresses the action-overlay icons on party portraits.

B3_Timer

Will be the timer GUI overlays, but it currently is waiting on the BAMs to be finished.

B3_CuBar.lua

Enables customization of a character's actionbar ingame through a graphical interface. Simply hold shift with the character you want to alter selected, and change the buttons as you wish For an example of use in game, see here

\page

## Functions

EEex_ActionbarListener(config)

Use this function to change action bar buttons.
For example: This assigns the search button to bards in the fifth slot. Find more details, including config values below

EEex_CompileBCS(scriptString)

Compiles a script in the uncompiled BAF syntax and returns the internal AI script representation. Use in conjunction with EEex_RunBCSAsActor(). NOTE: Compiling scripts is slow - try to compile scripts sparingly and attempt to reuse scripts that are already compiled.

Example: See Here

Copy paste version Here

EEex_FetchBCS(resref)

Returns the internal representation of the given resref's AI script. Use in conjunction with EEex_RunBCSAsActor().

Example:
local shoutScript = EEex_FetchBCS("SHOUT")
^ Returns SHOUT.BCS's internal engine representation.

EEex_GetActorClass(actorID)

Detects class by class.ids value.
EEex_GetActorClass(actorID) == 0x6 returns true if a paladin has been selected

EEex_GetActorClassScript(actorID)

Returns the resref of the actor's class script.

EEex_GetActorCurrentAction(actorID)

Returns the ID of the actor's current action (from ACTION.IDS). For example, if the actor is moving to a location, it will return 23, the ACTION.IDS number for MoveToPoint().

EEex_GetActorDefaultScript(actorID)

Returns the resref of the actor's default script.

EEex_GetActorDialogue(actorID)

Returns the resref of the actor's DLG file.

EEex_GetActorGeneralScript(actorID)

Returns the resref of the actor's general script.

EEex_GetActorKit(actorID)

Detects kit by kit.ids value. E.g. EEex_GetActorKit(actorID) == 0x4005 returns true for the Inquisitor kit.

EEex_GetActorModalState(actorID)

Returns the modal state of the actor (from MODAL.IDS; e.g. Turn Undead = 4, no modal state = 0).

EEex_GetActorMovementRate(actorID, adjustForHaste)

Gets the actor's movement rate. If adjustForHaste is true, it returns double the number if the actor is hasted and half if the actor is slowed. For example, this would return 0 if the actor was entangled, and it would return double the value if the actor had Boots of Speed equipped. Both opcodes 126 and 176 affect the value this returns. If the actor doesn't have an effect that changes its movement speed, this returns the "move_scale" value from the actor's animation INI file.

EEex_GetActorOverrideScript(actorID)

Returns the resref of the actor's override script.

EEex_GetActorRaceScript(actorID)

Returns the resref of the actor's race script.

EEex_GetActorSpecificsScript(actorID)

Returns the resref of the actor's specifics script.

EEex_GetActorSpellRES(actorID)

Returns the resref of the spell the actor is either currently casting, cast most recently, or is about to cast (waiting for its aura to be cleansed). It works with both Spell and SpellRES - type actions.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded. It also lets you get the actor ID of the image's master even if the image doesn't have an opcode 237 effect on it.

EEex_GetSpellData(resref)

Returns offset 0x0 of the data for the spell. The data for a spell is the same data as in the SPL file. For example, offset EEex_GetSpellData("SPWI304") + 0x34 is 3, because the spell's level is stored at offset 0x34, and Fireball is a 3rd-level spell.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_HasState(actorID, state)

Returns true if the actor has the specified state. For example, EEex_HasState(EEex_GetActorIDCursor(), 0x8000) would return true if the actor was hasted (because STATE_HASTE is 0x8000 in STATES.IDS).

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_IterateActorEffects(actorID, func)

Applies the function to each effect on the actor. The function takes one parameter, which is automatically set to offset 0x0 of each effect. The offsets for each effect are the same as in an EFF file. Here's an example: Click Here or see below

\page

EEex_IsImmuneToOpcode(actorID, opcode)

Returns true if the actor is immune to the specified opcode. For example, EEex_IsImmuneToOpcode(EEex_GetActorIDCursor(), 128) would return true if the actor is immune to confusion (opcode 128).

EEex_IsImmuneToSpellLevel(actorID, level, includeSpellDeflection)

Returns true if the actor is protected from the specified spell level (e.g. by Minor Globe of Invulnerability). If includeSpellDeflection is true, it also returns true if the actor has Spell Deflection, Spell Turning, or Spell Trap for the specified level.

EEex_GetSummonerID(actorID)

If the actor is a summoned creature, this gets the actor ID of the creature's summoner. If it's not a summoned creature, or if it's an image (created by Mislead, Project Image or Simulacrum), it returns 0. It also returns 0 if the creature was summoned before the game was loaded, unfortunately.

EEex_GetImageMasterID(actorID)

If the actor is an image, this gets the actor ID of the image's master. Otherwise, it returns 0. This function works correctly even if the image was created before the game was loaded.

EEex_SetAreaGlobal(areaResref, globalName, value)

Sets variable in ARE

EEex_SetGlobal(globalName, value)

Sets variable in GAM

EEex_SetActorLocal(actorID, localName, value)

Sets variable in CRE

\page

## Other These are other random things that EEex allows you to do.

EEex_Brd.lua

You can use this file to enable bard thieving. See how to use it below or for copy/paste example, click here.

\page

## DO NOT TOUCH This is the section that details the things that must not be touched (unless you *really* know what you are doing.)

\page

## Code Samples and other information: ### Opcode #402 Sample Credit: Swit ### EEex_IterateActorEffects(actorID, func) Credit: OlvynChuru ``` EEex_IterateActorEffects(EEex_GetActorIDCursor(), function(eData) local parameter1 = EEex_ReadDword(eData + 0x1C) Infinity_DisplayString(parameter1) end) ``` ### Opcode #403 Sample Credit: Bubb

\page

### EEex_ActionbarListener(config)

Configs Values:

Action bar types:

^ Bards cannot use pick lock or disable traps functionality by default. See EEex_Brd.lua in Other section.

So, for example if you wanted bards to have the stealth button in the fifth slot, you would change this in the above code:

Action Bar Locations

Each value lists the location, counted upwards from 0x0 (the farmost left) to **WHAAAAT???