Hud Elements - MarklyThomas/Secret-Repo GitHub Wiki

Lives icon:

To get the hud to show up, make sure you change the name of the hud to hud_lives_icon_slotX and it should show up in the main game. Put this in your json file

{
    "hud_lives_icon_slotX":  { "File": "CharIcon.bmp", "Rect": "0,0,16,16", "Center": "0,0" }
}

Monitors:

Go to the function function u64 ExtraChar.getIconSpriteKey_charX(u8 type), “X” being the number of your character in charX.lemon. Pick a name for the monitor icon, like monitor_icon_ben, or whatever your character’s name is. Put this in your json file

{
    "hud_lives_icon_slotX":  { "File": "CharIcon.bmp", "Rect": "0,0,16,16", "Center": "0,0" },
    "monitor_icon_ben":  { "File": "MonitorIcon.bmp", "Rect": "0,17,16,16", "Center": "8,8" }
}

Put this in your lemon file

function u64 ExtraChar.getIconSpriteKey_charX(u8 type)
{
	if (type == 0x01)
		return "monitor_icon_ben"
	else
		return base.ExtraChar.getIconSpriteKey_char3(type)

	return 0x00
}

If you wanna have support for Blue Glasses Eggman’s monitors, you’d add this.

function u64 ExtraChar.getIconSpriteKey_char3(u8 type)
{
	if (type == 0x01)
		return "monitor_icon_ben"
	else if (type == 0x02 && Renderer.hasCustomSprite("eggman-lrz-blue-12") && System.getGlobalVariableValueByName("EggmanBlue.disableMonitorReplacement") != 1)
		return "monitor_icon_eggman"
	else
		return base.ExtraChar.getIconSpriteKey_char3(type)

	return 0x00
}

Signpost:

Rename the signpost to signpost_slotX_0x0Y. The first X being the slot your character occupies, and the Y being the character that your’s is using as a base.

0 = Sonic
1 = Tails
2 = Knuckles

Other icons:

  • Continue icons should be named:continue_icon_slotX
  • The little flame icon when you see the results screen should be named: hud_bonus_icon_slotX
  • The nameplate icons when you see the results screen should be named:
    • result_nameplate_slotX - Name
    • result_nameplate_slotX_super - Super
    • result_nameplate_slotX_hyper - Hyper