diff --git a/game/engines/default/engine/Birther.lua b/game/engines/default/engine/Birther.lua index f9a140286b003c5c75a517d08de599dba3e71b68..35a87b6ca065f0b5d1bda9edde4878993e32d0ca 100644 --- a/game/engines/default/engine/Birther.lua +++ b/game/engines/default/engine/Birther.lua @@ -356,7 +356,7 @@ end --- Tries to apply all birth options to the actor. Should only be called once, at the end of creation -- -function _M:apply() +function _M:apply(self_contained) self.actor.descriptor = {} local stats, inc_stats = {}, {} for i, d in ipairs(self.descriptors) do @@ -421,7 +421,7 @@ function _M:apply() self.actor.body = d.body self.actor:initBody() end - if self.applyingDescriptor then self:applyingDescriptor(i, d) end + if self.applyingDescriptor then self:applyingDescriptor(i, d, self_contained) end end -- Apply stats now to not be overridden by other things diff --git a/game/modules/tome/data/quests/love-melinda.lua b/game/modules/tome/data/quests/love-melinda.lua index b4630137af86d36b6b649c09e4e48f6ea11ba00a..5cfd6940665a9f25ed3d6e772f15e0899945c4c1 100644 --- a/game/modules/tome/data/quests/love-melinda.lua +++ b/game/modules/tome/data/quests/love-melinda.lua @@ -102,7 +102,7 @@ function melindaCompanion(self, who, c, sc) birth:setDescriptor("class", c) birth:setDescriptor("subclass", sc) birth.actor = melinda - birth:apply() + birth:apply(true) melinda.image = "player/cornac_female_redhair.png" melinda.moddable_tile_base = "base_redhead_01.png" melinda.moddable_tile_ornament = {female="braid_redhead_01"} diff --git a/game/modules/tome/dialogs/Birther.lua b/game/modules/tome/dialogs/Birther.lua index f3929194b9d36515fbd2b1524f0e75294506a9bd..efcd531e1dd46db7beefc44a5e3b633df94bc73c 100644 --- a/game/modules/tome/dialogs/Birther.lua +++ b/game/modules/tome/dialogs/Birther.lua @@ -252,7 +252,7 @@ function _M:checkNew(fct) end end -function _M:applyingDescriptor(i, d) +function _M:applyingDescriptor(i, d, self_contained) if d.unlockable_talents_types then for t, v in pairs(d.unlockable_talents_types) do if profile.mod.allow_build[v[3]] then @@ -267,17 +267,19 @@ function _M:applyingDescriptor(i, d) end end end - if d.party_copy then - local copy = table.clone(d.party_copy, true) - -- Append array part - while #copy > 0 do - local f = table.remove(copy) - table.insert(game.party, f) + if not self_contained then + if d.party_copy then + local copy = table.clone(d.party_copy, true) + -- Append array part + while #copy > 0 do + local f = table.remove(copy) + table.insert(game.party, f) + end + -- Copy normal data + table.merge(game.party, copy, true) end - -- Copy normal data - table.merge(game.party, copy, true) + self:applyGameState(d) end - self:applyGameState(d) end function _M:applyGameState(d)