Objective Hint Icons

Maps can support this feature by adding a new HelpIcons block to the .siege file (just like the AutoMap block). The best way to see how this works is to open up a .siege file which already has HelpIcons and compare for your own uses what is relevant/what works for your map.

## Style Guide

* Primary Objectives
	+ Should be visible to both teams.
	+ Spectator gets whatever the applicable defending team icon is.
* Secondary Objectives
	+ Should be visible to both teams and marked as a side objective.
	+ Spectator gets whatever the applicable defending team icon is.
* Siege Items
	+ These do not really have a standard as the setup is highly map dependent. Marking the areas where an item is picked up or taken should normally be done, but you may not always wish to show information like the item's current location to both teams (think of the importance of fog of war with maps like Scarif).
* Other (hack points that unlock a door right next to you, optional map interactive features, etc.)
	+ Should only be visible to teams that can interact with it, and no icon for spectator.
	+ Should always use a radius to limit visibility range (start with 500 and adjust as necessary).
* Considerations
	+ Try to place icons as close to the interactive object as possible, but avoid getting in the way of visibility. This might mean putting the icon above or below where the actual objective is.
	+ If an objective has multiple parts in a small area, like hack point and destructible options that can do the same thing, cluster the icons in a parent/child relationship so only one icon appears at range. A good initial childradius to start with is 800.
	+ Consider using the needvisible flag for icons related to non-objective interactions, especially where you do not necessarily want to lead players toward it, but only hint that that part of the map can be interacted with. You might also want to use needvisible in situations where you would not want the icon to show up through walls from a position where the icon cannot be reached.
	+ If needing complex dynamic icons (such as toggling between two or more states) this must be scripted.

### Example:

Here is an example for Lunar Base:

```
    HelpIcon0
    {
        end0        "hacka"
        origin    "530 2496 480"
        redicon    HLP\_CUSTOM
        redcustomicon    "sprites/team\_red"
        blueicon HLP\_CUSTOM
        bluecustomicon    "sprites/team\_blue"
    }

    HelpIcon11
    {
        start0        "hacka"
        //just did this to test out start options

        end0        "gendeath"
        origin    "24 -448 208"
        redicon    HLP\_CUSTOM
        redcustomicon    "sprites/team\_red"
        blueicon HLP\_CUSTOM
        bluecustomicon    "sprites/team\_blue"
    }

    HelpIcon20
    {
        end0        "gendeath"
        origin    "244 400 240"
        redicon    HLP\_CUSTOM
        redcustomicon    "sprites/team\_red"
        blueicon HLP\_CUSTOM
        bluecustomicon    "sprites/team\_blue"
        radius    1250 //only if nearby!

    }

```

A map can have up to 64 help icons: HelpIcon0 through to HelpIcon63. There's no need for them to be numbered sensibly as shown in the example, but it's recommended.

## Keys

Quick run through of keys for the HelpIconXs:

### start0, start1, start2 and start3

targetnames that cause this icon to start showing. If none of these are set, then the icon will start the round showing.

### end0, end1, end2 and end3

targetnames that cause this icon to *stop* showing.

### origin

the point in the level that the icon should be displayed at.

### redicon, blueicon and specicon

are the icon types shown to red team, blue team and spectator. if they are missing or set to HLP\_NONE, the icon is not shown for that team. they may be set to one of the list below to use default MB2 icons, or to HLP\_CUSTOM to use a custom icon.

### redcustomicon, bluecustomicon and speccustomicon

the icon paths corresponding to HLP\_CUSTOM.

### radius

allows icons to only be shown if the player is closer than radius units.

### childradius

for parent icons. if the player is further than childradius units, the parent icon is shown. otherwise, the child icons are shown.

### parent

allows icons to have another icon marked as a parent, so that their visibility is controlled by its childradius parameter.

### sideobjective 1

marks an objective as a side objective.

May be used to draw a smaller icon or not draw an icon depending on the cg\_drawSiegeHelp setting.

### dynamic 1

marks an objective as corresponding to a networked entity (e.g. an npc or misc\_siege\_item). either dynamic or an origin can be set, not both.

### needvisible 1

marks an objective icon as only showing if you have a clear line of sight to it (i.e. not through walls). not currently implemented

### Built-in icon types

```
HLP_CAPTURE //default capture icon

```

```
HLP_CAPTURE_SUB //less detailed capture icon for subobjectives

```

```
HLP_DEFEND //default defend icon
HLP_DEFEND_SUB //less detailed defend icon for subobjectives

```

```
HLP_DESTROY //default destroy icon

```

```
HLP_DESTROY_SUB //less detailed destroy icon for subobjectives

```

```
HLP_ESCORT //NPC escort icon

```

```
HLP_HACK //default hack icon

```

```
HLP_HACK_SUB //less detailed hack icon for subobjectives

```

```
HLP_HACKDESTROY //default hack + destroy icon

```

```
HLP_ITEM //item icon

```

```
HLP_ITEM_DROPOFF //item dropoff point icon

```

```
HLP_ITEM_PICKUP //item pickup point icon

```

```
HLP_PAYLOAD //payload icon

```

```
HLP_FLAG //neutral flag

```

```
HLP_FLAG_RED //red flag

```

```
HLP_FLAG_BLUE //blue flag

```

```
HLP_FLAG_RED_DROP //dropped red flag

```

```
HLP_FLAG_BLUE_DROP //dropped blue flag

```

```
HLP_FLAG_DROP //dropped neutral flag

```

```
HLP_AMMO //ammo resupply station

```

```
HLP_HEALTH //health resupply station

```

## Dynamic icons

Networked entities that move around (NPCs / misc\_siege\_item / misc\_hologram) should have an entity key/value pair

```
helpiconindex N

```

where N corresponds to a help icon block HelpIconN in the .siege file with dynamic set.

For example, R2D2's spawner might have:

```
helpiconindex 22

```

with a corresponding block in the .siege file:

```
    HelpIcon22
    {
        dynamic 1
        redicon  HLP\_ESCORT
        blueicon HLP\_DESTROY
        specicon HLP\_CUSTOM
        speccustomicon "picture\_of\_r2"
    }

```

For a misc\_hologram, you should set key/value pairs:

```
helpiconindex N

```

```
helpiconindexteam1 X

```

```
helpiconindexteam2 Y

```

where N, X and Y correspond to the help icons with dynamic 1 set that you want to show when nobody is controlling it, rebs are controlling it and imps are controlling it respectively.

Clientside display of the icons is controlled by cg\_drawSiegeHelp (currently, 0 is off and 1 is all icons big, 2 is normal icons big / sideobjective icons small, 3 is normal icons big / no sideobjective icons shown).

These are the current paths to the icons:

```
   [HLP_CAPTURE] = "gfx/2d/hud/hlp_capture
   [HLP_CAPTURE_SUB] = "gfx/2d/hud/hlp_capture2"
   [HLP_DEFEND] = "gfx/2d/hud/hlp_defend");
   [HLP_DEFEND_SUB] = "gfx/2d/hud/hlp_defend2"
   [HLP_DESTROY] = "gfx/2d/hud/hlp_destroy"
   [HLP_DESTROY_SUB] = "gfx/2d/hud/hlp_destroy2"
   [HLP_ESCORT] = "gfx/2d/hud/hlp_escort"
   [HLP_HACK] = "gfx/2d/hud/hlp_hack"
   [HLP_HACK_SUB] = "gfx/2d/hud/hlp_hack2"
   [HLP_HACKDESTROY] = "gfx/2d/hud/hlp_hackdestroy"
   [HLP_ITEM] = "gfx/2d/hud/hlp_item3"
   [HLP_ITEM_DROPOFF] = "gfx/2d/hud/hlp_item2"
   [HLP_ITEM_PICKUP] = "gfx/2d/hud/hlp_item"
   [HLP_PAYLOAD] = "gfx/2d/hud/hlp_payload"

```

Custom Icons also need a custom shader for the best appearance:

```
gfx/2d/hud/hlp_capture
}
nopicmip
   notc
   {
       map gfx/2d/hud/hlp_capture
       blendFunc blend
       alphagen vertex
       rgbgen vertex
   }
}

```