Configuration

Configuration

There are several configurable options which are all loaded from the {game}/x64/scripts/config/TheInsurgentsLuckyLootConfig.lua file when opening the game.

This configuration file can be modified via any text editor. The following configuration is the default and equivalent to not having any lucky loot at all:

Default Configuration
local function config(statusEffects, augments, locations, contents)
  local initialSteps = 100.00
  local recurringSteps = 50.00
  local statusEffects = {
    statusEffects.ko,
    statusEffects.stone,
    statusEffects.stop,
    statusEffects.sleep,
    statusEffects.confuse,
    statusEffects.blind,
    statusEffects.disable,
    statusEffects.immobilize,
    statusEffects.berserk,
    statusEffects.xZone
  }

  local dialogId = 103
  local augmentId = augments.essentials
  local soundEffectId = 65
  local castingState = true
  local targetedState = true
  local fleeingState = true
  local findings = {
    --{location, {content0, count0, chance0}, {...}, {contentX, countX, chanceX}}
    --{locations.sandSweptNaze, {contents.items.potion, 1, 2.00}, {contents.loot.emptyBottle, 1, 5.00}}
  }

  return initialSteps, recurringSteps, statusEffects, dialogId, augmentId, soundEffectId, castingState, targetedState, fleeingState, findings
end

return config

Below is a list of all configurable options and what they are used for:

Initial Steps

The amount of steps a party member has to take to start the recurring steps counter. Reset whenever a new location is entered.

Recurring Steps

The amount of steps a party member has to take to trigger the chance to find an item.

For example: With the default configuration from above, a party member would need to walk 150 steps (100 + 50) to trigger the chance to find an item. Afterwards they would only need to walk an additional 50 to trigger it again, and again, until a new location is entered upon which they need to walk the whole 150 steps again.

Status Effects

The status effects that prevent a party member from finding an item.

For example: If the status effects Sleep (4), Blind (7), and Berserk (27) should prevent a party member from finding an item, the parameter statusEffects would be set to the following:

local statusEffects = {4, 7, 27}

Dialog Identifier

The dialog of the combat log that will be displayed when an item is found.

As this is an entirely new dialog, it needs to be added to the game first by doing the following:

  1. Follow the setup instructions of The Insurgent's Workshop.

  2. Extract the ps2data/image/ff12/test_battle/us/binaryfile/battle_pack.bin file via the VBF Browser (us directory differs depending on your game language).

  3. Paste it into the The Insurgent's Workshop/files/source directory while keeping its directory structure intact (files/source/ps2data/.../binaryfile/battle_pack.bin).

  4. Run The Insurgent's Workshop.exe.

  5. Select option 1. Unpack Packages.

  6. Delete all files in the files/source/ directory except .../battle_pack.bin.dir/section_002.bin.

  7. Select option 3. Unpack Files.

  8. Add a new dialog to the .../battle_pack.bin.dir/section_002.txt file. For example:

{dialog 103, arg0type=1, arg1type=7, arg2type=9, flags1=128}
{rgb:128,95,26}{arg:0,0,0}{rgb:128,128,128} found {rgb:50,122,118}{count:2,1}{item:1,2}{rgb:128,128,128}!
{/dialog}

Feel free to change the text, but there is no point in modifying the arguments as their types and purpose is hardcoded into the script anyway. Argument 0 is the character that found the item (e.g. Vaan) while argument 1 is the content (e.g. Potion) and argument 2 is the count of it (e.g. 1).

  1. Select option 4. Pack Files.

  2. Create an archive (.7z, .zip, .rar etc.) out of the ps2data directory inside files/newpack and install it (e.g. Vortex).

  3. Set the dialog identifier of the configuration file to the one you added in step 8 (e.g. 103).

Augment Identifier

Only party members with a specific augment have a chance to find an item. This augment can either be acquired by unlocking a license node, using an equipment that grants it, or by default for a party member.

Sound Effect Identifier

The sound effect that will be played when an item is found.

A value of -1 equals no sound effect.

Casting State

If true, a party member that is casting an action cannot advance their step counter and therefore not trigger the chance to find an item.

Targeted State

If true, a party member that is being targeted (foe, ally, ...) cannot advance their step counter and therefore not trigger the chance to find an item.

Fleeing State

If true, a party member that is fleeing cannot advance their step counter and therefore not trigger the chance to find an item.

Findings

The findable contents of every location. Each location can have infinite findable contents.

Each content has its own find chance. So a location with 2 findable contents, one with a 80% chance and one with a 20% chance, would equal a 50% (100 / 2) chance to find at least one of them with a party member.

Every party member has their own chance of finding a content. The more party members have the required augment, the higher the chance of course to find more contents, assuming their step counters aren't blocked by one of the 3 states from above.

Notes

Parameters are processed top/left to bottom/right. So if a location is listed more than once, only the last one will actually have an effect. The same goes for using a content more than once for a location in which case their chances are just put together.

For a list of location identifiers, you can view this spreadsheet.

For a list of status effect and augment identifiers, you can view this spreadsheet.

For a list of content identifiers, you can view this spreadsheet.

Only the following content types are supported: Items, Equipment, Loot, Magicks, Technicks, Gambits, Key Items, Mist.

For a list of sound effect identifiers, you can do the following:

  1. Extract the ps2data/sound/se/sead_data_win/se000/se000.win.sab file via the VBF Browser.

  2. Download and open foobar2000.

  3. Open the extracted se000.win.sab file with it.

  4. Select and play any track you want.

Once you like one, you can use the track identifier as the sound identifier (e.g. se000.win#65 -> 65).

The step counter of a party member is not changed in the following cases:

  • When they or the party leader is riding a Chocobo.

  • When they are in a reserved party slot.

Last updated