PDA

View Full Version : Issue with single word module name



Mephisto
February 8th, 2022, 08:59
Hi there,
I encountered a strange behavior when I tried to load a module automatically via the campaign setup. FGU reported the module as “Not installed”. Looking onto the code this was triggered as the record “info” always came up empty. Strangely the problem vanished once I renamed the module file name from “Chronicle” to “Chronicle Ruleset Data”. All modules I tested which consisted of more than one word seem to work fine. It might be a bug if the modules name only consists of one word only.

Moon Wizard
February 8th, 2022, 14:51
You have to make sure that you are loading the value from the module "name" tag (which is the internal key used to reference the module data for links and activate/deactivate), not the module "displayname" tag.

Regards,
JPG

Mephisto
February 8th, 2022, 15:32
I did. :-)

This works, if filename is "Chronicle Ruleset Data.mod":


_tDataModuleSets =
{
["host"] =
{
{
name = "Chronicle Ruleset Data",
modules =
{
{ name = "Chronicle Ruleset Data", displayname = "Chronicle Ruleset Data" },
},
},
},
};


This doesn't, if filename is "Chronicle.mod":


_tDataModuleSets =
{
["host"] =
{
{
name = "Chronicle",
modules =
{
{ name = "Chronicle", displayname = "Chronicle" },
},
},
},
};


The mod file itself is identical, I just changed the file name.

Trenloe
February 8th, 2022, 15:52
Look in the module definition.xml file - the <name> tag Moon Wizard is referring to is in that file - in the module, not the desktop LUA or the .mod filename.

Mephisto
February 8th, 2022, 16:03
Ah, thanks! I see. That's probably it.