PDA

View Full Version : Extension dependencies



Ikael
February 9th, 2011, 12:24
I am facing difficulties in getting extension dependencies to work. I have created two extension, first one is the for RPG rules and second is for RPG setting. Setting extension is dependent on rules but I haven't managed making this extension dependencies work. They do display in the extension list but there is this red mark (denied) over the setting extension, which I believe means that dependencies are not met. Below are the <property> tags of both extensions. I wonder what's wrong in them.


Rules extension
...
<properties>
<name>rules Cinematic Unisystem</name>
<version>2</version>
<author>Eden Studios / Heikkinen</author>
<description>Cinematic Unisystem rules for Unicore ruleset</description>
<ruleset>
<name>Unicore_dev</name>
</ruleset>
<ruleset>
<name>Unicore</name>
</ruleset>
<exclusiongroup>Rules</exclusiongroup>
</properties>
...


Setting extension. This extension is dependednt to the rules extension.
...
<properties>
<name>setting Ghost of Albion</name>
<version>2</version>
<author>Eden Studios / Heikkinen</author>
<description>Ghost of Albion setting for Unicore ruleset</description>
<ruleset>
<name>Unicore_dev</name>
</ruleset>
<ruleset>
<name>Unicore</name>
</ruleset>
<exclusiongroup>Setting</exclusiongroup>
<dependency>
<name>rules Cinematic Unisystem</name>
</dependency>
</properties>
...

Ikael
February 9th, 2011, 17:52
I am starting to doubt very much that this issue is because FG does the extension dependency check wrong in launcher code. If I create brand new campaign these extension dependencies are displayed as "Broken" (red cross on them) and they cannot be selected anyhow. Not even if the master extension (to which this another extension is depended on) is enabled.

To have any progress I must hack the campaign data manually by adding this dependent extension to extensionstate.xml file. After that if I reopen FG I don't see the broken icon anymore, only faded checkicon if I have selected the dependent extension without enabling the master extension. However if I enable the master extension the faded checkicon changes to normal one.

When taking even more closer look at this issue it, I found the following from launcher.pak:

desktep_templates.xml lines 461-470


...
if rulesetok and dependenciesok then
local w = createWindow();
w.name.setValue(k);
w.name.setup();
elseif rulesetok then
local w = createWindow();
w.name.setValue(k);
w.name.setup();
w.checked.setState("extension_broken");
end
...


here the extension is marked as broken is dependences are not met. However, after that the broken state is never references in the launcher_campaignextensionentry windowclass's line 331-347 (onClickDown function) so its state can never change if it has anytime gone to that.

could someone on FG Staff side take alook on this? It's a blocker on my side as I want to avoid hacked all my campaign files's extensionstate.xmls

Ikael
February 9th, 2011, 18:00
I did a quicktest and commented out the line 469 on launcher.pak desktop_templates.xml file and it made the extension dependency work again. Still I don't know if there is more magic about removing this "broken state" from the launcher, but I know that that broken state is not referenced anywhere else in the launcher code

Ikael
February 19th, 2011, 14:04
Is this bug going to be addressed? This temporary fix will fail on every FG update as the lancher's pak is downloaded again.

Moon Wizard
February 20th, 2011, 01:27
Contacted you via forum mail to get more information.

Regards,
JPG

Ikael
February 20th, 2011, 02:46
I attached two very simply extension that have dependencies: Ext2 is dependent to Ext1. However when creating new campaign I can't select Ext2 anyhow because it's seen as broken extension.

Moon Wizard
February 21st, 2011, 02:30
OK, I found it. BTW, thanks for the nice simple examples.

The actual lines at issue are higher up in the code:



if (dv.minversion == 0 or reqext.version &gt;= dv.minversion) and
(dv.maxrelease == 0 or reqext.version &lt;= dv.minversion) then
else
failed = true;
end


Replace with these lines:



if (dv.minversion == 0 or reqext.version &gt;= dv.minversion) and
(dv.maxversion == 0 or reqext.version &lt;= dv.maxversion) then
else
failed = true;
end


I'll add to v2.7.5 patch list over the next couple days.

Thanks,
JPG