LiQuiD911 Posted December 22, 2014 Share Posted December 22, 2014 Hello! Could someone please point me where to look if I wanted to remove part of the hud? Like the objective list during exalt missions , the soldier/camera controls in the lower left corner (along with their tooltips), the radar in bomb missions etc.. I don't use them anyway and they clutter the screen. Link to comment Share on other sites More sharing options...
wghost81 Posted December 22, 2014 Share Posted December 22, 2014 (edited) Radars and messages are handled by UISpecialMissionHUD subclasses. As for the other elements, you can start searching with XComPresentationLayer class. Edited December 22, 2014 by wghost81 Link to comment Share on other sites More sharing options...
LiQuiD911 Posted December 22, 2014 Author Share Posted December 22, 2014 (edited) It's about time to learn unreal-script-fu xDSo let's suppose I found what I was looking for in UIInterfaceMgr and want to remove DialogBox. What is the next step? DialogBox := null and remove the line DialogBox.Init(XComPlayerController(m_pPres.Owner), self); ? Or am I supposed to mess with the "show" functions of each single element? Like add "Hide" at the end of DialogBox.OnInit() class UIInterfaceMgr extends UIFxsMovie config(UI);var UIMessageMgr MessageMgr;var UIAnchoredMessageMgr AnchoredMessageMgr;var UINarrativeCommLink CommLink;var UIDialogueBox DialogBox;var private bool bShownNormally;var private int ForceShowCount;simulated function OnInit(){ super.OnInit(); MessageMgr = m_pPres.Spawn(class'UIMessageMgr', m_pPres); MessageMgr.Init(XComPlayerController(m_pPres.Owner), self); AnchoredMessageMgr = m_pPres.Spawn(class'UIAnchoredMessageMgr', m_pPres); AnchoredMessageMgr.Init(XComPlayerController(m_pPres.Owner), self); CommLink = m_pPres.Spawn(class'UINarrativeCommLink', m_pPres); CommLink.Init(XComPlayerController(m_pPres.Owner), self); DialogBox = m_pPres.Spawn(class'UIDialogueBox', m_pPres); DialogBox.Init(XComPlayerController(m_pPres.Owner), self); // End:0x26A if(XComPresentationLayerBase(m_pPres) != none) { XComPresentationLayerBase(m_pPres).InitUIScreens(); } //return; } Edited December 23, 2014 by LiQuiD911 Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted December 23, 2014 Share Posted December 23, 2014 Instead of messing with UnrealScript logic a different approach would be to prevent certain UI components from being placed in the HUD directly in the embedded Scaleform GFX files. Here's a few instructions to get you started:grab a copy of Toolboks EW and extract GFX files from UICollection_Tactical_SF.upk (via Extract SWFs button inside Custom Mods tab)grab a copy of JPEXS Free Flash Decompiler and open the TacticalHUD file with it (should be named UICollection_Tactical_SF_23.swf)browse the list of sprite definitions and locate the TacticalHUD MC sprite:http://i.imgur.com/gBvWoXg.pngobserve how inside that sprite various sub-sprites are placed with descriptive names like theObjectivesList and theRadarMCswitch to Hex Dump view (in the File menu ribbon) and locate the corresponding DefineSprite entry:http://i.imgur.com/75rEXrr.pngobserve how selecting an element in the left-hand tree view will highlight the corresponding byte sequence in the right-hand hex viewopen UICollection_Tactical_SF.upk with a hex editor (like HxD) and locate the highlighted byte sequence (for instance using a text search for "theObjectivesList")select the highlighted sequence and use Edit -> Fill Selection... to replace the sequence with zero bytes:http://i.imgur.com/hDGyAlY.pnget voilà, you now (deliberately) broke part of the HUD :smile:repeat for other sprites Note how the camera controls sprite (called MouseControls) is nowhere to be found inside the TacticalHUD MC sprite (or any other sprite for that matter). This is because the component is dynamically placed via ActionScript instead of being pre-placed and toggled on/off conditionally like the radar or objectives. One simple way to work around that is to garble the script identifier of the mouse controls sprite, like so:open the TacticalHUD file in JPEXS and locate the DefineSprite tag of the MouseControls sprite (id 370):http://i.imgur.com/rw1aMIA.pngignore the sprite tag and observe how it's followed by an ExportAssets tag - this is used to define the script identifierlocate the highlighted byte sequence using a hex editor and replace the name part with any other byte sequence (e.g. zero bytes or random characters)Now the script for dynamically attaching the mouse controls cannot find the corresponding sprite and therefore no such component will show up on the HUD. Enjoy! Link to comment Share on other sites More sharing options...
LiQuiD911 Posted December 25, 2014 Author Share Posted December 25, 2014 (edited) Thank you for the detailed instructions! But I think I might have screwed something up following them because it broke the mouse/keyboard controls... However I managed to hide the elements I wanted by setting their spriteid to 0x0000. Here are the patches if anyone wanted to lighten up their hud. They SHOULD work on any EW/LONGWAR version MOD_NAME=HUD Cleaner -MOUSE CONTROLS-DESCRIPTION=Removes the hud for the mouse controlsUPK_FILE=UICollection_Tactical_SF.upk//button pause 327FIND_HEX =47 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button cursor down 330FIND_HEX =4A 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button cursor up 332FIND_HEX =4C 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button rotate right 335FIND_HEX =4f 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button rotate left 338FIND_HEX =52 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button next 341FIND_HEX =55 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button prev 344FIND_HEX =58 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button end 346FIND_HEX =5a 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button shotinfo 350FIND_HEX =5e 01 96 00 3F 03 27 00MODDED_HEX =00 00 96 00 3F 03 27 00//button cancelshot 353FIND_HEX =63 01 01 00 86 06 06 02MODDED_HEX =00 00 01 00 86 06 06 02//button spacer 355FIND_HEX =61 01 86 00 3F 03 27 00MODDED_HEX =00 00 86 00 3F 03 27 00//button unit info 359FIND_HEX =67 01 96 00 3F 03 27 00MODDED_HEX =00 00 96 00 3F 03 27 00 MOD_NAME=UI CLEANER -OBJECTIVE LIST-DESCRIPTION=Removes the objective list from the hudUPK_FILE=UICollection_Tactical_SF.upk//button objective list 474FIND_HEX =da 01 01 00 86 06 06 03MODDED_HEX =00 00 01 00 86 06 06 03 MOD_NAME=UI CLEANER -RADAR-DESCRIPTION=Removes the radar from the hudUPK_FILE=UICollection_Tactical_SF.upk//button radar 470FIND_HEX =d6 01 01 00 86 06 06 03 00MODDED_HEX =00 00 01 00 86 06 06 03 00 http://i59.tinypic.com/2s9o9z8.png Edited December 25, 2014 by LiQuiD911 Link to comment Share on other sites More sharing options...
Recommended Posts