Skip to content

Commit 79e13ab

Browse files
notkoentilgep
andcommitted
feat: bosshud
Co-Authored-By: tilgep <66904238+tilgep@users.noreply.github.com>
1 parent 01db762 commit 79e13ab

13 files changed

Lines changed: 2488 additions & 0 deletions

AMBuilder

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ for sdk_target in MMSPlugin.sdk_targets:
6262
'src/discord.cpp',
6363
'src/map_votes.cpp',
6464
'src/entwatch.cpp',
65+
'src/bosshud.cpp',
6566
'src/user_preferences.cpp',
6667
'src/zombiereborn.cpp',
6768
'src/customio.cpp',

PackageScript

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ for task in MMSPlugin.binaries:
112112
cfg_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'cfg', MMSPlugin.metadata['name']))
113113
mapcfg_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'cfg', MMSPlugin.metadata['name'], 'maps'))
114114
gamedata_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'addons', MMSPlugin.metadata['name'], 'gamedata'))
115+
bosshud_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'addons', MMSPlugin.metadata['name'], 'configs', 'bosshud'))
115116
builder.AddCopy(os.path.join('configs', 'admins.jsonc.example'), configs_folder)
116117
builder.AddCopy(os.path.join('configs', 'discordbots.cfg.example'), configs_folder)
117118
builder.AddCopy(os.path.join('configs', 'maplist.jsonc.example'), configs_folder)
@@ -122,6 +123,7 @@ for task in MMSPlugin.binaries:
122123
builder.AddCopy(os.path.join('configs', 'zr', 'hitgroups.cfg.example'), zr_folder)
123124
builder.AddCopy(os.path.join('configs', 'entwatch', 'maps', 'template.jsonc'), ew_maps_folder)
124125
builder.AddCopy(os.path.join('gamedata', 'cs2fixes.jsonc'), gamedata_folder)
126+
builder.AddCopy(os.path.join('configs', 'bosshud', 'template.jsonc'), bosshud_folder)
125127

126128
particles_cs2f_folder = builder.AddFolder(os.path.join(packages[sdk_name].sdk_name, 'particles', MMSPlugin.metadata['name']))
127129
builder.AddCopy(os.path.join('assets', 'particles', MMSPlugin.metadata['name'], 'admin_beacon.vpcf_c'), particles_cs2f_folder)

cfg/cs2fixes/cs2fixes.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ entwatch_score 9999 // Score to give item holders (0 = dont change score at
163163
entwatch_glow 1000 // Distance that dropped item weapon glow will be visible (0 = glow disabled)
164164
entwatch_glow_team 0 // Whether dropped item glow is only visible to the team the item belongs to (0 = glow to all players)
165165

166+
// BossHud Settings
167+
bosshud_enable 1 // INCOMPATIBLE WITH CS#. Whether to enable BossHud features
168+
bosshud_simplehud 0 // Whether a simple BossHud is shown on maps without a config
169+
bosshud_scoreboard 1 // Whether boss hits are displayed as assists on scoreboard
170+
bosshud_tophits 1 // Whether top boss deamage is displayed after boss death
171+
bosshud_reward 0 // Money rewarded to players per boss hit
172+
bosshud_hitmarker 1 // Whether to enable hitmarkers for bosses
173+
bosshud_hitmarker_particle "particles/hitmarker/hitmarker_boss.vpcf" // The particle to use for boss hitmarker
174+
bosshud_rate 0.1 // How often does BossHud update
175+
bosshud_maxhp 500000 // Bosses with more than this HP will not start showing on the HUD (0.0 = no limit)
176+
166177
// Hud settings
167178
cs2f_fix_hud_flashing 0 // Whether to fix hud flashing using a workaround, this BREAKS warmup so pick one or the other
168179
cs2f_disable_hud_outside_round 0 // Whether to disable hud messages that would flash when a round is not ongoing, since flashing fix cannot run then

configs/bosshud/template.jsonc

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
//====================================================================================================
2+
// Notes:
3+
// - The type of boss is determined based on if "breakable" or "counter" is used
4+
// - You can specify entities using hammerid by starting with "#" followed by hammerid (ex. "#123456")
5+
// - Each separate boss needs a separate entry
6+
//====================================================================================================
7+
8+
[
9+
{
10+
"name": "", // OPTIONAL - (string) Name of boss that appears in hud
11+
"breakable": "", // Targetname/Hammerid of breakable
12+
"counter": "", // Targetname/Hammerid of counter
13+
"iterator": "", // OPTIONAL - Targetname/Hammerid of hp iterator (segments)
14+
"backup": "", // OPTIONAL - Targetname/Hammerid of hp backup
15+
16+
"trigger": // OPTIONAL - Specifies the event that triggers the boss
17+
{
18+
"ent": "", // (string) Targetname/Hammerid of entity
19+
"output": "", // (string) Output of entity
20+
"delay": 0.0 // OPTIONAL - (float) Delay after output that starts boss
21+
},
22+
23+
"showtrigger": // OPTIONAL - Specifies event that starts displaying boss health
24+
{
25+
"ent": "", // (string) Targetname/Hammerid of entity
26+
"output": "", // (string) Output of entity
27+
"delay": 0.0 // OPTIONAL - (float) Delay after event that shows boss health
28+
},
29+
30+
"killtrigger": // OPTIONAL - Specifies event that force kills the boss
31+
{
32+
"ent": "", // (string) Targetname/Hammerid of entity
33+
"output": "", // (string) Output of entity
34+
"delay": 0.0 // OPTIONAL - (float) Delay after event that force kills boss
35+
},
36+
37+
"hurttrigger": // OPTIONAL - Specifies event that is considered as damaging the boss
38+
{
39+
"ent": "", // (string) Targetname/hammerid of entity
40+
"output": "" // (string) Output of entity
41+
},
42+
43+
"reversecounter": false, // OPTIONAL - (bool) Whether counter should be reversed
44+
"reverseiterator": false, // OPTIONAL - (bool) Whether iterator should be reversed
45+
"hitmarkeronly": false, // OPTIONAL - (bool) Whether only hitmarkers should be shown when hitting boss
46+
"minorhud": false, // OPTIONAL - (bool) Whether boss should should be displayed as no-bar hud variant
47+
"multitrigger": false, // OPTIONAL - (bool) Whether boss can be triggered multiple times (multiple instances)
48+
"templated": false, // OPTIONAL - (bool) Whether boss is templated and has name fixup
49+
"showbeaten": true, // OPTIONAL - (bool) Whether top boss damage should be displayed after boss death
50+
"timeout": 0.0, // OPTIONAL - (float) Specify time before boss health is hidden after taking no damage
51+
"offset": 0.0, // OPTIONAL - (float) Specify amount of health to ADD to displayed health (negative to subtract)
52+
"offsetiterator": 0.0, // OPTIONAL - (float) Specify amount of iterator segments to ADD to displayed health (negative to subtract)
53+
"maxhp": 0.0 // OPTIONAL - (float) If the boss has more than this HP, it will not start showing on the HUD (0.0 = no limit)
54+
},
55+
56+
// Breakable boss example
57+
{
58+
"name": "",
59+
"breakable": ""
60+
},
61+
62+
// Counter example
63+
{
64+
"name": "",
65+
"counter": ""
66+
},
67+
68+
// Counter, backup, and iterator example
69+
{
70+
"name": "",
71+
"counter": "",
72+
"backup": "",
73+
"iterator": ""
74+
},
75+
76+
// Counter and iterator example
77+
{
78+
"name": "",
79+
"counter": "",
80+
"iterator": ""
81+
},
82+
83+
// Breakable and iterator example
84+
{
85+
"name": "",
86+
"breakable": "",
87+
"iterator": ""
88+
}
89+
]

0 commit comments

Comments
 (0)