Skip to content

Commit

Permalink
Extensions, Mess fixes, Defence improvements, scoreboard tweaks (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Watson <--global>
  • Loading branch information
shrimpza authored Apr 15, 2022
1 parent 8e43477 commit e8b33d4
Show file tree
Hide file tree
Showing 28 changed files with 1,004 additions and 585 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 610 to 611:
- Moved logic for several actions into separate "extension" classes:
- `MonsterHuntScoreExtension`: Allows implementation of custom scoring for monster kills and player deaths
- `MonsterHuntBotExtension`: Moves all the bot orders and other checks out of game code, and allows custom behaviour
- `MonsterHuntMonsterExtension`: Allows implementation of custom monster skill settings and behaviours
- These are all configurable on the MonsterHunt gametypes
- Support for green blood splats in the Monster Mess mutator
- Fix missing Monster Mess splats in multiplayer clients
- Improve visual effects of Defence escape portal
- Reduce occurrences of Enemy AccessNone logs in Defence
- Fix overlapping lives/ping stats on multiplayer scoreboard
- Show monster difficulty on multiplayer scoreboard

## 609 to 610:
- Updated spanish definitions (thanks Neon_Knight)
- New Mutator - Monster Mess; monster corpses and giblets leave blood splats
Expand Down
4 changes: 2 additions & 2 deletions buildscript/buildconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SCRIPTS_DIR=$(dirname $(realpath $0))

export name="Monster Hunt"
export package=MonsterHunt
export build=610
export version=610
export build=611
export version=611
export packagefull=$package
export packagedist=$package$version
export debug=1
Expand Down
17 changes: 16 additions & 1 deletion resources/Help/MonsterHunt/ReadMe.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h2 id="credits">Credits</h2>
<ul>
<li>Programming, graphics, website &amp; help files:
<ul>
<li>Kenneth "Shrimp" Watson</li>
<li><a href="https://shrimpworks.za.net/">Kenneth "Shrimp" Watson</a></li>
</ul>
</li>

Expand Down Expand Up @@ -312,6 +312,21 @@ <h2 id="credits">Credits</h2>
<section>
<h2 id="history">Release History</h2>

<h3>Release 17 (611)</h3>
<ul>
<li>Moved logic for several actions into separate "extension" classes:<br/>
- `MonsterHuntScoreExtension`: Allows implementation of custom scoring for monster kills and player deaths<br/>
- `MonsterHuntBotExtension`: Moves all the bot orders and other checks out of game code, and allows custom behaviour<br/>
- `MonsterHuntMonsterExtension`: Allows implementation of custom monster skill settings and behaviours<br/>
- These are all configurable on the MonsterHunt gametypes
<li>Support for green blood splats in the Monster Mess mutator
<li>Fix missing Monster Mess splats in multiplayer clients
<li>Improve visual effects of Defence escape portal
<li>Reduce occurrences of Enemy AccessNone logs in Defence
<li>Fix overlapping lives/ping stats on multiplayer scoreboard
<li>Show monster difficulty on multiplayer scoreboard
</ul>

<h3>Release 16 (610)</h3>
<ul>
<li>Updated spanish definitions (thanks Neon_Knight)
Expand Down
12 changes: 6 additions & 6 deletions src/Classes/MonsterBoard.uc
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ function DrawTrailer(canvas Canvas) {
PlayerOwner = PlayerPawn(Owner);
GRI = PlayerPawn(Owner).GameReplicationInfo;

if (Level.Game.IsA('MonsterHunt') && GRI.IsA('MonsterReplicationInfo')) {
if (GRI.IsA('MonsterReplicationInfo')) {
DifficultyQuote = class'MonsterHuntRules'.default.Skills[
class'MonsterHuntRules'.static.TranslateMonsterSkillIndex(MonsterReplicationInfo(GRI).MonsterSkill)
] @ MonsterDifficultyJoinString;
} else {
DifficultyQuote = "";
}

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

// Draw FPH
Canvas.TextSize(FPHString $ ": 999", XL2, YL2);
Canvas.SetPos(Canvas.ClipX * 0.75 + XL, YOffset + 0.5 * YL);
Canvas.SetPos(Canvas.ClipX * 0.8 + XL, YOffset + 0.5 * YL);
Canvas.DrawText(FPHString $ ": " @ int(60 * PRI.Score / Time), false);
XL3 = FMax(XL3, XL2);
// Draw Ping
Canvas.SetPos(Canvas.ClipX * 0.75 + XL + XL3 + 16, YOffset);
Canvas.SetPos(Canvas.ClipX * 0.8 + XL + XL3 + 16, YOffset);
Canvas.DrawText(PingString $ ":" @ PRI.Ping, false);
// Draw Packetloss
Canvas.SetPos(Canvas.ClipX * 0.75 + XL + XL3 + 16, YOffset + 0.5 * YL);
Canvas.SetPos(Canvas.ClipX * 0.8 + XL + XL3 + 16, YOffset + 0.5 * YL);
Canvas.DrawText(LossString $ ":" @ PRI.PacketLoss $ "%", false);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/Classes/MonsterDefenceEscape.uc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ function Touch(Actor Other) {
}

simulated function PostBeginPlay() {
local MonsterDefenceFlare scaler;
LoopAnim('Teleport', 2.0, 0.0);
Spawn(class'{{package}}.MonsterDefenceFlare',,, Location);
scaler = Spawn(class'{{package}}.MonsterDefenceFlare',,, Location);
if (scaler != None) scaler.SetScaleMode();
}

function SpawnEffect(Pawn other) {
Expand Down
50 changes: 50 additions & 0 deletions src/Classes/MonsterDefenceFlare.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// ============================================================
// MonsterDefenceFlare
// ============================================================
// === Monster Hunt ===
//
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
// For more info, https://shrimpworks.za.net
// ============================================================

class MonsterDefenceFlare extends Effects;

#exec Texture Import File=textures\MHDFlare.pcx Name=MHDFlare
#exec Texture Import File=textures\MHDFlare2.pcx Name=MHDFlare2

var bool bScaleMode;

var bool bIncrease;

function SetScaleMode() {
bScaleMode = true;
if (bScaleMode) Texture=Texture'{{package}}.MHDFlare2';
}

simulated function Tick(float DeltaTime) {
if (Level.NetMode != NM_DedicatedServer) {
if (bScaleMode) {
if (bIncrease) DrawScale += 0.7 * DeltaTime;
else DrawScale -= 0.7 * DeltaTime;

if (DrawScale >= 1) bIncrease = false;
else if (DrawScale <= 0.4) bIncrease = true;
else if (FRand() > 0.975) bIncrease = !bIncrease;
} else {
if (bIncrease) ScaleGlow += 1.0 * DeltaTime;
else ScaleGlow -= 1.0 * DeltaTime;

if (ScaleGlow >= 1.0) bIncrease = false;
else if (ScaleGlow <= 0.4) bIncrease = true;
else if (FRand() > 0.975) bIncrease = !bIncrease;
}
}
}

defaultproperties {
bScaleMode=False
bIncrease=False
DrawType=DT_Sprite
Style=STY_Translucent
Texture=Texture'{{package}}.MHDFlare'
}
Loading

0 comments on commit e8b33d4

Please sign in to comment.