[MOD] Infinity UI++ v1.19
 Pecca                
                
                    Member Posts: 2,272
Pecca                
                
                    Member Posts: 2,272                
            
This mod completely overhauls original UI with high definition assets, featuring 4 skins. It has originated from my older mod Dragonspear UI++, but eventually, it grew out of scope and became a new mod.
Summary of the content:
General:
-Compatibility:
----BG:EE, BG2:EE, IWD:EE, EET
-Skins:
----Dragonspear
----IWD:EE
----BG Stone
----BG2 Roots
-Default ratio:
----Game windows are extended to 16:9
-Graphical resources
----UI created and rendered in HD
-EEex features:
----UI zoom
----Extended spell menu compatibility
----NPC bar, PC effects
Gameplay screen:
-Layout:
----overhauled basic layout
----modern layout (PoE-like, can be set in UI++ settings)
-Message box:
----standard bottom centered
----unlocked (freely movable, resizable, can be set in UI++ settings)
-Overhauled dialog box (classic with scroll-up to see history, quick load, add notes)
-Extended quickloot (position of this bar and number of rows can be set in UI++ settings)
-Quickloot junk filter (small button next to the quickloot bar, hides cheap non-magical items) - not tested properly
-Hotkey buttons (freely movable, assignable to a character, must be allowed in UI++ settings)
-Large portraits (for higher resolutions, can be set in UI++ settings)
Journal:
-Layout:
----large layout (hard paused)
----overhauled small layout (freely movable, resizable height)
-New tabs:
----current and finished quest splitted, standard journal
----bestiary (designed from user notes, keeps track of killed monsters, gradually revealing stats)
----library (designed from user notes, keeps track of history books when opened in inventory)
Inventory:
-Layout:
----all party inventory (either shift character on hovering their inventory or if option "Lock character" is allowed in UI++ settings, character is changed only by clicking on their portraits, but entire party inventory is available for selected character. Due to engine limitations, character portrait is displayed instead of sprite, but it can still be temporarily viewed when clicked on that portrait. Also for default BG/BG2 NPCs portraits, there is an option to switch to full-body portrait by clicking on the button that replaced one of color-menu buttons at the bottom)
----overhauled single character inventory with item name (switching between single/party modes by button at the top right of the screen, next to the sleep button)
-Overhauled item comparison (new item statistics are shown)
-Overhauled item description (not modal)
-Overhauled quantity popup
Record screen:
-Overhauled layout
-Overhauled experience bars
-Overhauled next level screen and other child screens
-NPCs are alowed to change appearance
Mage, Priest screen:
-Overhauled layout
-Known spells in 3 columns in one scrollable list
-Memorized spells of all levels in one scrollable list, expandable rows
-Overhauled spell description (not modal)
-Overhauled mage contingency screen
Options screen:
-Overhauled layout
-All sections on parent screen, no sub-sections
-New section UI++ settings with settings related to this mod
Map screen:
-Overhauled layout
-Extended space of world map
Store screen:
-Overhauled layout
-two modes for buy/sell window - rows and tiles (switched by button at the top of the screen)
-automatically sell entire stack
Multiplayer screen:
-Overhauled layout
Start screen:
-Overhauled layout (SoD-like)
-New background art drawn by @Seldar
Multiplayer connection screen:
-Overhauled layout
Save/Load game screen:
-saves displayed by rows or tiles
-Filter by character list
-Sorting by time/name
New game screen:
-Overhauled layout
-Improved portrait picker
-Improved Race & Class screen
-Auto-roller option
-Overhaul skills and spells screens
-in IWD:EE, default IWD and (IWD2 thanks to @ineth ) character portraits are used as a background
Chapter screen:
-Overhauled layout
Pop-up windows:
-Overhauled layout
Cheat menu:
-Overhauled layout
-added list of spells
-compatibility with Reveal Hidden Gameplay Options Mod improved cheat menu
Compatible (and recommended) UI mods:
- Bubb's Spell Menu
- Reveal Hidden Gameplay Options
- Remastered Spell Icons
Installation:
Download the mod from GitHub and extract the zip file in the game's core folder (the one with a file "chitin.key" in it) and run "setup-infinity_ui++.exe".
If you purchased your BG:EE game from Steam or GoG and you have a SoD expansion installed as well, you need to first install DLC Merger before installing any mod.
Known issues:
- UI-related components of SCS are not compatible yet.
- NPC bar, PC effects are not working properly
Screenshots:

























Post edited by Pecca on 
0        
             
                                
Comments
Thank you, but it's still just very beta.
Thanks.
The idea of hotkey buttons is very old, it predates even your spell menu, as I was trying to solve the same problem at that time. Extended spell menu solves the problem way more efficiently so I decided to implement it mostly for its multi-character selection functionality.
Hi, you must have hotkeys of spells or abilities assigned. Then they will appear in the menu bar.
Modern HUD requires you play with unscaled interface or zoomed out a bit with EEex zoom feature.
Thankee for releasing the beta of this as you did! Alleluia!
We eagerly await full functionality, regardless of how many skins are included!
One thing I couldn't find is, large character portraits option in ui settings. In dragonspear ui++ we had that option, and it looks much better for solo players like me. Will it be possible to include this in the future?
Thanks
I'm not planning any new features at the moment, only what is described in the OP. DUI's large portrait was a partial solution to the lack of zooming capability, that now presents EEex zooming feature.
Some color scheme feedback, If I may, even though it's based on personal taste rather than ideas for improvement. The ruby red is a very pleasant color but it seems to me a bit too saturated, to the point of distraction.
Compared to a bit more desaturated red:
The difference isn't big but the red bits are less emphasised, which gives the UI a more "whole" look. On the last screenshot the red bottom row seems maybe a bit too saturated as well, for a near permanent on-screen element of the UI. Then again, it's just a personal preference, high contrast isn't bad in itself, makes things pop out more, the UI feels more dynamic/elaborate.
1) Some elements are still not reskined:
2) I got those names in down-left corner:
3) Books and bestiary tabs in journal have strange names:
4) I don't know why, but my dialogue box moved up after conversation:
5) When i want to buy something i automatically buy all available items. I have to click again to pick only 1.
6) I got 2 ctd. First time when i wanted to pick voice line during creation of my character and second time when Imoen joined me. She got 32 000 exp and after leveling her i got ctd.
That was very fast, 10 minutes play. Maybe i will find more later.
I'm unable to get SCS Initialize AI to install due to conflicts with the UI.menu and yloc.
//Including and running function(s) difficulty_controls
//Copying and patching 1 file ...
//Copying and patching 1 file ...
//ERROR: cannot convert feedback_yloc or %feedback_yloc% to an integer
//ERROR: [ui.menu] -> [override/ui.menu] Patching Failed (COPY) (Not_found)
I installed with the same order just 2 days with DragonspearUI++, so I'm pretty sure any incompatibilities are with this brand new mod.
I know this is beta, but I wanted to help, so I didn't get rid of my old copy of my modded run.
I can get whatever logs needed.
I've been trying for a good hour to modify the SSC file to correct this error, because the component that is blocking is essential for the rest (the SSC AI). But I'm a bit new to the language so it's difficult.
EDIT: I managed to modify the concerned file enough for the error to disappear, but I still have about 100 components to install so I can't yet check if my correction will create bugs or not
I think it is not possible to select has in eet. I've noticed it in the middle of a big install so it could be another mod interfering and I've not had the chance to test with just eet installed however I think the code below means the abilities button to select hlas on level up only appears on bg2, whereas eet would need game engine ==4. Am I correct and can I rectify this?
enabled "chargen.levelingUp and rgGetGameEngine() == 2"
area 524 661 320 70
bam rgdmbut1
ScaleToClip
text "HIGH_LEVEL_ABILITIES_BUTTON"
text style "button"
toggle "levelUpInfoToggle"
clickable lua "createCharScreen:IsHighLevelAbilitiesButtonClickable()"
action
"
createCharScreen:OnHighLevelAbilitiesButtonClick()
Crash to desktop.
Any mod that patches ui.menu will likely not work until authors make changes to make it compatible. Ui.menu from this mod is completely different from vanilla.
Correct, will fix this.
This can actually be bypassed by setting Force_difficulty_widget to 1 in the scs ini, which will prevent the initialise trying to patch the UI and instead you would access changing the difficulties via an innate ability. I've not yet tested this as I've not reached that part of the install but this should stop it interacting with the UI at all.
- the message box moves up after conversations or loading a save.
- I get a Crash To Desktop (ctd) when selecting a voice set at chr creation and pressing the Play button. If I only select a voice set the game doesn't crash, but my selection doesn't get remembered either.
In addition I noticed the following:
- the world map is not centered, and I have to double-click on locations to travel there. Single-clicking seems to "select" the location, highlighting it.
- store windows are a bit messed up. The 3 buttons on the left are stretched, and there seem to be some elements on the top right that are not showing properly.
To be done before the installation.
To keep it simple, I replaced OPTIONS_GAMEPLAY with RG_OPTIONS_BAR
DEFINE_ACTION_FUNCTION difficulty_controls BEGIN OUTER_SPRINT component_loc lib // check if we're using the widget ACTION_IF enhanced_edition BEGIN OUTER_SET ui_integration=1 LAF check_ini STR_VAR ini=Force_Difficulty_Widget RET value END ACTION_IF value BEGIN OUTER_SET ui_integration=0 END END ELSE BEGIN OUTER_SET ui_integration=0 END // if not, try fixing the interface ACTION_IF ui_integration BEGIN LAF difficulty_ui RET abort END ACTION_IF abort BEGIN OUTER_SET ui_integration=0 END END // define commonly-held strings ACTION_DEFINE_ASSOCIATIVE_ARRAY "diff_report_strings" BEGIN 0 => 1010 1 => 1011 2 => 1012 3 => 1013 4 => 1014 5 => 1015 6 => 1016 7 => 1017 END ACTION_DEFINE_ASSOCIATIVE_ARRAY "diff_choice_strings" BEGIN 0 => 1020 1 => 1021 2 => 1022 3 => 1023 4 => 1024 5 => 1025 6 => 1026 7 => 1027 END ACTION_DEFINE_ASSOCIATIVE_ARRAY "diff_response_strings" BEGIN 0 => 1050 1 => 1051 2 => 1052 3 => 1053 4 => 1054 5 => 1055 6 => 1056 7 => 1057 END ACTION_IF GAME_IS iwdee BEGIN OUTER_SET $diff_report_string(7) = 1028 OUTER_SET $diff_choice_strings(7) = 1029 OUTER_SET $diff_response_strings(8) = 1058 END // build beginning section <<<<<<<< .../stratagems-inline/difficulty_dialog.d BEGIN ~dw#diffi~ IF ~True()~ THEN BEGIN initial SAY @1030 >>>>>>>> COPY ".../stratagems-inline/difficulty_dialog.d" "%workspace%" // add the blocks corresponding to initial choices LAF process_table STR_VAR table=difficulty_controls.2da function=difficulty_helper_initial END // finish the block, add exit block and acknowledgement blocks <<<<<<<< .../stratagems-inline/difficulty_dialog_integration.txt IF ~~ THEN REPLY @1031 GOTO exit END IF ~~ THEN BEGIN exit SAY @1032 IF ~~ THEN DO ~DestroySelf()~ EXIT END >>>>>>>> <<<<<<<< .../stratagems-inline/difficulty_dialog_no_integration.txt IF ~Global("DW_difficulty_control_inactive","GLOBAL",0)~ THEN REPLY @1033 DO ~SetGlobal("DW_difficulty_control_inactive","GLOBAL",1)~ GOTO control_off IF ~Global("DW_difficulty_control_inactive","GLOBAL",1)~ THEN REPLY @1034 DO ~SetGlobal("DW_difficulty_control_inactive","GLOBAL",0)~ GOTO control_on IF ~~ THEN REPLY @1031 GOTO exit END IF ~~ THEN BEGIN control_off SAY @1035 IF ~~ THEN GOTO initial END IF ~~ THEN BEGIN control_on SAY @1036 IF ~~ THEN GOTO initial END IF ~~ THEN BEGIN exit SAY @1032 IF ~Global("DW_difficulty_control_inactive","GLOBAL",0)~ THEN DO ~ApplySpellRES("dw#diff2",Player1)DestroySelf()~ EXIT IF ~Global("DW_difficulty_control_inactive","GLOBAL",1)~ THEN DO ~DestroySelf()~ EXIT END >>>>>>>> <<<<<<<< .../stratagems-inline/difficulty_acknowledge.txt IF ~~ THEN BEGIN acknowledge_%var% SAY (AT %string%) IF ~~ THEN GOTO initial END >>>>>>>> COPY "%workspace%/difficulty_dialog.d" "%workspace%" PATCH_IF ui_integration BEGIN APPEND_FILE TEXT ".../stratagems-inline/difficulty_dialog_integration.txt" END ELSE BEGIN APPEND_FILE TEXT ".../stratagems-inline/difficulty_dialog_no_integration.txt" END FOR (var=0;var<=7;var+=1) BEGIN SET string=$diff_response_strings("%var%") APPEND_FILE_EVALUATE TEXT ".../stratagems-inline/difficulty_acknowledge.txt" END // add the main blocks LAF process_table STR_VAR table=difficulty_controls.2da function=difficulty_helper_main END /// compile the dialog file COMPILE "%workspace%/difficulty_dialog.d" EVALUATE_BUFFER // make the accompanying bits LAF install STR_VAR file="dw#diffi.cre" location=resource END // basically a tweaked copy of cutspy LAF check_ini STR_VAR ini=difficulty_icon RET value END ACTION_IF FILE_EXISTS "%MOD_FOLDER%/lib/diff_icons/%value%.bam" BEGIN COPY "%MOD_FOLDER%/lib/diff_icons/%value%.bam" "override/dw#diffi.bam" END ELSE BEGIN COPY "%MOD_FOLDER%/lib/diff_icons/v6.bam" "override/dw#diffi.bam" // default END <<<<<<<< .../stratagems-inline/dw#diffi.baf IF NumberOfTimesTalkedTo(0) Detect([PC]) THEN RESPONSE #100 StartDialogueNoSet(LastSeenBy(Myself)) END >>>>>>>> COMPILE ".../stratagems-inline/dw#diffi.baf" MAKE_PATCH say_name=>1018 add_basic_ability=>null patch_ability_inline=>~ability_icon=>dw#diffi ability_target=>5 ability_icon_loc=>4~ spell_type=>innate add_effect_inline=>"opcode=>67 target=>1 duration=>60 resource=>dw#diffi" add_effect_inline'=>"opcode=>172 target=>1 timing=>1 resource=>dw#diff1" END LAF make_spell STR_VAR spell=dw#diff1 edits=patch_data END MAKE_PATCH add_basic_ability=>null add_effect_inline=>"opcode=>171 target=>2 timing=>1 resource=>dw#diff1" END LAF make_spell STR_VAR spell=dw#diff2 edits=patch_data END // install it in starting areas if we don't have integration ACTION_IF !ui_integration BEGIN <<<<<<<< .../stratagems-inline/diff_install.baf IF !Global("DW_initialise_difficulty_widget","GLOBAL",1) THEN RESPONSE #100 SetGlobal("DW_initialise_difficulty_widget","GLOBAL",1) ApplySpellRES("dw#diff2",Player1) Continue() END >>>>>>>> ACTION_IF is_bg2 BEGIN LAF extend_area_script STR_VAR area="ar3000 ar4000 ar0602" top=diff_install inline=yes END END ACTION_IF is_bg1 BEGIN LAF extend_area_script STR_VAR area="%Candlekeep%" top=diff_install inline=yes END END ACTION_IF is_iwd BEGIN LAF extend_area_script STR_VAR area="ar1006 ar9100" top=diff_install inline=yes END END END // sort out the difficulty UI strings // the ones in dialog.tlk (I'm not sure if this is relevant for EE but no harm in doing it) ACTION_IF GAME_IS bgee BEGIN MAKE_PATCH help=>24424 easiest=>24417 easy=>24418 normal=>24419 hard=>11312 insane=>24420 END END ELSE BEGIN // everything else uses the same strings MAKE_PATCH help=>18020 easiest=>11308 easy=>11309 normal=>11311 hard=>11312 insane=>11313 END END ACTION_DEFINE_ASSOCIATIVE_ARRAY diff_strref_lookup BEGIN help=>1105 easiest=>1100 easy=>1101 normal=>1102 hard=>1103 insane=>1104 END ACTION_PHP_EACH diff_strref_lookup AS key=>tra BEGIN OUTER_SET tlk_entry = $patch_data("%key%") STRING_SET_EVALUATE tlk_entry (AT tra) END // for EE only, the ones in L_XX_YY ACTION_IF enhanced_edition BEGIN MAKE_PATCH DIFFICULTY_DESCRIPTION => 1110 DIFFICULTY_DESCRIPTION_CORERULES => 1111 DIFFICULTY_DESCRIPTION_CORERULES_BG2EE => 1111 DIFFICULTY_DESCRIPTION_CORERULES_BGEE => 1111 DIFFICULTY_DESCRIPTION_EASY => 1112 DIFFICULTY_DESCRIPTION_EASY_BG2EE => 1112 DIFFICULTY_DESCRIPTION_EASY_BGEE => 1112 DIFFICULTY_DESCRIPTION_HARD => 1133 DIFFICULTY_DESCRIPTION_HARD_BG2EE => 1113 DIFFICULTY_DESCRIPTION_HARD_BGEE => 1133 DIFFICULTY_DESCRIPTION_INSANE => 1134 DIFFICULTY_DESCRIPTION_INSANE_BG2EE => 1114 DIFFICULTY_DESCRIPTION_INSANE_BGEE => 1134 DIFFICULTY_DESCRIPTION_NORMAL => 1115 DIFFICULTY_DESCRIPTION_NORMAL_BG2EE => 1115 DIFFICULTY_DESCRIPTION_NORMAL_BGEE => 1115 DIFFICULTY_LABEL_CORERULES => 1116 DIFFICULTY_LABEL_CORERULES_MIXED => 1117 DIFFICULTY_LABEL_EASY => 1118 DIFFICULTY_LABEL_EASY_MIXED => 1119 DIFFICULTY_LABEL_HARD => 1120 DIFFICULTY_LABEL_HARD_MIXED => 1121 DIFFICULTY_LABEL_NORMAL => 1124 DIFFICULTY_LABEL_NORMAL_MIXED => 1125 NO_DAMAGE_INCREASE_LABEL => 1126 NO_DAMAGE_INCREASE_DESCRIPTION => 1127 DIFFICULTY_DESCRIPTION_LEGACYOFBHAAL_BG2EE =>1135 DIFFICULTY_DESCRIPTION_STORYMODE => 1136 DIFFICULTY_DESCRIPTION_STORYMODE_BG2EE => 1136 DIFFICULTY_DESCRIPTION_STORYMODE_BGEE => 1136 END COPY_EXISTING "L_%EE_LANGUAGE%.lua" override PHP_EACH patch_data AS key=>value BEGIN SPRINT string (AT value) REPLACE_TEXTUALLY ~%key% *=.*~ ~%key% = "%string%",~ END BUT_ONLY END // default the difficulty-damage setting to turn off difficulty-based changes LAF check_ini STR_VAR ini="enable_difficulty_based_damage_changes" RET value END ACTION_IF !value BEGIN ACTION_IF enhanced_edition BEGIN ACTION_IF FILE_EXISTS "%USER_DIRECTORY%/baldur.lua" BEGIN COPY "%USER_DIRECTORY%/baldur.lua" "%USER_DIRECTORY%" REPLACE_TEXTUALLY ~SetPrivateProfileString('Game Options','Suppress Extra Difficulty Damage','0')~ ~SetPrivateProfileString('Game Options','Suppress Extra Difficulty Damage','1')~ BUT_ONLY END END ELSE BEGIN <<<<<<<< .../stratagems-inline/diffmod.2da 2DA V1.0 0 DAMAGE_MOD LUCK_MOD EASIEST 0 0 EASY 0 0 NORMAL 0 0 HARD 0 0 HARDEST 0 0 >>>>>>>> COPY ".../stratagems-inline/diffmod.2da" override END END END /////////////////////////////////////////////////////////////////// //// Helper functions /////////////////////////////////////////////////////////////////// DEFINE_ACTION_FUNCTION difficulty_helper_initial STR_VAR codename="" string="" variable="" require="" diff_1="" diff_2="" diff_3="" diff_4="" diff_5="" diff_6="" diff_7="" BEGIN OUTER_FOR (entry=0;entry<=7;entry+=1) BEGIN ACTION_IF $diff("%entry%") STRING_COMPARE_CASE "" BEGIN OUTER_SPRINT globalstring ~Global("%variable%","GLOBAL",%entry%)Global("DW_%codename%_disable","GLOBAL",99)~ OUTER_SPRINT append_me "IF ~%globalstring%~ THEN REPLY (AT %string%) GOTO %codename%_%entry%" APPEND_OUTER "%workspace%/difficulty_dialog.d" "%append_me%" END END END DEFINE_ACTION_FUNCTION difficulty_helper_main STR_VAR codename="" string="" variable="" require="" diff_1="" diff_2="" diff_3="" diff_4="" diff_5="" diff_6="" diff_7="" BEGIN OUTER_FOR (entry=0;entry<=7;entry+=1) BEGIN ACTION_IF $diff("%entry%") STRING_COMPARE_CASE "" BEGIN OUTER_SET saystring = $diff_report_strings("%entry%") APPEND_OUTER "%workspace%/difficulty_dialog.d" "IF ~~ THEN BEGIN %codename%_%entry% SAY (AT %saystring%)" APPEND_OUTER "%workspace%/difficulty_dialog.d" "IF ~~ THEN REPLY @1019 GOTO initial" OUTER_FOR (option=0;option<=7;option+=1) BEGIN ACTION_IF (option=0 || $diff("%option%")>=0) BEGIN OUTER_SET replystrref = $diff_choice_strings("%option%") OUTER_SPRINT replystring (AT "%replystrref%") OUTER_SPRINT globalstring ~SetGlobal("%variable%","GLOBAL",%option%)~ ACTION_IF option>=1 BEGIN OUTER_SET temp_strref="%diff_%option%%" OUTER_SPRINT temp (AT %temp_strref%) OUTER_SPRINT replystring "%replystring%%temp%" END APPEND_OUTER "%workspace%/difficulty_dialog.d" "IF ~~ THEN REPLY ~%replystring%~ DO ~%globalstring%~ GOTO acknowledge_%option%" END END APPEND_OUTER "%workspace%/difficulty_dialog.d" "END" END END END DEFINE_ACTION_FUNCTION difficulty_ui RET abort BEGIN // first sort out what 3/4-size BAM we should use (if we have to resize): OUTER_SET x_rescale=1 // at present everything rescales in the x direction too // if one of Lefreut's enhanced UIs is installed, use that to determine the button ACTION_IF MOD_IS_INSTALLED "leui-bg1ee/leui-bg1ee.tp2" 0 BEGIN OUTER_SPRINT smaller_bam bg1_button_resized END ELSE ACTION_IF (MOD_IS_INSTALLED "leui-sod/leui-sod.tp2" 0 || MOD_IS_INSTALLED "dragonspear_ui++/dragonspear_ui++.tp2" 0 || MOD_IS_INSTALLED "infinity_ui/infinity_ui.tp2" 0 ) BEGIN OUTER_SPRINT smaller_bam sod_button_resized END ELSE ACTION_IF MOD_IS_INSTALLED "leui-iwdee/leui-iwdee.tp2" 0 BEGIN OUTER_SPRINT smaller_bam iwd_button_resized END ELSE ACTION_IF MOD_IS_INSTALLED "leui/leui.tp2" 0 BEGIN OUTER_SPRINT smaller_bam bg2_button_resized END ELSE // otherwise, guess on the basis of the game ACTION_IF GAME_IS IWDEE BEGIN OUTER_SPRINT smaller_bam iwd_button_resized END ELSE ACTION_IF GAME_INCLUDES SOD BEGIN OUTER_SPRINT smaller_bam sod_button_resized END ELSE ACTION_IF GAME_IS BGEE BEGIN OUTER_SPRINT smaller_bam bg1_button_resized END ELSE BEGIN OUTER_SPRINT smaller_bam bg2_button_resized END OUTER_SET abort=0 // get the parameters from the existing menu // we assume that the Assign Keys, Auto-Pause and Feedback buttons are in a vertical stack. We don't assume anything about what order they're in (Dragonspear++ breaks // the normal order) COPY_EXISTING ui.menu override LPF UI_analyze_object STR_VAR object=RG_OPTIONS_BAR object_type=menu object_name_field=name patch=get_feedback_ui_coordinates RET_ARRAY feedback=patch_output END LPF UI_analyze_object STR_VAR object=RG_OPTIONS_BAR object_type=menu object_name_field=name patch=get_assign_keys_ui_coordinates RET_ARRAY keys=patch_output END LPF UI_analyze_object STR_VAR object=RG_OPTIONS_BAR object_type=menu object_name_field=name patch=get_auto_pause_ui_coordinates RET_ARRAY auto=patch_output END PATCH_IF (keys_yloc<feedback_yloc && keys_yloc<auto_yloc) BEGIN SPRINT upper_choice keys PATCH_IF (feedback_yloc<auto_yloc) BEGIN SPRINT lower_choice feedback END ELSE BEGIN SPRINT lower_choice auto END END ELSE BEGIN PATCH_IF (feedback_yloc<auto_yloc) BEGIN SPRINT upper_choice feedback PATCH_IF (keys_yloc<auto_yloc) BEGIN SPRINT lower_choice keys END ELSE BEGIN SPRINT lower_choice auto END END ELSE BEGIN SPRINT upper_choice auto PATCH_IF (keys_yloc<feedback_yloc) BEGIN SPRINT lower_choice keys END ELSE BEGIN SPRINT lower_choice feedback END END END PATCH_FOR_EACH ind IN xloc yloc width height BEGIN SET "lower_%ind%"=EVAL "%lower_choice%_%ind%" SET "upper_%ind%"=EVAL "%upper_choice%_%ind%" END PATCH_IF !(upper_xloc=lower_xloc) || !(upper_width=lower_width) BEGIN SET abort=1 // in this case the setup is too different from what we're used to END BUT_ONLY ACTION_IF !abort BEGIN COPY_EXISTING ui.menu override //main patch SET delta=lower_yloc - upper_yloc SET new_yloc=upper_yloc - delta SPRINT area_string "%lower_xloc% %new_yloc% %lower_width% %lower_height%" LPF UI_insert_into_object STR_VAR object=RG_OPTIONS_BAR object_type=menu object_name_field=name insert=".../stratagems-inline/diff_button" END LPF UI_add_function STR_VAR function=".../stratagems-inline/diff_func" END LPF UI_alter_object STR_VAR object=ESC_MENU object_type=menu object_name_field=name patch="ui_sub_true" END LPF UI_alter_object STR_VAR object=START_OPTIONS object_type=menu object_name_field=name patch="ui_sub_false" END // tweaks PATCH_IF (GAME_IS BGEE && !GAME_INCLUDES SOD) BEGIN // REPLACE_TEXTUALLY "area 44 190 360 262" "area 44 190 360 192" END BUT_ONLY // add the identifying string LAF UI_add_string INT_VAR tra_entry=1128 STR_VAR string_id="SCS_DIFFICULTY_BUTTON" END // check if we have a space problem and if so, adjust COPY_EXISTING "ui.menu" "%workspace%" LPF UI_return_object STR_VAR object=RG_OPTIONS_BAR object_name_field=name object_type=menu RET object_data END BUT_ONLY OUTER_SET xmin=upper_xloc OUTER_SET width=upper_width OUTER_SET height=upper_height OUTER_SET xmax=xmin+width OUTER_SET ymax=upper_yloc OUTER_INNER_PATCH "%object_data%" BEGIN LPF check_clearance RET clearance END END ACTION_IF clearance>(height * 11)/10 BEGIN OUTER_SET space=1 END ELSE BEGIN OUTER_SET space=0 END ACTION_IF !space BEGIN PRINT "smaller_bam is %smaller_bam%" COPY "%MOD_FOLDER%/%component_loc%/resource/%smaller_bam%.bam" "override/dwostcl.bam" COPY_EXISTING ui.menu override LPF UI_alter_object STR_VAR object=RG_OPTIONS_BAR object_type=menu object_name_field=name patch=rescale_buttons END BUT_ONLY END END END /// resources and helper functions for the UI edit DEFINE_PATCH_FUNCTION get_feedback_ui_coordinates RET_ARRAY patch_output BEGIN LPF UI_analyze_object STR_VAR object=FEEDBACK_BUTTON object_type=BUTTON object_name_field=text patch=UI_get_coordinates RET_ARRAY patch_output END END DEFINE_PATCH_FUNCTION get_assign_keys_ui_coordinates RET_ARRAY patch_output BEGIN LPF UI_analyze_object STR_VAR object=ASSIGN_KEYS_BUTTON object_type=BUTTON object_name_field=text patch=UI_get_coordinates RET_ARRAY patch_output END END DEFINE_PATCH_FUNCTION get_auto_pause_ui_coordinates RET_ARRAY patch_output BEGIN LPF UI_analyze_object STR_VAR object=AUTO_PAUSE_BUTTON object_type=BUTTON object_name_field=text patch=UI_get_coordinates RET_ARRAY patch_output END END DEFINE_PATCH_FUNCTION check_clearance RET clearance BEGIN SET clearance=9999 REPLACE_EVALUATE "area +\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)[^0-9]*" BEGIN SET xloc_here="%MATCH1%" SET yloc_here="%MATCH3%" + "%MATCH7%" SET width="%MATCH5%" SET xmin_here=xloc_here SET xmax_here=xloc_here + width PATCH_IF (xmin_here<=xmax && xmax_here>=xmin) BEGIN SET clearance_here= ymax - yloc_here PATCH_IF clearance_here<0 BEGIN SET clearance_here=9999 END SET clearance = clearance < clearance_here ? clearance : clearance_here END END "" END DEFINE_PATCH_FUNCTION difficulty_lower BEGIN LPF shared_lower INT_VAR number=4 END END DEFINE_PATCH_FUNCTION assign_keys_lower BEGIN LPF shared_lower INT_VAR number=3 END END DEFINE_PATCH_FUNCTION auto_feedback_lower BEGIN LPF shared_lower INT_VAR number=2 END END DEFINE_PATCH_FUNCTION autopause_lower BEGIN LPF shared_lower INT_VAR number=1 END END DEFINE_PATCH_FUNCTION shared_lower INT_VAR number=0 BEGIN REPLACE_EVALUATE "\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)\( \|%TAB%\)+\([0-9]+\)\([^0-9]*\)" BEGIN SET xloc="%MATCH1%" SET yloc="%MATCH3%" SET width="%MATCH5%" SET height="%MATCH7%" SET yloc +=(number * height) / 4 SET height= (3* height) / 4 PATCH_IF x_rescale BEGIN SET xloc += (width / 8) SET width = (3* width) / 4 END END " %xloc% %yloc% %width% %height%%MATCH8%" REPLACE_TEXTUALLY "bam\( \|%TAB%\)+.*\(%WNL%\|%LNL%\|%MNL%\)" "bam dwostcl\2" END DEFINE_PATCH_FUNCTION rescale_buttons BEGIN LPF UI_alter_object STR_VAR object=SCS_DIFFICULTY_BUTTON object_type=BUTTON object_name_field=text patch=difficulty_lower END LPF UI_alter_object STR_VAR object=ASSIGN_KEYS_BUTTON object_type=BUTTON object_name_field=text patch=assign_keys_lower END LPF UI_alter_object STR_VAR object=AUTO_PAUSE_BUTTON object_type=BUTTON object_name_field=text patch=autopause_lower END LPF UI_alter_object STR_VAR object=FEEDBACK_BUTTON object_type=BUTTON object_name_field=text patch=auto_feedback_lower END END DEFINE_PATCH_FUNCTION ui_sub_true BEGIN REPLACE_TEXTUALLY "Infinity_PushMenu( *'RG_OPTIONS_BAR' *)" "%WNL%scsInGameVar=true%WNL%Infinity_PushMenu( 'RG_OPTIONS_BAR' )%WNL%" END DEFINE_PATCH_FUNCTION ui_sub_false BEGIN REPLACE_TEXTUALLY "Infinity_PushMenu( *'RG_OPTIONS_BAR' *)" "%WNL%scsInGameVar=false%WNL%Infinity_PushMenu( 'RG_OPTIONS_BAR' )%WNL%" END <<<<<<<< .../stratagems-inline/diff_button button { enabled scsInGameVar bam %feedback_bam% sequence 0 area %area_string% text "SCS_DIFFICULTY_BUTTON" text style "button" action " scsSummonWidget() Infinity_PopMenu() e:SelectEngine(worldScreen) " } >>>>>>>> <<<<<<<< .../stratagems-inline/diff_func function scsSummonWidget() C:Eval('CreateCreatureObject("dw#diffi",Player1,0,0,0)') end >>>>>>>>