PAYDAY-2-BeardLib icon indicating copy to clipboard operation
PAYDAY-2-BeardLib copied to clipboard

Modules module doesnt function (when using XML Module)

Open RexTheWho opened this issue 2 years ago • 4 comments

Describe the bug Modules module doesnt work at all in the main.xml, copying the custom module to beardlib addons makes it functional.

To Reproduce Steps to reproduce the behavior:

<Modules directory="modules">
	<module file="SpecialEquipmentsModule.lua" name="SpecialEquipmentsModule" type_name="SpecialEquipments"/>
</Modules>
SpecialEquipmentsModule = SpecialEquipmentsModule or BeardLib:ModuleClass("SpecialEquipments", ModuleBase)
-- Adds an equipments to tweak_data.equipments.specials

function SpecialEquipmentsModule:init(...)
    self.required_params = table.add(clone(self.required_params), {"id"})
	return SpecialEquipmentsModule.super.init(self, ...)
end

function SpecialEquipmentsModule:Load()
    if not self._config.id then
        self:Err("Equipments does not contain a definition for id!")
        return
    end
    TweakDataHelper:ModifyTweak(table.merge({custom = true}, self._config), "equipments", "specials", self._config.id)
end

RexTheWho avatar Mar 26 '22 06:03 RexTheWho

It's possible your mod needs a high priority

Luffyyy avatar Mar 26 '22 06:03 Luffyyy

It's possible your mod needs a high priority

Changing priority doesnt seem to fix the issue.

RexTheWho avatar Mar 26 '22 11:03 RexTheWho

Issue discovered, but not completely resolved. Modules is non-functional in the XML module.

Test project for any future attempts at fixing this issue.

ModulesTestProject.zip

RexTheWho avatar Mar 26 '22 13:03 RexTheWho

Is this still relevant?

segabl avatar May 10 '23 13:05 segabl