Skip to content

Commit e8b33d4

Browse files
authored
Extensions, Mess fixes, Defence improvements, scoreboard tweaks (#26)
Co-authored-by: Kenneth Watson <--global>
1 parent 8e43477 commit e8b33d4

28 files changed

+1004
-585
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 610 to 611:
4+
- Moved logic for several actions into separate "extension" classes:
5+
- `MonsterHuntScoreExtension`: Allows implementation of custom scoring for monster kills and player deaths
6+
- `MonsterHuntBotExtension`: Moves all the bot orders and other checks out of game code, and allows custom behaviour
7+
- `MonsterHuntMonsterExtension`: Allows implementation of custom monster skill settings and behaviours
8+
- These are all configurable on the MonsterHunt gametypes
9+
- Support for green blood splats in the Monster Mess mutator
10+
- Fix missing Monster Mess splats in multiplayer clients
11+
- Improve visual effects of Defence escape portal
12+
- Reduce occurrences of Enemy AccessNone logs in Defence
13+
- Fix overlapping lives/ping stats on multiplayer scoreboard
14+
- Show monster difficulty on multiplayer scoreboard
15+
316
## 609 to 610:
417
- Updated spanish definitions (thanks Neon_Knight)
518
- New Mutator - Monster Mess; monster corpses and giblets leave blood splats

buildscript/buildconfig.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SCRIPTS_DIR=$(dirname $(realpath $0))
77

88
export name="Monster Hunt"
99
export package=MonsterHunt
10-
export build=610
11-
export version=610
10+
export build=611
11+
export version=611
1212
export packagefull=$package
1313
export packagedist=$package$version
1414
export debug=1

resources/Help/MonsterHunt/ReadMe.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h2 id="credits">Credits</h2>
268268
<ul>
269269
<li>Programming, graphics, website &amp; help files:
270270
<ul>
271-
<li>Kenneth "Shrimp" Watson</li>
271+
<li><a href="https://shrimpworks.za.net/">Kenneth "Shrimp" Watson</a></li>
272272
</ul>
273273
</li>
274274

@@ -312,6 +312,21 @@ <h2 id="credits">Credits</h2>
312312
<section>
313313
<h2 id="history">Release History</h2>
314314

315+
<h3>Release 17 (611)</h3>
316+
<ul>
317+
<li>Moved logic for several actions into separate "extension" classes:<br/>
318+
- `MonsterHuntScoreExtension`: Allows implementation of custom scoring for monster kills and player deaths<br/>
319+
- `MonsterHuntBotExtension`: Moves all the bot orders and other checks out of game code, and allows custom behaviour<br/>
320+
- `MonsterHuntMonsterExtension`: Allows implementation of custom monster skill settings and behaviours<br/>
321+
- These are all configurable on the MonsterHunt gametypes
322+
<li>Support for green blood splats in the Monster Mess mutator
323+
<li>Fix missing Monster Mess splats in multiplayer clients
324+
<li>Improve visual effects of Defence escape portal
325+
<li>Reduce occurrences of Enemy AccessNone logs in Defence
326+
<li>Fix overlapping lives/ping stats on multiplayer scoreboard
327+
<li>Show monster difficulty on multiplayer scoreboard
328+
</ul>
329+
315330
<h3>Release 16 (610)</h3>
316331
<ul>
317332
<li>Updated spanish definitions (thanks Neon_Knight)

src/Classes/MonsterBoard.uc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ function DrawTrailer(canvas Canvas) {
7272
PlayerOwner = PlayerPawn(Owner);
7373
GRI = PlayerPawn(Owner).GameReplicationInfo;
7474

75-
if (Level.Game.IsA('MonsterHunt') && GRI.IsA('MonsterReplicationInfo')) {
75+
if (GRI.IsA('MonsterReplicationInfo')) {
7676
DifficultyQuote = class'MonsterHuntRules'.default.Skills[
7777
class'MonsterHuntRules'.static.TranslateMonsterSkillIndex(MonsterReplicationInfo(GRI).MonsterSkill)
7878
] @ MonsterDifficultyJoinString;
7979
} else {
8080
DifficultyQuote = "";
8181
}
8282

83-
if ((Level.NetMode == NM_Standalone) && Level.Game.IsA('MonsterHunt')) {
83+
if ((Level.NetMode == NM_Standalone)) {
8484
TitleQuote = GRI.GameName @ MapTitle @ MapTitleQuote $ Level.Title $ MapTitleQuote;
8585
if (DeathMatchPlus(Level.Game).bNoviceMode) {
8686
TitleQuote = class'ChallengeBotInfo'.default.Skills[Level.Game.Difficulty] @ TitleQuote;
@@ -210,21 +210,21 @@ function DrawNameAndPing(Canvas Canvas, PlayerReplicationInfo PRI, float XOffset
210210
// Draw Time
211211
Time = Max(1, (Level.TimeSeconds + PlayerOwner.PlayerReplicationInfo.StartTime - PRI.StartTime) / 60);
212212
Canvas.TextSize(TimeString $ ": 999", XL3, YL3);
213-
Canvas.SetPos(Canvas.ClipX * 0.75 + XL, YOffset);
213+
Canvas.SetPos(Canvas.ClipX * 0.8 + XL, YOffset);
214214
Canvas.DrawText(TimeString $ ":" @ Time, false);
215215

216216
// Draw FPH
217217
Canvas.TextSize(FPHString $ ": 999", XL2, YL2);
218-
Canvas.SetPos(Canvas.ClipX * 0.75 + XL, YOffset + 0.5 * YL);
218+
Canvas.SetPos(Canvas.ClipX * 0.8 + XL, YOffset + 0.5 * YL);
219219
Canvas.DrawText(FPHString $ ": " @ int(60 * PRI.Score / Time), false);
220220
221221
XL3 = FMax(XL3, XL2);
222222
// Draw Ping
223-
Canvas.SetPos(Canvas.ClipX * 0.75 + XL + XL3 + 16, YOffset);
223+
Canvas.SetPos(Canvas.ClipX * 0.8 + XL + XL3 + 16, YOffset);
224224
Canvas.DrawText(PingString $ ":" @ PRI.Ping, false);
225225
226226
// Draw Packetloss
227-
Canvas.SetPos(Canvas.ClipX * 0.75 + XL + XL3 + 16, YOffset + 0.5 * YL);
227+
Canvas.SetPos(Canvas.ClipX * 0.8 + XL + XL3 + 16, YOffset + 0.5 * YL);
228228
Canvas.DrawText(LossString $ ":" @ PRI.PacketLoss $ "%", false);
229229
}
230230
}

src/Classes/MonsterDefenceEscape.uc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ function Touch(Actor Other) {
2626
}
2727

2828
simulated function PostBeginPlay() {
29+
local MonsterDefenceFlare scaler;
2930
LoopAnim('Teleport', 2.0, 0.0);
31+
Spawn(class'{{package}}.MonsterDefenceFlare',,, Location);
32+
scaler = Spawn(class'{{package}}.MonsterDefenceFlare',,, Location);
33+
if (scaler != None) scaler.SetScaleMode();
3034
}
3135

3236
function SpawnEffect(Pawn other) {

src/Classes/MonsterDefenceFlare.uc

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// ============================================================
2+
// MonsterDefenceFlare
3+
// ============================================================
4+
// === Monster Hunt ===
5+
//
6+
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
7+
// For more info, https://shrimpworks.za.net
8+
// ============================================================
9+
10+
class MonsterDefenceFlare extends Effects;
11+
12+
#exec Texture Import File=textures\MHDFlare.pcx Name=MHDFlare
13+
#exec Texture Import File=textures\MHDFlare2.pcx Name=MHDFlare2
14+
15+
var bool bScaleMode;
16+
17+
var bool bIncrease;
18+
19+
function SetScaleMode() {
20+
bScaleMode = true;
21+
if (bScaleMode) Texture=Texture'{{package}}.MHDFlare2';
22+
}
23+
24+
simulated function Tick(float DeltaTime) {
25+
if (Level.NetMode != NM_DedicatedServer) {
26+
if (bScaleMode) {
27+
if (bIncrease) DrawScale += 0.7 * DeltaTime;
28+
else DrawScale -= 0.7 * DeltaTime;
29+
30+
if (DrawScale >= 1) bIncrease = false;
31+
else if (DrawScale <= 0.4) bIncrease = true;
32+
else if (FRand() > 0.975) bIncrease = !bIncrease;
33+
} else {
34+
if (bIncrease) ScaleGlow += 1.0 * DeltaTime;
35+
else ScaleGlow -= 1.0 * DeltaTime;
36+
37+
if (ScaleGlow >= 1.0) bIncrease = false;
38+
else if (ScaleGlow <= 0.4) bIncrease = true;
39+
else if (FRand() > 0.975) bIncrease = !bIncrease;
40+
}
41+
}
42+
}
43+
44+
defaultproperties {
45+
bScaleMode=False
46+
bIncrease=False
47+
DrawType=DT_Sprite
48+
Style=STY_Translucent
49+
Texture=Texture'{{package}}.MHDFlare'
50+
}

0 commit comments

Comments
 (0)