Differentiate buildings from players

TyphonTyphon Join Date: 2002-11-01 Member: 1899Members
edited August 2012 in Modding
<div class="IPBDescription">my first mod</div>After a lot of trial and error and finally giving up and reading some documentation, I have success! I'm sure there's a better way of doing this, but this works. It makes the static team-colored things on the maps a little darker and adds some blue, so that its easier to tell players apart from structures on the minimap.

In GUIMinimap.lua - function GUIMinimap:SetStaticBlip add the following after it resizes the eggs:

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>// Differentiate structures from players
if blipType == kMinimapBlipType.Sentry or blipType == kMinimapBlipType.CommandStation or
blipType == kMinimapBlipType.CommandStationL2 or blipType == kMinimapBlipType.CommandStationL3 or
blipType == kMinimapBlipType.Extractor or blipType == kMinimapBlipType.InfantryPortal or
blipType == kMinimapBlipType.Armory or blipType == kMinimapBlipType.PhaseGate or
blipType == kMinimapBlipType.Observatory or blipType == kMinimapBlipType.RoboticsFactory or
blipType == kMinimapBlipType.ArmsLab or blipType == kMinimapBlipType.PrototypeLab or
blipType == kMinimapBlipType.PowerPack or blipType == kMinimapBlipType.Hive or blipType == kMinimapBlipType.Harvester or
blipType == kMinimapBlipType.Hydra or blipType == kMinimapBlipType.Egg or blipType == kMinimapBlipType.Crag or
blipType == kMinimapBlipType.Whip or blipType == kMinimapBlipType.Shade or blipType == kMinimapBlipType.Shift then
blipColor = Color(blipColor.r*.8, blipColor.g*.8, blipColor.b+0.5, 1)
end</div>

Comments

  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    edited August 2012
    Heh, there is a better way to do this and it doesn't involve any code. :)

    If you look at the ns2\ui\minimap_blip.dds texture, all of the icons have very low brightness. The brightest spots on the player icons are about a 128-ish gray, which I find pretty ridiculous. So, in Insight and my HUD mod, I changed the textures so all player icons are MUCH brighter (<a href="https://pickhost.eu/images/0005/2033/minimap_blip.png" target="_blank">looks like this</a>). This has a huge effect on visibility/contrast while still preserving the original colors on the buildings. I'd really like to have something like this in the official game.

    By the way, good thing you decided to use "blipColor = Color(blipColor.r*.8, blipColor.g*.8, blipColor.b+0.5, 1)" instead of modifying each color component individually. It would break everything completely, trust me.
  • TyphonTyphon Join Date: 2002-11-01 Member: 1899Members
    Ah, I was wondering why even at full brightness in Color() the icons were so dark.
Sign In or Register to comment.