0ad/binaries/data/mods/mod/gui/modmod/modmod.xml
Angen f1acd22455 Do not allow to start pyrogenesis with incompatible mods
Fixing following problems:
Issue number one:
Enable mod with a23 compatibility in a23b.
Save configuration.
Start a24.
Better result:
Mod will be enabled and invisible in mod selection screen producing
various errors.
Worse result:
Game will crash and refuse to start.

Issue number two:
Mods can silently set loaded mods without restarting the engine, so mods
can unlist themselves from compatibility detection.

Solution:
Enable necessary mods instead if running with gui and open mod page.
Open information window on top of mod page to infom why mod page is
showing up.
On mod page show mods which failed in compatibility check and color the
resposnible ones.
Disable start button without enabled mods.
Show non existed mods if they failed in compatibility check.

Else just log to mainlog and close.

Another fixes:
Display in enabled mods really enabled mods as current logic confuses
players about which mods they have enabled and is not helpful (ref
#4881)

Note:
this will not solve issue with mods claiming being compatible with
engine version while in fact being incompatible.

Comments by: @vladislavbelov, @Stan, @Imarok
Tested by: @wraitii
Differential revision: D3592
Fixes: #6044 #4881

This was SVN commit r25410.
2021-05-09 13:53:25 +00:00

225 lines
8.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/modmod/"/>
<object type="image" style="ModernWindow">
<!-- Page Title -->
<object style="ModernLabelText" type="text" size="50%-128 4 50%+128 36">
<translatableAttribute id="caption">Modifications</translatableAttribute>
</object>
<!-- Filter Panel -->
<object size="0 40 312 64">
<object name="modGenericFilter"
type="input"
style="ModernInput"
size="16 0 176 100%"
>
<action on="Press">displayModLists();</action>
<action on="TextEdit">displayModLists();</action>
<translatableAttribute id="placeholder_text">Filter</translatableAttribute>
</object>
<!-- Checkboxes -->
<object name="negateFilter"
type="checkbox"
checked="false"
style="ModernTickBox"
size="186 0 206 100%"
>
<action on="Press">displayModLists();</action>
</object>
<object type="text" size="208 0 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Negate</translatableAttribute>
</object>
</object>
<object size = "100%-200 40 100%-20 64">
<object name="modCompatibleFilter"
type="checkbox"
checked="false"
style="ModernTickBox"
size="16 0 36 100%"
>
<action on="Press">displayModLists();</action>
</object>
<object type="text" size="40 0 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Filter compatible</translatableAttribute>
</object>
</object>
<object
name="globalModDescription"
type="text"
size="312 32 100%-16 69"
textcolor="180 180 180"
text_align="left"
text_valign="center"
>
<translatableAttribute id="caption">Description</translatableAttribute>
</object>
<!-- Available Mods Wrapper -->
<object size="16 66 100%-15 62%">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
</object>
<object name="modsDisabledList"
type="olist"
style="ModernSortedList"
sortable="true"
selected_column="name"
selected_column_order="1"
size="0 25 100%-2 100%"
font="sans-stroke-13"
auto_scroll="true"
>
<action on="SelectionChange">selectedMod(this.name);</action>
<action on="SelectionColumnChange">displayModLists();</action>
<action on="MouseLeftDoubleClickItem">enableMod();</action>
<!-- List headers -->
<!-- Keep the column names in sync with the property names of mods -->
<column id="name" color="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="folder" color="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="label" color="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="url" color="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
</object>
<!-- Enabled Mods Wrapper -->
<object size="16 62% 100%-15 100%-84">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Enabled Mods</translatableAttribute>
</object>
<object name="modsEnabledList"
style="ModernSortedList"
type="olist"
size="0 25 100%-32-2-2 100%"
font="sans-stroke-13"
tooltip_style="pgToolTip"
auto_scroll="true"
>
<action on="SelectionChange">selectedMod(this.name);</action>
<action on="MouseLeftDoubleClickItem">disableMod();</action>
<!-- List headers -->
<column id="name" color="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="folder" color="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="label" color="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="url" color="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
<object
name="enabledModUp"
type="button"
style="ModernButtonRed"
size="100%-32-2 23+4 100%-2 23+32+4"
enabled="false"
sprite="ModernArrowUpRed"
sprite_pressed="ModernArrowUpRed"
sprite_over="ModernArrowUpRedBright"
sprite_disabled="ModernArrowUpGrey"
>
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
<action on="Press">moveCurrItem("modsEnabledList", true);</action>
</object>
<object
name="enabledModDown"
type="button"
style="ModernButtonRed"
size="100%-32-2 100%-32-4 100%-2 100%-4"
enabled="false"
sprite="ModernArrowDownRed"
sprite_pressed="ModernArrowDownRed"
sprite_over="ModernArrowDownRedBright"
sprite_disabled="ModernArrowDownGrey"
>
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
<action on="Press">moveCurrItem("modsEnabledList", false);</action>
</object>
</object>
<!-- MOD-SPECIFIC BUTTONS -->
<object name="toggleModButton" type="button" style="ModernButtonRed" size="16 100%-80 196 100%-52" enabled="false"/>
<object name="visitWebButton" type="button" style="ModernButtonRed" size="200 100%-80 380 100%-52" enabled="false">
<translatableAttribute id="caption">Visit Website</translatableAttribute>
<action on="Press">visitModWebsite();</action>
</object>
<!-- Message -->
<object name="message" type="text" size="466 100%-78 100%-15 100%-52" text_align="left" textcolor="white"/>
<!-- BUTTONS -->
<object name="quitButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16">
<translatableAttribute id="caption">Quit</translatableAttribute>
<action on="Press">Engine.Exit();</action>
</object>
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-748 100%-44 100%-568 100%-16">
<translatableAttribute id="caption">Help</translatableAttribute>
<action on="Press">Engine.PushGuiPage("page_modhelp.xml");</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-564 100%-44 100%-384 100%-16">
<translatableAttribute id="caption">Download Mods</translatableAttribute>
<action on="Press">downloadModsButton();</action>
</object>
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-380 100%-44 100%-200 100%-16">
<translatableAttribute id="caption">Save Configuration</translatableAttribute>
<action on="Press">saveMods();</action>
</object>
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start Mods</translatableAttribute>
<action on="Press">startMods();</action>
</object>
<object name="startButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start</translatableAttribute>
<action on="Press">startMods();</action>
</object>
</object>
</objects>