A Baldur’s Gate 3 mod that spawns (mostly) kobolds when destroying firewine barrels, configurable via MCM and very extensible through JSON or SE.
By default, the mod spawns:
REDUCE
status) drunk kobolds in Act 3This mod is however highly extensible, and you can add your own spawn templates and region entries by modifying its JSON file in the ScriptExtender
folder, or by using the public API via SE, in order to change:
With MCM, you can also toggle the mod on/off, and control the spawn rate globally or per-region (Act 1, Crèche, Act 2, Act 3). This is a slider (0-100%) that controls the chance of spawning when a Firewine barrel is destroyed.
This mod can be installed and uninstalled at any time.
DRUNK
, WILD_MAGIC
, HASTE
, etc.Basic configuration can be performed through the Mod Configuration Menu (MCM):
The mod uses a JSON file (mfk_encounter_table.json
) to define what can spawn in each region. This file is located in the ScriptExtender
folder and can be edited to customize spawns.
The mod uses a hybrid schema that supports reusable spawn templates or inline templates. Here are the defaults:
DefaultEncounterTable = {
SpawnTemplatesDefs = {
TwoNormalKobolds = {
TemplateID = "45e31b7d-32ec-4f3d-8067-79061aeec77b",
Quantity = { fixed = 2 },
Statuses = {}
},
DrunkKobold = {
TemplateID = "45e31b7d-32ec-4f3d-8067-79061aeec77b",
Quantity = { fixed = 1 },
Statuses = { "DRUNK" }
},
DrunkRedcap = {
TemplateID = "c27dd409-9c26-458b-a845-03a8de78e330",
Quantity = { fixed = 1 },
Statuses = { "DRUNK" }
},
DualMeleeInvisible = {
TemplateID = "dfdcfbaa-ed9b-48ba-8302-927c5f5af12d",
Quantity = { fixed = 2 },
Statuses = { "INVISIBLE" }
},
RangerDrunkWildMagic = {
TemplateID = "1ad1fdb1-ea7f-492d-a72a-e282d9965b47",
Quantity = { fixed = 1 },
Statuses = { "DRUNK", "WILD_MAGIC" }
},
["3Imps"] = {
TemplateID = "feb1d610-4644-4dd0-8432-6e6a7be130d5",
Quantity = { fixed = 3 },
Statuses = { "DRUNK" }
},
SCL_KoboldEncounter = {
Members = {
{ SpawnTemplate = "TwoNormalKobolds" },
{ SpawnTemplate = "DrunkKobold" }
}
},
["6SmallDrunkKobold"] = {
TemplateID = "45e31b7d-32ec-4f3d-8067-79061aeec77b",
Quantity = { fixed = 6 },
Statuses = { "DRUNK", "REDUCE" }
}
},
Regions = {
WLD = {
Entries = {
{
TemplateID = "45e31b7d-32ec-4f3d-8067-79061aeec77b",
Quantity = { fixed = 1 },
Statuses = {},
Weight = 25
}
}
},
WLD_Hag = {
Entries = {
{ SpawnTemplate = "DrunkRedcap", Weight = 30 },
{
TemplateID = "08f651c6-d6ca-44c9-bae0-eb0318c4ca6b",
Quantity = { fixed = 1 },
Statuses = { "DRUNK", "HASTE" },
Weight = 25
}
}
},
CRE = {
Entries = {
{ SpawnTemplate = "RangerDrunkWildMagic", Weight = 20 }
}
},
SCL = {
Entries = {
{ SpawnTemplate = "SCL_KoboldEncounter", Weight = 100 }
}
},
BGO = {
Entries = {
{ SpawnTemplate = "6SmallDrunkKobold", Weight = 15 }
}
},
HOH = {
Entries = {
{ SpawnTemplate = "3Imps", Weight = 100 }
}
},
}
}
SpawnTemplatesDefs
sectionSpawnTemplatesDefs: A dictionary of reusable spawn templates that can be referenced in region entries. They are defined by their key (e.g., “DrunkKobold”): A unique identifier for the template. Inside, you can define atomic templates (single creatures) or composite templates (multiple creatures together).
Atomic templates:
{"fixed": N}
format.Composite templates:
{ "Template": "TemplateName" }
{ "TemplateID": "...", "Quantity": {...}, "Statuses": [...] }
Composite templates allow you to spawn multiple creatures together as a single encounter. For example:
"SCL_KoboldEncounter": {
"Members": [
{ "Template": "TwoNormalKobolds" },
{ "Template": "DrunkKobold" }
]
}
This will spawn 2 normal kobolds and 1 drunk kobold together as a single encounter, to be referenced by SCL_KoboldEncounter
.
Important notes about composite templates:
Regions
section{ "SpawnTemplate": "TemplateName", "Weight": N }
To add a new spawn type:
mfk_encounter_table.json
file in the ScriptExtender
folder.SpawnTemplatesDefs
section, then reference it in a region’s entries.You can also do this programmatically using the public API (see below).
The mod comes with default configurations for these regions:
WLD
: The main wilderness area (Act 1)WLD_Hag
: The Hag’s lair (Act 1)CRE
: The Crèche (Act 1.5)SCL
: Shadow-cursed lands (Act 2, Shadow-cursed lands, Nightsong, etc)BGO
: Baldur’s Gate areas (Act 3, Wyrms Crossing and city proper)You can add more regions as needed, using level names to work correctly. It will match partial names, so WLD
will match all Act 1, SCL
will match all shadow-cursed lands (All Act 2 areas), etc.
WLD_Hag
will match all Act 1 Hag levels, being used instead of WLD
entries; The closest/longest match will be used.
More Firewine Kobolds provides a (server-side) Lua API that other mods can use to add or modify spawn templates and region entries programmatically. This is useful if you want to add your custom creatures to the spawn tables without editing the JSON file directly, or if you want to add your own spawn templates and region entries.
Changes made via the API are persisted to disk automatically.
-- Register or overwrite a spawn template
-- Returns true on success, false on failure
Mods.MoreFirewineKobolds.API.RegisterSpawnTemplateDef(id, spawnTemplateTable)
-- Add (or overwrite if same SpawnTemplates present) an entry to a region
-- Returns true on success, false on failure
Mods.MoreFirewineKobolds.API.AddRegionEntry(regionId, entryTable)
-- Change weight for an existing region entry
-- Key can be either an index number or a SpawnTemplates ID
-- Returns true on success, false on failure
Mods.MoreFirewineKobolds.API.SetEntryWeight(regionId, key, newWeight)
-- Register a new spawn template for a stealth kobold
Mods.MoreFirewineKobolds.API.RegisterSpawnTemplateDef("StealthRangerKobold", {TemplateID = "1ad1fdb1-ea7f-492d-a72a-e282d9965b47",Quantity = { fixed = 1 },Statuses = { "INVISIBLE", "HASTE" }})
-- Add a new entry to a region using a spawn template
Mods.MoreFirewineKobolds.API.AddRegionEntry("WLD", {
SpawnTemplate = "StealthRangerKobold",
Weight = 25
})
-- Add an inline entry directly to a region
Mods.MoreFirewineKobolds.API.AddRegionEntry("SCL", {
TemplateID = "22fc3ef8-64f0-4298-a598-03fbc9dfb9aa",
Quantity = { fixed = 1 },
Statuses = { "WILD_MAGIC" },
Weight = 15
})
-- Change the weight of an existing entry
Mods.MoreFirewineKobolds.API.SetEntryWeight("WLD_Main_A", "DrunkKobold", 40)
There are two main approaches to integrating with More Firewine Kobolds:
Ext.Events.SessionLoaded:Subscribe(function()
-- Make sure MFK is loaded
if Mods.MoreFirewineKobolds and Mods.MoreFirewineKobolds.API then
-- Add your custom templates and entries here
Mods.MoreFirewineKobolds.API.RegisterSpawnTemplateDef("MyCustomKobold", { ... })
end
end)
Ext.Events.SessionLoaded:Subscribe(function()
-- Make sure MFK is loaded
if Mods.MoreFirewineKobolds and Mods.MoreFirewineKobolds.API then
local data = Ext.Json.Parse(Ext.IO.LoadFile("my_kobold_additions.json"))
-- Register spawn templates
for id, template in pairs(data.SpawnTemplate or {}) do
Mods.MoreFirewineKobolds.API.RegisterSpawnTemplateDef(id, template)
end
-- Add region entries
for regionId, region in pairs(data.Regions or {}) do
for _, entry in ipairs(region.Entries or {}) do
Mods.MoreFirewineKobolds.API.AddRegionEntry(regionId, entry)
end
end
end
end)
If your mod requires More Firewine Kobolds, add it as a dependency to minimize load order problems.
Here are some template IDs used in the default configuration:
45e31b7d-32ec-4f3d-8067-79061aeec77b
: Kobold1ad1fdb1-ea7f-492d-a72a-e282d9965b47
: Kobold Ranger22fc3ef8-64f0-4298-a598-03fbc9dfb9aa
: Kobold Inventordfdcfbaa-ed9b-48ba-8302-927c5f5af12d
: Kobold MeleeSome common status effects to apply:
DRUNK
: Makes the creature drunkWILD_MAGIC
: Causes wild magic effectsHASTE
: Increases speed and grants an extra actionPOISONED
: Applies poison conditionHere’s a list of levels that the game uses, which can be used as region IDs:
Level ID |
---|
BGO_Main_A |
BGO_WyrmsCrossing_C |
GLO_Cambion_B |
GUS_WorkAtmosphere_A |
SCL_Main_A |
TUT_Avernus_C |
WLD_CAMP_CineTriggers |
WLD_Campfire_E |
WLD_Chapel_H |
WLD_Chapel_Push |
WLD_CIN_Dreamscene_Daisy_A |
WLD_CIN_Dreamscene_Forest_A |
WLD_CIN_Dreamscene_Laezel_A |
WLD_CIN_Raft_A |
WLD_Crashsite_D |
WLD_DenSubs_B |
WLD_DruidSubs_B |
WLD_Forest_G |
WLD_GoblinCamp_D |
WLD_Hag_C_Evil |
WLD_Hag_C_Happy |
WLD_HagLair_D |
WLD_Main_A |
WLD_NautiloidCockpit_A |
WLD_OwlbearCave_B |
WLD_Plains_D |
WLD_Raft_A |
WLD_RangerCamp_I |
WLD_SharTemple_E |
WLD_Underdark_C |
WLD_UnderdarkShrine_A |
WLD_UnderdarkSubs_C |
WLD_UnderdarkSubs_SharVista_A |
WLD_UnderdarkTransitions_A |
WLD_UnderdarkTransitions_B |
WLD_UnderdarkTransitions_C |
Note that some of these are used in very specific locations, and may only be used in cut content. Use generic level names (e.g., WLD
for Act 1) if you want to apply your changes to broader regions.