Page 1 of 2

Overlapping HUD + Rearranging Minimap [Solved]

Posted: Sun Jan 24, 2016 12:04 pm
by thelegend
I thought editing the Position of the HUD parts, like the Minimap, wouldn't be that hard. It isn't. But there's another issue which is making me curios.
I added a custom .hud file which only contains this:
Hidden/Spoiler:
[code]FileInfo("1playerhud")
{
Viewports(1)

}

Map("player1map")
{
PositionSmall(0.900000, 0.800000, 0.012000, "Viewport")
PositionLarge(0.308639, 0.556811, -38.133076, "Viewport")
PositionSpawn(0.767984, 0.477156, 0.000000, "Viewport")
EventToggleMapMode("player1.map.modeToggle")
EventChangeMapMode("player1.map.mode")
EventPostHide("player1.map.hideCPs")
EventRefreshTarget("player1.map.refreshTarget")
EventRefreshPost("player1.map.refreshPost")
EventRefreshMarker("player1.map.refreshMarker")
EventPlayerIndex("player1.index")
PropagateAlpha(1)
Position(0.900000, 0.800000, 0.012000, "Viewport")
Scale(0.820000, 0.820000, 0.820000)
ZOrder(127)
Alpha(0.850000)
EventEnable("player1.map.enable")

BackdropSmall("BackdropSmall")
{
Mask("map_mask")
TexCoords(0.248419, 0.564873, 0.470641, 0.787095)
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSmall("PlayerFOVSmall")
{
Mesh("hud_map_fov")
ZOrder(123)
}

PlayerDirectionSmall("PlayerDirectionSmall")
{
Mesh("hud_map_fov")
ZOrder(124)
Alpha(0.200000)
Color(255, 255, 0)
}

TargetSmall("TargetSmall")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSmall("PostSmall")
{
BitmapStyle("Shadow")
}

PostTextSmall("PostTextSmall")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSmall("PostSelectSmall")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSmall("MarkerSmall")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSmall("NorthSmall")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.110000, 0.000000, "Viewport")
Scale(2.000000, 2.000000, 2.000000)
ZOrder(127)
}

BackdropLarge("BackdropLarge")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVLarge("PlayerFOVLarge")
{
Mesh("hud_large_map_fov")
ZOrder(0)
Alpha(0.500000)
}

PlayerDirectionLarge("PlayerDirectionLarge")
{
Mesh("hud_map_fov")
ZOrder(124)
Alpha(0.200000)
Color(255, 255, 0)
}

TargetLarge("TargetLarge")
{
BitmapStyle("Shadow")
ZOrder(254)
Color(0, 0, 0)
}

PostLarge("PostLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

PostTextLarge("PostTextLarge")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectLarge("PostSelectLarge")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerLarge("MarkerLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthLarge("NorthLarge")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.375000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

BackdropSpawn("BackdropSpawn")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSpawn("PlayerFOVSpawn")
{
ZOrder(123)
}

PlayerDirectionSpawn("PlayerDirectionSpawn")
{
ZOrder(124)
}

TargetSpawn("TargetSpawn")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSpawn("PostSpawn")
{
BitmapStyle("Shadow")
}

PostTextSpawn("PostTextSpawn")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSpawn("PostSelectSpawn")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSpawn("MarkerSpawn")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSpawn("NorthSpawn")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.325000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

}[/code]
I added it into my ingame.req and in-game it worked. But (of course) I want to remove the old minimap. I renamed 1playerhud.hud into customhud.hud in hud/PC and overrode the plyer1map parts which the part above. In-Game the following happens when I press m to show up the big minimap:
Hidden/Spoiler:
Image
I also put there a reference how the stock one does look like.

This has also happened to the small minimap (if I didn't change it's position).
How can I make my HUD be read only by the game. I think it also reads the stock HUD from the stock ingame.lvl.

Here's that small part from my .lua.

Code: Select all

function ScriptInit()

       ReadDataFile("dc:ingame.lvl")
    ReadDataFile("ingame.lvl")
Ingame.req:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"model"
"com_bldg_controlzone"
}
REQN
{
"class"
"com_bldg_controlzone"
}
REQN
{
"config"
"customhud"
}

}
[/code]
I tried many different methos but none of them seem to work. Thank you if you know how to make a custom hud.

Re: Overlapping HUD

Posted: Sun Jan 24, 2016 5:22 pm
by Anakin
never was successful with the minimap. But marth played a bit around with that. And anthonybf moved it successfully but cannot remember how. So they would be the best address for you

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 7:51 am
by thelegend
Well, the minimap re-placement wasn't the problem. I only wanted to remove unnessecary things from the HUD through editing the .hud file. But if I, for example rearrange the position of the minimap, then the minimap is moved, but the old one is still there. i edited both, 1playerhud.hud and the other one in my PC folder. The fonts are darker, the big minimap is darker by twice; like I duplicated it's position through .hud editing. I already edited the CP mesh without any trouble. But the HUD doesn't want to go. It's like I changed the CP mesh and now both, the stock mesh and the custom mesh are showing up in-game. That's not the case so why does this keep happening to my HUD?

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 8:17 am
by Anakin
Have you read the HUD Tutorial??

There is a different between:
bitmaps
mesh
scripts
fonts

If you load a new font, the existing one is replaced. That's why you need to load custom fonts that remove the stock once at the end. Otherwise the loadscreen tips will be removed, too. Others (i cannot remember how it is exactly for mesh, bitmap,..., but you find the answer in the tutorial) will be ignored if there is already something else with the same name loaded.

Scripts can exist side by side with an other script with the same name as far as I know (waiting for zerted to correct me). So the stock HUD script puts everything on the screen. Next your script is executed and it put everything you want on the screen. And so everything is double.
You need to remove the stock bitmaps, meshes,... with invisable meshs and tgas. Load a copy of them with different name in your custom ingame and use these renamed for your hud script.
That's how the hud tutorial, the floating icons fix,... work too.
1. replace the original mesh, tga, bitmap, font,... with invisible, so you cannot see what the original script puts on the screen
2. put a copy of the mesh, tga, bitmap, font,... with a different name(!) where ever you like it to be.

Problem with that: The minimap is loaded from the world itselfe. Saying you need to load an 100% transparent tga instead of the original world's minimap (no idea how to do that). Next problem: you "killed" the minimap texture, so you can not load it in your custom hud file. Maybe it is possible for the stock map (if you find a way to overwrite the loaded minimap texture with an invisible), since you have the minimap tgas and can load a copy of them with different name. But it won't be compatible with custom maps.
Alternative solution: Write a script that listen for the read in of the HUD file (and only the hud file, you don't want to replace the whole ingame.lvl) and insert your own one at this position. But I have no idea how to do that and it will be difficult to make it compatible with other HUDs. For more infos about scripting you should ask Zerted. He is the scripting guru :D

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 8:44 am
by thelegend
Alright, I will make the parts I want to remove invisible (Or just very small through scaling). Thank you for your help, Anakin :D

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 8:53 am
by Anakin
Yes scaling is a good idea, too. But remember, that you need to do that with the objects itself. not with the script.

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 11:01 am
by thelegend
Anakin! Regarding to that Minimap thing. I found a solution which seems to work fine. I successfully removed the old minimap and added a custom one through my customhud.hud file.
No user_scripts are required for this. No scaling nor invisibl-ing.

1. Make a custom .hud file which reads the minimap, but of course rearrange it.
2. Add this line below function ScriptPostLoad():

Code: Select all

DisableSmallMapMiniMap()
3. The stock minimap will be removed BUT the new created one will stay.

I first thought both minimaps would be removed but it seems that the DisableSmallMapMiniMap() function just disables the stock ingame.lvl minimap and not the custom one. I am glad it works fine.

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 11:03 am
by Anakin
:shock: That's impossible..... easy!!!!

Great finding!!! I'll add it to the HUD Tutorial. (and start working on my own new one. Maybe a remake of the RC HUD, or a complete new EA SWBF HUD.

Re: Overlapping HUD

Posted: Mon Jan 25, 2016 11:10 am
by thelegend
Thanks. And here's a Screenshot of the new position.
Hidden/Spoiler:
Image
Thanks to anthonybf2 by the way. I am using his rearranged minimap position information he shared here: viewtopic.php?f=29&t=27052&start=920 (Last Post).

Re: Overlapping HUD

Posted: Wed Jan 27, 2016 7:30 pm
by TWINKEYRUNAWAY
:D That's really cool! Its nice to see people do new things that we didn't think were possible!

Re: Overlapping HUD

Posted: Mon Feb 08, 2016 8:17 pm
by Marth8880
I'm having issues with this. When I have DisableSmallMapMiniMap() in my mission script (and yes, it's in ScriptPostLoad() ), strangeness occurs: any changes that I attempt to make to the minimap from my custom HUD file go unapplied, and toggling between the small and large map doesn't function properly. Here's what happens:

Right after I spawn, things look normal enough (minus the unchanged minimap position).
Hidden/Spoiler:
Image
When I show the large map, things are still normal.
Hidden/Spoiler:
Image
Then, when I hide the large map, the small minimap is gone!
Hidden/Spoiler:
Image
But when I show the large map again, the small minimap pops up with it!
Hidden/Spoiler:
Image
And from then on, the small minimap's visibility is basically tied with the large map's visibility until I re-enter the spawn screen via CP or death.
Hidden/Spoiler:
Image
However, when I don't include DisableSmallMapMiniMap() anywhere in my mission script, the minimap's properties are changed like they should be, the only real problem being the presence of the original minimap. :n
Hidden/Spoiler:
Image
So have you guys experienced this issue?


Also, Anakin, have you by any chance had this happen to you:
Hidden/Spoiler:
Image
Image
Where the "blank" font doesn't seem to properly affect the stock objective text and CP HUD index text (the little number above each CP icon)? :o Like, it only happens in like, maybe 35% of matches for me, but it's still really annoying to see.

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 6:13 am
by thelegend
Hmm...I had no issues with DisableSmallMinimap(). Switching, re-positions and re-sizes worked normally for me. I can tell you what I did:

1. I created a new, custom .hud file which only contains the minimap (and some minimal changes to the bars (e.g. health, energy..)). Maybe it might be the best to create a new one which only contains the minimap part in it.

2. Getting the new .hud working like any other ingame.lvl change.

3. Testing.

If it helps here's the entire Minimap thing from my hud which works fine for me:
Hidden/Spoiler:
[code]Map("player1map")
{
PositionSmall(0.870000, 0.870000, 0.012000, "Viewport")
PositionLarge(0.308639, 500.556811, -38.133076, "Viewport")
PositionSpawn(0.767984, 500.477156, 0.000000, "Viewport")
EventToggleMapMode("player1.map.modeToggle")
EventChangeMapMode("player1.map.mode")
EventPostHide("player1.map.hideCPs")
EventRefreshTarget("player1.map.refreshTarget")
EventRefreshPost("player1.map.refreshPost")
EventRefreshMarker("player1.map.refreshMarker")
EventPlayerIndex("player1.index")
PropagateAlpha(1)
Position(0.900000, 0.800000, 0.012000, "Viewport")
Scale(1.20000, 1.20000, 1.20000)
ZOrder(127)
Alpha(0.850000)
EventEnable("player1.map.enable")

BackdropSmall("BackdropSmall")
{
Mask("map_mask")
TexCoords(0.248419, 0.564873, 0.470641, 0.787095)
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSmall("PlayerFOVSmall")
{
Mesh("hud_map_fov_custom")
ZOrder(123)
}

PlayerDirectionSmall("PlayerDirectionSmall")
{
Mesh("hud_map_fov_custom")
ZOrder(124)
Alpha(0.200000)
Color(255, 255, 0)
}

TargetSmall("TargetSmall")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSmall("PostSmall")
{
BitmapStyle("Shadow")
}

PostTextSmall("PostTextSmall")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSmall("PostSelectSmall")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSmall("MarkerSmall")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSmall("NorthSmall")
{
Bitmap("hud_map_north")
BitmapStyle("Shadow")
Position(0.000000, -0.110000, 0.000000, "Viewport")
Scale(2.000000, 2.000000, 2.000000)
ZOrder(127)
}

BackdropLarge("BackdropLarge")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVLarge("PlayerFOVLarge")
{
Mesh("hud_large_map_fov")
ZOrder(0)
Alpha(0.500000)
}

TargetLarge("TargetLarge")
{
BitmapStyle("Shadow")
ZOrder(254)
Color(0, 0, 0)
}

PostLarge("PostLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

PostTextLarge("PostTextLarge")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectLarge("PostSelectLarge")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerLarge("MarkerLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthLarge("NorthLarge")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.375000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

BackdropSpawn("BackdropSpawn")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSpawn("PlayerFOVSpawn")
{
ZOrder(123)
}

PlayerDirectionSpawn("PlayerDirectionSpawn")
{
ZOrder(124)
}

TargetSpawn("TargetSpawn")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSpawn("PostSpawn")
{
BitmapStyle("Shadow")
}

PostTextSpawn("PostTextSpawn")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSpawn("PostSelectSpawn")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSpawn("MarkerSpawn")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSpawn("NorthSpawn")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.325000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

}[/code]
If you use this instead of your's (Minimap) following bugs may occur: I have added a new Northpointer texture for the small minimap, some meshes might miss.
But it should change the position and the size of your minimap.
I am going to test this for another test map to see the results. I am going to reply back if I had success or not.

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 6:17 am
by Anakin
mh, for me it worked. Can you post your mission lua and custom hud files with their names (did you name them 1playerhud such as the stock one, or did you rename them??)

about the font square problem, i have the same problem with the rc mod. Sometimes the font is replaced completely, sometimes i get these squares. No idea when or why this happens.

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 6:25 am
by thelegend
I tested it on another, test map and I had no issues. As Anakin said it would be the best to post your .lua and .hud files.

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 4:02 pm
by Marth8880
thelegend wrote:Maybe it might be the best to create a new one which only contains the minimap part in it.
I'd already tried that. Results were no different.


Relevant section of cor1n_con.lua:
(Pastebin link for syntax highlighting: http://pastebin.com/1BgvrT0C )
Hidden/Spoiler:
[code]function ScriptPostLoad()

-- Disable the stock minimap to make room for ours
DisableSmallMapMiniMap()

AddDeathRegion("death")
AddDeathRegion("death1")
AddDeathRegion("death2")
AddDeathRegion("death3")
AddDeathRegion("death4")




SetProperty ("LibCase1","MaxHealth",1000)
SetProperty ("LibCase2","MaxHealth",1000)
SetProperty ("LibCase3","MaxHealth",1000)
SetProperty ("LibCase4","MaxHealth",1000)
SetProperty ("LibCase5","MaxHealth",1000)
SetProperty ("LibCase6","MaxHealth",1000)
SetProperty ("LibCase7","MaxHealth",1000)
SetProperty ("LibCase8","MaxHealth",1000)
SetProperty ("LibCase9","MaxHealth",1000)
SetProperty ("LibCase10","MaxHealth",1000)
SetProperty ("LibCase11","MaxHealth",1000)
SetProperty ("LibCase12","MaxHealth",1000)
SetProperty ("LibCase13","MaxHealth",1000)
SetProperty ("LibCase14","MaxHealth",1000)


SetProperty ("LibCase1","CurHealth",1000)
SetProperty ("LibCase2","CurHealth",1000)
SetProperty ("LibCase3","CurHealth",1000)
SetProperty ("LibCase4","CurHealth",1000)
SetProperty ("LibCase5","CurHealth",1000)
SetProperty ("LibCase6","CurHealth",1000)
SetProperty ("LibCase7","CurHealth",1000)
SetProperty ("LibCase8","CurHealth",1000)
SetProperty ("LibCase9","CurHealth",1000)
SetProperty ("LibCase10","CurHealth",1000)
SetProperty ("LibCase11","CurHealth",1000)
SetProperty ("LibCase12","CurHealth",1000)
SetProperty ("LibCase13","CurHealth",1000)
SetProperty ("LibCase14","CurHealth",1000)



EnableSPHeroRules()

DisableBarriers("SideDoor1")
DisableBarriers("MainLibraryDoors")
DisableBarriers("SideDoor2")
DisableBarriers("SIdeDoor3")
DisableBarriers("ComputerRoomDoor1")
DisableBarriers("StarChamberDoor1")
DisableBarriers("StarChamberDoor2")
DisableBarriers("WarRoomDoor1")
DisableBarriers("WarRoomDoor2")
DisableBarriers("WarRoomDoor3")
PlayAnimation("DoorOpen01")
PlayAnimation("DoorOpen02")


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
--cp7 = CommandPost:New{name = "ssvDroneCage"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con", textDEF = "game.modes.con2",

multiplayerRules = true}



--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
--conquest:AddCommandPost(cp7)

conquest:Start()

SetProperty("cp1", "AllyPath", "CP1SpawnPath")
SetProperty("cp2", "AllyPath", "CP2SpawnPath")
SetProperty("cp3", "AllyPath", "CP3SpawnPath")
SetProperty("cp4", "AllyPath", "CP4SpawnPath")
SetProperty("cp5", "AllyPath", "CP5SpawnPath")
SetProperty("cp6", "AllyPath", "CP6SpawnPath")

AddAIGoal(HuskTeam, "Deathmatch", 100)

if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 0 then
if RandomSide == 1 then
SSVxGTH_PostLoad()
elseif RandomSide == 2 then
SSVxCOL_PostLoad()
elseif RandomSide == 3 then
EVGxGTH_PostLoad()
elseif RandomSide == 4 then
EVGxCOL_PostLoad()
end
elseif ME5_SideVar == 1 then
SSVxGTH_PostLoad()
elseif ME5_SideVar == 2 then
SSVxCOL_PostLoad()
elseif ME5_SideVar == 3 then
EVGxGTH_PostLoad()
elseif ME5_SideVar == 4 then
EVGxCOL_PostLoad()
else end
else
SSVxGTH_PostLoad()
end

end

function ScriptInit()
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\Load\\load.lvl;cor1")

SetMemoryPoolSize("ParticleTransformer::ColorTrans", 2564)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1522)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1699)

PreLoadStuff()

[...]

end[/code]
Relevant section of ME5_MiscFunctions.lua (which contains some of my loading functions):
(Pastebin link for syntax highlighting: http://pastebin.com/Zh89eNg8 )
Hidden/Spoiler:
[code]---
-- Performs various pre-game operations, such as loading commonly used data files,
-- Carnage mode setup, HUD work, and running event response functions for features such as
-- kill sounds, Evolved Juggernaut's Power Drain, and shield pickups.
function PreLoadStuff()
print("ME5_MiscFunctions.PreLoadStuff(): Entered")

-- Load our custom loadscreen elements such as progress bar LEDs, tip box elements, etc.
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\Load\\common.lvl")

-- What is the difficulty set to in the Config Tool?
if not ScriptCB_InMultiplayer() then
if ME5_Difficulty == 1 then
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for CASUAL...")
SetAIDifficulty(1, -1)
SetTeamAggressiveness(CIS,(0.63))
SetTeamAggressiveness(REP,(0.63))
elseif ME5_Difficulty == 2 then
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for NORMAL...")
SetAIDifficulty(0, 0)
SetTeamAggressiveness(CIS,(0.73))
SetTeamAggressiveness(REP,(0.73))
elseif ME5_Difficulty == 3 then
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for VETERAN...")
SetAIDifficulty(-1, 1)
SetTeamAggressiveness(CIS,(0.83))
SetTeamAggressiveness(REP,(0.83))
elseif ME5_Difficulty == 4 then
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for HARDCORE...")
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.93))
SetTeamAggressiveness(REP,(0.93))
elseif ME5_Difficulty == 5 then
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for INSANITY...")
SetAIDifficulty(-3, 3)
SetTeamAggressiveness(CIS,(1.0))
SetTeamAggressiveness(REP,(1.0))
else
print("ME5_MiscFunctions.PreLoadStuff(): Error! ME5_Difficulty setting is invalid! Defaulting to difficulty parameters for HARDCORE")
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.93))
SetTeamAggressiveness(REP,(0.93))
end
else
print("ME5_MiscFunctions.PreLoadStuff(): Initializing difficulty parameters for MULTIPLAYER...")
-- NOTE: Apply a difficulty setting located between Hardcore and Insanity
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.95))
SetTeamAggressiveness(REP,(0.95))
end

-- What is Carnage Mode set to in the Config Tool?
if not ScriptCB_InMultiplayer() then
if ME5_CarnageMode == 0 then
print("ME5_MiscFunctions.PreLoadStuff(): Carnage Mode is DISABLED, deactivating weapon modifiers...")
elseif ME5_CarnageMode == 1 then
print("ME5_MiscFunctions.PreLoadStuff(): Carnage Mode is ENABLED, activating weapon modifiers...")
ActivateBonus(REP, "team_bonus_advanced_blasters")
ActivateBonus(CIS, "team_bonus_advanced_blasters")
else
print("ME5_MiscFunctions.PreLoadStuff(): Error! ME5_CarnageMode setting is invalid! Defaulting Carnage Mode setting to DISABLED")
end
else
print("ME5_MiscFunctions.PreLoadStuff(): Carnage Mode is ENABLED (MULTIPLAYER), activating weapon modifiers...")
ActivateBonus(REP, "team_bonus_advanced_blasters")
ActivateBonus(CIS, "team_bonus_advanced_blasters")
end

-- Load the appropriate faction CP icons
-- Which faction variation is active?
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 0 then
if RandomSide == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif RandomSide == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif RandomSide == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif RandomSide == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
end
elseif ME5_SideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif ME5_SideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif ME5_SideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif ME5_SideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
else end
else
if onlineSideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif onlineSideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif onlineSideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif onlineSideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
else end
end

-- Load our custom shell stuff
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\common.lvl")

-- What is the shell style set to in the Config Tool?
if ME5_CustomGUIEnabled == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\me5shell.lvl")
elseif ME5_CustomGUIEnabled == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\me3shell.lvl")
else end

-- Load localization
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\core.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\corebase.lvl")


-- Get the player's aspect ratio so we can load the proper sniperscope sizes
local screenWidth, screenHeight = ScriptCB_GetScreenInfo()
local aspectRatio = screenWidth / screenHeight
print("ME5_MiscFunctions.PreLoadStuff():", "Width: "..screenWidth, "Height: "..screenHeight..", Aspect Ratio: "..aspectRatio)

-- What is the aspect ratio of the player's display?
if aspectRatio <= 1.4 then
print("ME5_MiscFunctions.PreLoadStuff(): Aspect Ratio is 4:3, loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar43\\ar.lvl")
elseif aspectRatio <= 1.63 and aspectRatio >= 1.5 then
print("ME5_MiscFunctions.PreLoadStuff(): Aspect Ratio is 16:10, loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar1610\\ar.lvl")
elseif aspectRatio <= 1.9 and aspectRatio >= 1.63 then
print("ME5_MiscFunctions.PreLoadStuff(): Aspect Ratio is 16:9, loading scopes as such")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar169\\ar.lvl")
else
print("ME5_MiscFunctions.PreLoadStuff(): Error! Invalid aspect ratio ("..aspectRatio..")! Defaulting to workaround")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar.lvl")
end


--==========================
-- START HUD WORK
--==========================

-- Is the custom HUD enabled in the Config Tool?
if ME5_CustomHUD == 1 then
print("ME5_MiscFunctions.PreLoadStuff(): Loading custom HUD")

-- Load the Myriad Pro fonts
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font.lvl")

-- Load the Korataki fonts
-- Is the player screen's width greater than or equal to 1440?
if screenWidth >= 1440 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font_large.lvl")
else
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font_small.lvl")
end

-- Load MEU's ingame.lvl
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")

-- Purge the stock HUD mshs
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_msh.lvl")

-- Load the stock ingame.lvl
ReadDataFile("ingame.lvl")

-- Purge the stock HUD textures
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_bmp.lvl")

-- Load the new custom HUD and the objective screen text based on the game mode
-- What is the active game mode? (NOTE: This is set near the beginning of each game mode's objective script)
if MEUGameMode == meu_1flag then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_1flag")
elseif MEUGameMode == meu_con then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_con")
elseif MEUGameMode == meu_ctf then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_ctf")
elseif MEUGameMode == meu_siege then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_siege")
elseif MEUGameMode == meu_surv then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_surv")
elseif MEUGameMode == meu_tdm then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl;hud_mode_tdm")
else
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
end

-- Load weapons.lvl for the MEU HUD
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\weapons.lvl;hud_meu")

-- Hotfix that overrides the stock fonts with a "blank font"
--ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_text.lvl")
else
-- Load the stock ingame.lvl
ReadDataFile("ingame.lvl")

-- Load weapons.lvl for the stock HUD
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\weapons.lvl;hud_stock")

-- Load the new onscreen pointer textures
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamehud.lvl")
end

--==========================
-- END HUD WORK
--==========================


--==========================
-- START SOUND WORK
--==========================

-- Load master sound LVL, includes sound property templates, etc.
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\ME5.lvl")

-- [DEPRECATED 31-OCT-2013] Load music sound LVL, includes all music stuff
--ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_MUS_Streaming.lvl")

-- Load hero music sound LVL, includes all hero music
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_MUS_h_Streaming.lvl")

-- Load voice over sound LVL, includes all streamable voice overs, excludes pain/death chatter
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_vo_Streaming.lvl")

-- Load common sound LVL, includes many common sounds such as foley, explosions, prop sfx, etc.
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")

-- Load weapon sound LVL, includes all weapon sounds
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")

--==========================
-- END SOUND WORK
--==========================

-- Call exterior functions
fShieldPickup()
fKillSound()
--fLowHealthSound()
fEvgJugPowerDrain()
end[/code]
meu_1playerhud.hud: http://pastebin.com/raw/kyaxBjJu

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 5:05 pm
by thelegend
Hm..your .lua parts look fine to me. I am not a HUD expert but maybe try the following:
I have taken a look at your .hud and saw you renamed all HUD parts something with meu_. Try keeping the same (stock) names (except for your meshes and textures).

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 5:29 pm
by Marth8880
thelegend wrote:Try keeping the same (stock) names (except for your meshes and textures).
Already tried it, no different. :(

Re: Overlapping HUD

Posted: Tue Feb 09, 2016 6:28 pm
by thelegend
For me and Anakin it worked. There might only be one way left. Create a new test map (Or use one you usually use as a test map) and do the following:

Add DisableSmallMapMiniMap() below functionscriptpostload() and create a new ingame.lvl only munging one single .hud file. This file should only contain your Minimap Group+necessary HUD files (Regarding to your minimap).

Munge both your mission.lvl and ingame.lvl and try this out on your testmap. If it works then something else inside your .hud, .lua file affects this method. If it doesn't work and your minimap is unchanged then you did something wrong. If the second thing occurs then copy and paste the Minimap part I posted before. And again make sure everything has been written correctly.

edit SOLVED!!!:

@Marth: I tested it again and surprisingly I had the same issue you had (Pictures you posted). I compared the stock .hud with mine and found the bad guy inside your file: EventDisable("player1.map.disable")

Remove this line completely and only keep EventEnable("player1.map.enable") in! I did do the same and the bug was gone. Here's my .hud file showing the minimap reposition+all of it's stock contents:
Hidden/Spoiler:
[code]
Map("player1map")
{
PositionSmall(0.9, 0.9, 0.004111, "Viewport")
PositionLarge(0.308639, 999.556811, -38.133076, "Viewport")
PositionSpawn(0.767984, 999.477156, 0.000000, "Viewport")
EventToggleMapMode("player1.map.modeToggle")
EventChangeMapMode("player1.map.mode")
EventPostHide("player1.map.hideCPs")
EventRefreshTarget("player1.map.refreshTarget")
EventRefreshPost("player1.map.refreshPost")
EventRefreshMarker("player1.map.refreshMarker")
EventPlayerIndex("player1.index")
PropagateAlpha(1)
Position(0.917484, 0.110884, 0.004111, "Viewport")
Scale(0.820000, 0.820000, 0.820000)
ZOrder(127)
Alpha(0.850000)
EventEnable("player1.map.enable")

BackdropSmall("BackdropSmall")
{
Mask("map_mask")
TexCoords(0.248419, 0.564873, 0.470641, 0.787095)
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSmall("PlayerFOVSmall")
{
Mesh("hud_map_fov")
ZOrder(123)
}

PlayerDirectionSmall("PlayerDirectionSmall")
{
Mesh("hud_map_fov")
ZOrder(124)
Alpha(0.200000)
Color(255, 255, 0)
}

TargetSmall("TargetSmall")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSmall("PostSmall")
{
BitmapStyle("Shadow")
}

PostTextSmall("PostTextSmall")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSmall("PostSelectSmall")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSmall("MarkerSmall")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSmall("NorthSmall")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.110000, 0.000000, "Viewport")
Scale(2.000000, 2.000000, 2.000000)
ZOrder(127)
}

BackdropLarge("BackdropLarge")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVLarge("PlayerFOVLarge")
{
Mesh("hud_large_map_fov")
ZOrder(0)
Alpha(0.500000)
}

PlayerDirectionLarge("PlayerDirectionLarge")
{
Mesh("hud_map_fov")
ZOrder(124)
Alpha(0.200000)
Color(255, 255, 0)
}

TargetLarge("TargetLarge")
{
BitmapStyle("Shadow")
ZOrder(254)
Color(0, 0, 0)
}

PostLarge("PostLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

PostTextLarge("PostTextLarge")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectLarge("PostSelectLarge")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerLarge("MarkerLarge")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthLarge("NorthLarge")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.375000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

BackdropSpawn("BackdropSpawn")
{
Mask("map_mask")
ZOrder(255)
Alpha(0.500000)
}

PlayerFOVSpawn("PlayerFOVSpawn")
{
ZOrder(123)
}

PlayerDirectionSpawn("PlayerDirectionSpawn")
{
ZOrder(124)
}

TargetSpawn("TargetSpawn")
{
BitmapStyle("Shadow")
ZOrder(126)
Color(0, 0, 0)
}

PostSpawn("PostSpawn")
{
BitmapStyle("Shadow")
}

PostTextSpawn("PostTextSpawn")
{
TextBreak("Word")
TextAlignment("Center", "Bottom")
ZOrder(127)
}

PostSelectSpawn("PostSelectSpawn")
{
Bitmap("hud_icon_flash")
BitmapStyle("Shadow")
}

MarkerSpawn("MarkerSpawn")
{
BitmapStyle("Shadow")
ZOrder(0)
}

NorthSpawn("NorthSpawn")
{
Bitmap("hud_map_northpointer")
BitmapStyle("Shadow")
Position(0.000000, -0.325000, 0.000000, "Viewport")
Scale(5.000000, 5.000000, 5.000000)
ZOrder(127)
}

}
[/code]
Remember PositionLarge and PositionSpawn should be removed completely OR reposed (Y=999 (Out of Screen!)). If not then your screen will look messed up because of Overlapping map_mask.tga's.

I hope this works now for you.

Edit2: Fixed*

Re: Overlapping HUD

Posted: Thu Feb 11, 2016 11:45 am
by Anakin
pretty sure you mean to keep EventEnable("player1.map.enable") :wink:

Re: Overlapping HUD

Posted: Thu Feb 11, 2016 11:53 am
by thelegend
Anakin wrote:pretty sure you mean to keep EventEnable("player1.map.enable") :wink:
* Thanks. Missed that :oops: