Skip to content

Commit

Permalink
Better compatibility between Mod Options/Hidden Options and LeUI BG1E…
Browse files Browse the repository at this point in the history
…E/SoD
  • Loading branch information
r-e-d committed May 9, 2020
1 parent 80fadd9 commit 2b21f42
Show file tree
Hide file tree
Showing 14 changed files with 304 additions and 214 deletions.
2 changes: 1 addition & 1 deletion EEUITweaks/EEUITweaks.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ REQUIRE_PREDICATE (
) @27

ACTION_TRY
INCLUDE ~%PKGNAME%/include/ModOptionsSOD.tpa~
INCLUDE ~%PKGNAME%/include/ModOptions.tpa~
WITH
DEFAULT
LAM UIMenuAbort
Expand Down
Binary file added EEUITweaks/copy/ModsOptions/GUIMGX1.MOS
Binary file not shown.
Binary file added EEUITweaks/copy/ModsOptions/MOS5025.PVRZ
Binary file not shown.
4 changes: 2 additions & 2 deletions EEUITweaks/include/FaydarkAutoRoll.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ LOG @107001
SILENT
OUTER_SPRINT $UIMenuIF("MenuName") ~CHARGEN_ABILITIES~
OUTER_SET FadarkARUseLeUI = ((MOD_IS_INSTALLED ~EEUITweaks.tp2~ ~1090~) | (MOD_IS_INSTALLED ~EEUITweaks.tp2~ ~1091~))
OUTER_SET LeUIBGEE = (MOD_IS_INSTALLED ~LEUI-BG1EE.tp2~ ~0~)
OUTER_SET LeUISoD = (MOD_IS_INSTALLED ~LEUI-SoD.tp2~ ~0~)
OUTER_SET LeUIBGEE = (MOD_IS_INSTALLED ~LeUI-BG1EE.tp2~ ~0~)
OUTER_SET LeUISoD = (MOD_IS_INSTALLED ~LeUI-SoD.tp2~ ~0~)
ACTION_MATCH 1
WITH
(IsSoD | IsEETSoD | IsKRDS | IsKRDS0 | IsKRDS1 | IsKRDS2 | IsKRDS3 | IsKRDS4 | IsKRDS5) & (NOT(LeUIBGEE | LeUISoD))
Expand Down
67 changes: 66 additions & 1 deletion EEUITweaks/include/HiddenOptions.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,75 @@ BEGIN
COPY ~%PKGNAME%/copy/ModsOptions/backstab.SPL~ ~override~
END

OUTER_SET LeUIBGEE = (MOD_IS_INSTALLED ~LeUI-BG1EE.tp2~ ~0~)
OUTER_SET LeUISoD = (MOD_IS_INSTALLED ~LeUI-SoD.tp2~ ~0~)

// UI specific copy/patches
ACTION_MATCH 1
WITH
(%IsSoD% OR %IsBG2%) AND %LeUIBGEE%
BEGIN
LOG @17
SILENT
COPY ~%PKGNAME%/copy/ModsOptions/en_HideO.lua~ ~override~
COPY ~%PKGNAME%/copy/ModsOptions/M_HideO.lua~ ~override~
LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~MODOPEE.BAM~
pvrz_files = ~MOS5023.PVRZ~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
FAIL @44
END
LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~GUIMGX1.MOS~
pvrz_files = ~MOS5025.PVRZ~
resource_rename = ~GUIMGX.MOS~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
FAIL @44
END

// Append Hidden Game Options to UI.MENU
LOG @101002
SILENT
OUTER_SPRINT $UIMenuIF("Filespec") ~%PKGNAME%/menu/ModsOptions/modohidden4.menu~
LAUNCH_ACTION_MACRO UIMenuAppendFile
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
LAUNCH_ACTION_MACRO UIMenuClose
FAIL @101004
END
END

(%IsBGEE% OR %IsBG2%) AND %LeUISoD%
BEGIN
LOG @17
SILENT
COPY ~%PKGNAME%/copy/ModsOptions/en_HideO.lua~ ~override~
COPY ~%PKGNAME%/copy/ModsOptions/M_HideO.lua~ ~override~

// Append Hidden Game Options to UI.MENU
LOG @101002
SILENT
OUTER_SPRINT $UIMenuIF("Filespec") ~%PKGNAME%/menu/ModsOptions/modohidden6.menu~
LAUNCH_ACTION_MACRO UIMenuAppendFile
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
LAUNCH_ACTION_MACRO UIMenuClose
FAIL @101004
END
END

%IsBG2% %IsLeUIBG2%
BEGIN
// Copy override files
Expand Down Expand Up @@ -627,7 +693,6 @@ WITH

DEFAULT // Nothing left except Fail
FAIL @33

END

// All done - close up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1605,17 +1605,20 @@ BEGIN
FAIL @44
END

LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~GUIERR8.MOS~
pvrz_files = ~MOS5019.PVRZ~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
FAIL @44
ACTION_IF IsLeUISOD
BEGIN
LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~GUIERR8.MOS~
pvrz_files = ~MOS5019.PVRZ~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
FAIL @44
END
END

// Patch START_OPTIONS menu
Expand Down Expand Up @@ -1713,17 +1716,20 @@ BEGIN
FAIL @44
END

LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~GUIERR8.MOS~
pvrz_files = ~MOS5019.PVRZ~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
ACTION_IF IsLeUIBG1
BEGIN
FAIL @44
LAF EEUITweaks.CopyPVRZResource
STR_VAR
source_folder = EVAL ~%PKGNAME%/copy/ModsOptions~
resource_file = ~GUIERR8.MOS~
pvrz_files = ~MOS5019.PVRZ~
RET
$UIMenuIF("Succeeded") = succeeded
END
ACTION_IF NOT $UIMenuIF("Succeeded") THEN
BEGIN
FAIL @44
END
END

// Patch START_OPTIONS menu
Expand Down Expand Up @@ -2631,9 +2637,12 @@ COPY ~%PKGNAME%/copy/ModsOptions/M__.lua~ ~override~
COPY ~%PKGNAME%/copy/ModsOptions/M_ModsOp.lua~ ~override~
COPY ~%PKGNAME%/copy/ModsOptions/en_ModOp.lua~ ~override~

OUTER_SET LeUIBGEE = (MOD_IS_INSTALLED ~LeUI-BG1EE.tp2~ ~0~)
OUTER_SET LeUISoD = (MOD_IS_INSTALLED ~LeUI-SoD.tp2~ ~0~)

ACTION_MATCH 1
WITH
%IsSoD% %IsEETSoD% %IsKRDS1% %IsKRDS2% %IsKRDS3% %IsKRDS4% %IsKRDS5% WHEN NOT(%IsKRDS0%)
%IsEETSoD% %IsKRDS1% %IsKRDS2% %IsKRDS3% %IsKRDS4% %IsKRDS5% WHEN NOT(%IsKRDS0%)
BEGIN
LAUNCH_ACTION_MACRO ModOptions.SoDSpecific
END
Expand All @@ -2655,12 +2664,35 @@ WITH

%IsBGEE%
BEGIN
LAUNCH_ACTION_MACRO ModOptions.BGEESpecific
ACTION_IF (LeUIBGEE | LeUISoD) THEN
BEGIN
LAUNCH_ACTION_MACRO ModOptions.LeUIBG1Specific
END ELSE
BEGIN
LAUNCH_ACTION_MACRO ModOptions.BGEESpecific
END
END

%IsSoD%
BEGIN
ACTION_IF (LeUIBGEE | LeUISoD) THEN
BEGIN
LAUNCH_ACTION_MACRO ModOptions.LeUISODSpecific
END ELSE
BEGIN
LAUNCH_ACTION_MACRO ModOptions.SoDSpecific
END
END

%IsBG2%
BEGIN
LAUNCH_ACTION_MACRO ModOptions.BG2TOBSpecific
ACTION_IF (LeUIBGEE | LeUISoD) THEN
BEGIN
LAUNCH_ACTION_MACRO ModOptions.LeUIBG2Specific
END ELSE
BEGIN
LAUNCH_ACTION_MACRO ModOptions.BG2TOBSpecific
END
END

%IsEETBG2%
Expand Down
2 changes: 1 addition & 1 deletion EEUITweaks/lib/UIMenuPlatform.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ BEGIN
LOG ~IsLeUISOD~
END ELSE
BEGIN
ACTION_IF FILE_EXISTS ~override/ULGOTHST.MOS~ THEN
ACTION_IF FILE_EXISTS ~override/GUICHFAT.BAM~ THEN
BEGIN
OUTER_SET IsBG2onSoD = 1
LOG ~IsBG2onSoD~
Expand Down
9 changes: 0 additions & 9 deletions EEUITweaks/lua/ModsOptions/uimenutop1.lua

This file was deleted.

Loading

0 comments on commit 2b21f42

Please sign in to comment.