Skip to content

Commit 8e43477

Browse files
authored
Localisation, Monster Mess mutator, HUD fix, pickup messages (#25)
Co-authored-by: Kenneth Watson <--global>
1 parent ee1f1e3 commit 8e43477

File tree

10 files changed

+235
-8
lines changed

10 files changed

+235
-8
lines changed

CHANGELOG.md

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

3+
## 609 to 610:
4+
- Updated spanish definitions (thanks Neon_Knight)
5+
- New Mutator - Monster Mess; monster corpses and giblets leave blood splats
6+
- Unreal ammo and pickup messages appear as UT HUD messages rather than in the chat log
7+
- Fix positioning of MH HUD icon when growing or shrinking HUD
8+
39
## 608 to 609:
410
- Properly support `bEnabled` on `MonsterWaypoint`, to allow for more complex AI navigation orchestration
511
- waypoint can now be disabled at start, and then triggered to enable (default is enabled)

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=609
11-
export version=609
10+
export build=610
11+
export version=610
1212
export packagefull=$package
1313
export packagedist=$package$version
1414
export debug=1

resources/Help/MonsterHunt/ReadMe.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ <h2 id="credits">Credits</h2>
288288
</ul>
289289
</li>
290290

291+
<li>Localisation:
292+
<ul>
293+
<li>Neon_Knight (Spanish)</li>
294+
</ul>
295+
</li>
296+
291297
<li>Special thanks:
292298
<ul>
293299
<li>Valkyrie</li>
@@ -306,6 +312,30 @@ <h2 id="credits">Credits</h2>
306312
<section>
307313
<h2 id="history">Release History</h2>
308314

315+
<h3>Release 16 (610)</h3>
316+
<ul>
317+
<li>Updated spanish definitions (thanks Neon_Knight)
318+
<li>New Mutator - Monster Mess; monster corpses and giblets leave blood splats
319+
<li>Unreal ammo and pickup messages appear as UT HUD messages rather than in the chat log
320+
<li>Fix positioning of MH HUD icon when growing or shrinking HUD
321+
</ul>
322+
323+
<h3>Release 15 (609)</h3>
324+
<ul>
325+
<li>Properly support `bEnabled` on `MonsterWaypoint`, to allow for more complex AI navigation orchestration<br/>
326+
waypoint can now be disabled at start, and then triggered to enable (default is enabled)
327+
<li>Adjust bot behaviour to try to clear monsters in an area before proceeding to next waypoint
328+
<li>Localisation templates and Spanish Localisation (thanks Neon_Knight)
329+
<li>Update build scripts/templates to support localised template variables
330+
<li>Optimise `MonsterWaypoint` startup, only do `AllActors` traversal if/when touched and only if events configured
331+
<li>Add icons on the scoreboard:<br/>
332+
a skull for players with no remaining lives<br/>
333+
a star "award" at the end for players with no deaths for the whole round
334+
<li>Re-worked and improved MH-Revenge]\[ map, included as MH-Revenge]\[-SE
335+
<li>Add option to hide objectives on HUD. Can be Set in `User.ini`:<br/>
336+
under `[MonsterHunt.MonsterHUD]` section, set `bHideObjectives=true` (default is false)
337+
</ul>
338+
309339
<h3>Release 14 (608)</h3>
310340
<ul>
311341
<li>Re-worked and improved MH-NaliVillage]\[ map, included as MH-NaliVillage][-SE

src/Classes/MonsterBase.uc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {
120120

121121
if (Other.IsA('Pickup')) {
122122
Pickup(Other).bAutoActivate = true;
123+
// makes Unreal pickup messages appear on the HUD like UT ones
124+
if (Pickup(Other).PickupMessageClass == None) {
125+
Pickup(Other).PickupMessageClass = Class'PickupMessagePlus';
126+
}
123127
if (Other.IsA('TournamentPickup')) return true;
124128
}
125129

src/Classes/MonsterHUD.uc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ simulated function DrawStatus(Canvas Canvas) {
149149
150150
Canvas.DrawColor = HUDColor;
151151
if (bHideStatus && bHideAllWeapons) {
152-
X = 0.5 * Canvas.ClipX - 128 * Scale;
153-
Y = Canvas.ClipY - 64 * Scale;
152+
X = Canvas.ClipX - 140 * Scale;
153+
Y = 0;
154+
} else if (bHideStatus) {
155+
X = Canvas.ClipX - 140 * Scale;
156+
Y = 128 * Scale;
154157
} else {
155158
X = Canvas.ClipX - 128 * Scale * StatusScale - 140 * Scale;
156159
Y = 128 * Scale;
@@ -175,17 +178,20 @@ simulated function Message(PlayerReplicationInfo PRI, coerce string Msg, name Ms
175178
MessageClass = class'CriticalStringPlus';
176179
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
177180
return;
178-
179181
case 'MonsterCriticalEvent':
180182
MessageClass = class'MonsterCriticalString';
181183
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
182184
return;
183-
184185
case 'DeathMessage':
185186
MessageClass = class'RedSayMessagePlus';
186187
break;
187188
case 'Pickup':
189+
// makes Unreal pickup messages appear on the HUD like UT ones
190+
// this is necessary since Unreal health pickups do not respect their `PickupMessageClass`
191+
MessageClass = class'PickupMessagePlus';
188192
PickupTime = Level.TimeSeconds;
193+
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
194+
return;
189195
default:
190196
MessageClass = class'StringMessagePlus';
191197
break;

src/Classes/MonsterMess.uc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// ============================================================
2+
// MonsterMess
3+
// ============================================================
4+
// === Monster Hunt ===
5+
//
6+
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
7+
// For more info, https://shrimpworks.za.net
8+
// ============================================================
9+
10+
class MonsterMess extends Mutator;
11+
12+
function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {
13+
local CreatureChunks chunk;
14+
local MonsterMessChunks hijacker;
15+
local MonsterMessBloodPool bloodpool;
16+
17+
bSuperRelevant = 1;
18+
19+
chunk = CreatureChunks(Other);
20+
if (chunk != None && !chunk.IsA('MonsterMessChunks')) {
21+
hijacker = Spawn(class'MonsterMessChunks',,, chunk.Location);
22+
if (hijacker != None) hijacker.orig = chunk;
23+
return true;
24+
}
25+
26+
if (Other.IsA('CreatureCarcass')) {
27+
// the location is raised up a little - it seems sometimes the location of some creatures is in the ground?
28+
bloodpool = Spawn(class'MonsterMessBloodPool',,, Other.Location + vect(0, 20, 0), rot(16384, 0, 0));
29+
if (bloodpool != None) bloodpool.rescale(Other);
30+
}
31+
32+
bSuperRelevant = 0;
33+
return true;
34+
}
35+
36+
defaultproperties {
37+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// ============================================================
2+
// MonsterMessBloodPool
3+
// ============================================================
4+
// === Monster Hunt ===
5+
//
6+
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
7+
// For more info, https://shrimpworks.za.net
8+
// ============================================================
9+
10+
class MonsterMessBloodPool extends UTBloodPool;
11+
12+
/*
13+
Rescales the decal based on properties of the other actor.
14+
*/
15+
function rescale(Actor other) {
16+
DetachDecal();
17+
18+
DrawScale = 0.04 * Other.CollisionRadius;
19+
20+
AttachToSurface();
21+
}
22+
23+
defaultproperties {
24+
}

src/Classes/MonsterMessChunks.uc

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// ============================================================
2+
// MonsterMessChunks
3+
// ============================================================
4+
// === Monster Hunt ===
5+
//
6+
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
7+
// For more info, https://shrimpworks.za.net
8+
// ============================================================
9+
10+
class MonsterMessChunks extends CreatureChunks;
11+
12+
var CreatureChunks orig; // the original chunk we're going to duplicate
13+
var bool initialised;
14+
15+
simulated function Landed(vector HitNormal) {
16+
local MonsterMessSplat splat;
17+
18+
super.Landed(HitNormal);
19+
20+
if ((Level.NetMode != NM_DedicatedServer) && !Level.bDropDetail) {
21+
if (!bGreenBlood) {
22+
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal));
23+
if (splat != None) splat.rescale(Self);
24+
}
25+
}
26+
}
27+
28+
simulated function HitWall(vector HitNormal, actor Wall) {
29+
local MonsterMessSplat splat;
30+
31+
super.HitWall(HitNormal, Wall);
32+
33+
if ((Level.NetMode != NM_DedicatedServer)) {
34+
if (!bGreenBlood && (!Level.bDropDetail || (FRand() < 0.75))) {
35+
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal));
36+
if (splat != None) splat.rescale(Self);
37+
}
38+
}
39+
}
40+
41+
function Tick(float delta) {
42+
// we're effectively polling here, until something sets the original chunk
43+
// once set, we'll replace the original chunk, and destroy it, then the
44+
// polling will stop
45+
if (orig == None || initialised) return;
46+
47+
if (orig.velocity != vect(0, 0, 0) || orig.CarcassClass != None) {
48+
HijackChunk();
49+
initialised = true;
50+
}
51+
}
52+
53+
/*
54+
Copies the properties of an existing chunk and simulates the calls made to
55+
CreatureChunks by CreatureCarcass when chunked.
56+
*/
57+
function HijackChunk() {
58+
// things the carcass sets
59+
TrailSize = orig.TrailSize;
60+
Mesh = orig.Mesh;
61+
bMasterChunk = orig.bMasterChunk;
62+
63+
// things InitFor sets
64+
PlayerOwner = orig.PlayerOwner;
65+
bDecorative = false;
66+
DrawScale = orig.DrawScale;
67+
SetCollisionSize(orig.CollisionRadius, orig.CollisionHeight);
68+
RotationRate = orig.RotationRate;
69+
Velocity = orig.Velocity;
70+
71+
if (bMasterChunk) {
72+
// stuff from SetAsMaster
73+
CarcassClass = orig.CarcassClass;
74+
CarcassAnim = orig.CarcassAnim;
75+
CarcLocation = orig.CarcLocation;
76+
CarcHeight = orig.CarcHeight;
77+
}
78+
79+
bGreenBlood = orig.bGreenBlood;
80+
Buoyancy = orig.Buoyancy;
81+
82+
Bugs = orig.Bugs;
83+
if (Bugs != None) Bugs.SetBase(self);
84+
85+
orig.Destroy();
86+
}
87+
88+
defaultproperties {
89+
}

src/Classes/MonsterMessSplat.uc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// ============================================================
2+
// MonsterMessSplat
3+
// ============================================================
4+
// === Monster Hunt ===
5+
//
6+
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
7+
// For more info, https://shrimpworks.za.net
8+
// ============================================================
9+
10+
class MonsterMessSplat extends BloodSplat;
11+
12+
/*
13+
Rescales the decal based on properties of the other actor.
14+
*/
15+
function rescale(Actor other) {
16+
DetachDecal();
17+
18+
DrawScale = 0.025 * Other.CollisionRadius;
19+
20+
AttachToSurface();
21+
}
22+
23+
defaultproperties {
24+
}

src/template-options.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ mutators:
66
est:
77
name: Solo Motosierras
88
description: Reemplaza todas las armas con la Motosierra!
9+
- class: MonsterMess
10+
en:
11+
name: Monster Mess
12+
description: Monsters make a bloody mess!
13+
est:
14+
name: Monster Mess
15+
description: Monsters make a bloody mess!
916

1017
gametypes:
1118
- class: MonsterHunt
@@ -17,12 +24,12 @@ gametypes:
1724
en:
1825
name: Monster Arena
1926
est:
20-
name: Cacería de Monstruos (Estadio)
27+
name: Cacer�a de Monstruos (Estadio)
2128
- class: MonsterHuntDefence
2229
en:
2330
name: Monster Defence
2431
est:
25-
name: Cacería de Monstruos (Defensa)
32+
name: Cacer�a de Monstruos (Defensa)
2633

2734
maplists:
2835
- class: MonsterDefaultMaps

0 commit comments

Comments
 (0)