Skip to content

Commit

Permalink
Localisation, Monster Mess mutator, HUD fix, pickup messages (#25)
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Watson <--global>
  • Loading branch information
shrimpza authored Apr 9, 2022
1 parent ee1f1e3 commit 8e43477
Show file tree
Hide file tree
Showing 10 changed files with 235 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 609 to 610:
- Updated spanish definitions (thanks Neon_Knight)
- New Mutator - Monster Mess; monster corpses and giblets leave blood splats
- Unreal ammo and pickup messages appear as UT HUD messages rather than in the chat log
- Fix positioning of MH HUD icon when growing or shrinking HUD

## 608 to 609:
- Properly support `bEnabled` on `MonsterWaypoint`, to allow for more complex AI navigation orchestration
- waypoint can now be disabled at start, and then triggered to enable (default is enabled)
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=609
export version=609
export build=610
export version=610
export packagefull=$package
export packagedist=$package$version
export debug=1
Expand Down
30 changes: 30 additions & 0 deletions resources/Help/MonsterHunt/ReadMe.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ <h2 id="credits">Credits</h2>
</ul>
</li>

<li>Localisation:
<ul>
<li>Neon_Knight (Spanish)</li>
</ul>
</li>

<li>Special thanks:
<ul>
<li>Valkyrie</li>
Expand All @@ -306,6 +312,30 @@ <h2 id="credits">Credits</h2>
<section>
<h2 id="history">Release History</h2>

<h3>Release 16 (610)</h3>
<ul>
<li>Updated spanish definitions (thanks Neon_Knight)
<li>New Mutator - Monster Mess; monster corpses and giblets leave blood splats
<li>Unreal ammo and pickup messages appear as UT HUD messages rather than in the chat log
<li>Fix positioning of MH HUD icon when growing or shrinking HUD
</ul>

<h3>Release 15 (609)</h3>
<ul>
<li>Properly support `bEnabled` on `MonsterWaypoint`, to allow for more complex AI navigation orchestration<br/>
waypoint can now be disabled at start, and then triggered to enable (default is enabled)
<li>Adjust bot behaviour to try to clear monsters in an area before proceeding to next waypoint
<li>Localisation templates and Spanish Localisation (thanks Neon_Knight)
<li>Update build scripts/templates to support localised template variables
<li>Optimise `MonsterWaypoint` startup, only do `AllActors` traversal if/when touched and only if events configured
<li>Add icons on the scoreboard:<br/>
a skull for players with no remaining lives<br/>
a star "award" at the end for players with no deaths for the whole round
<li>Re-worked and improved MH-Revenge]\[ map, included as MH-Revenge]\[-SE
<li>Add option to hide objectives on HUD. Can be Set in `User.ini`:<br/>
under `[MonsterHunt.MonsterHUD]` section, set `bHideObjectives=true` (default is false)
</ul>

<h3>Release 14 (608)</h3>
<ul>
<li>Re-worked and improved MH-NaliVillage]\[ map, included as MH-NaliVillage][-SE
Expand Down
4 changes: 4 additions & 0 deletions src/Classes/MonsterBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {

if (Other.IsA('Pickup')) {
Pickup(Other).bAutoActivate = true;
// makes Unreal pickup messages appear on the HUD like UT ones
if (Pickup(Other).PickupMessageClass == None) {
Pickup(Other).PickupMessageClass = Class'PickupMessagePlus';
}
if (Other.IsA('TournamentPickup')) return true;
}

Expand Down
14 changes: 10 additions & 4 deletions src/Classes/MonsterHUD.uc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ simulated function DrawStatus(Canvas Canvas) {
Canvas.DrawColor = HUDColor;
if (bHideStatus && bHideAllWeapons) {
X = 0.5 * Canvas.ClipX - 128 * Scale;
Y = Canvas.ClipY - 64 * Scale;
X = Canvas.ClipX - 140 * Scale;
Y = 0;
} else if (bHideStatus) {
X = Canvas.ClipX - 140 * Scale;
Y = 128 * Scale;
} else {
X = Canvas.ClipX - 128 * Scale * StatusScale - 140 * Scale;
Y = 128 * Scale;
Expand All @@ -175,17 +178,20 @@ simulated function Message(PlayerReplicationInfo PRI, coerce string Msg, name Ms
MessageClass = class'CriticalStringPlus';
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
return;
case 'MonsterCriticalEvent':
MessageClass = class'MonsterCriticalString';
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
return;
case 'DeathMessage':
MessageClass = class'RedSayMessagePlus';
break;
case 'Pickup':
// makes Unreal pickup messages appear on the HUD like UT ones
// this is necessary since Unreal health pickups do not respect their `PickupMessageClass`
MessageClass = class'PickupMessagePlus';
PickupTime = Level.TimeSeconds;
LocalizedMessage(MessageClass, 0, None, None, None, Msg);
return;
default:
MessageClass = class'StringMessagePlus';
break;
Expand Down
37 changes: 37 additions & 0 deletions src/Classes/MonsterMess.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// ============================================================
// MonsterMess
// ============================================================
// === Monster Hunt ===
//
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
// For more info, https://shrimpworks.za.net
// ============================================================

class MonsterMess extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {
local CreatureChunks chunk;
local MonsterMessChunks hijacker;
local MonsterMessBloodPool bloodpool;

bSuperRelevant = 1;

chunk = CreatureChunks(Other);
if (chunk != None && !chunk.IsA('MonsterMessChunks')) {
hijacker = Spawn(class'MonsterMessChunks',,, chunk.Location);
if (hijacker != None) hijacker.orig = chunk;
return true;
}

if (Other.IsA('CreatureCarcass')) {
// the location is raised up a little - it seems sometimes the location of some creatures is in the ground?
bloodpool = Spawn(class'MonsterMessBloodPool',,, Other.Location + vect(0, 20, 0), rot(16384, 0, 0));
if (bloodpool != None) bloodpool.rescale(Other);
}

bSuperRelevant = 0;
return true;
}

defaultproperties {
}
24 changes: 24 additions & 0 deletions src/Classes/MonsterMessBloodPool.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ============================================================
// MonsterMessBloodPool
// ============================================================
// === Monster Hunt ===
//
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
// For more info, https://shrimpworks.za.net
// ============================================================

class MonsterMessBloodPool extends UTBloodPool;

/*
Rescales the decal based on properties of the other actor.
*/
function rescale(Actor other) {
DetachDecal();

DrawScale = 0.04 * Other.CollisionRadius;

AttachToSurface();
}

defaultproperties {
}
89 changes: 89 additions & 0 deletions src/Classes/MonsterMessChunks.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// ============================================================
// MonsterMessChunks
// ============================================================
// === Monster Hunt ===
//
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
// For more info, https://shrimpworks.za.net
// ============================================================

class MonsterMessChunks extends CreatureChunks;

var CreatureChunks orig; // the original chunk we're going to duplicate
var bool initialised;

simulated function Landed(vector HitNormal) {
local MonsterMessSplat splat;

super.Landed(HitNormal);

if ((Level.NetMode != NM_DedicatedServer) && !Level.bDropDetail) {
if (!bGreenBlood) {
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal));
if (splat != None) splat.rescale(Self);
}
}
}

simulated function HitWall(vector HitNormal, actor Wall) {
local MonsterMessSplat splat;

super.HitWall(HitNormal, Wall);

if ((Level.NetMode != NM_DedicatedServer)) {
if (!bGreenBlood && (!Level.bDropDetail || (FRand() < 0.75))) {
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal));
if (splat != None) splat.rescale(Self);
}
}
}

function Tick(float delta) {
// we're effectively polling here, until something sets the original chunk
// once set, we'll replace the original chunk, and destroy it, then the
// polling will stop
if (orig == None || initialised) return;

if (orig.velocity != vect(0, 0, 0) || orig.CarcassClass != None) {
HijackChunk();
initialised = true;
}
}

/*
Copies the properties of an existing chunk and simulates the calls made to
CreatureChunks by CreatureCarcass when chunked.
*/
function HijackChunk() {
// things the carcass sets
TrailSize = orig.TrailSize;
Mesh = orig.Mesh;
bMasterChunk = orig.bMasterChunk;

// things InitFor sets
PlayerOwner = orig.PlayerOwner;
bDecorative = false;
DrawScale = orig.DrawScale;
SetCollisionSize(orig.CollisionRadius, orig.CollisionHeight);
RotationRate = orig.RotationRate;
Velocity = orig.Velocity;

if (bMasterChunk) {
// stuff from SetAsMaster
CarcassClass = orig.CarcassClass;
CarcassAnim = orig.CarcassAnim;
CarcLocation = orig.CarcLocation;
CarcHeight = orig.CarcHeight;
}

bGreenBlood = orig.bGreenBlood;
Buoyancy = orig.Buoyancy;

Bugs = orig.Bugs;
if (Bugs != None) Bugs.SetBase(self);

orig.Destroy();
}

defaultproperties {
}
24 changes: 24 additions & 0 deletions src/Classes/MonsterMessSplat.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ============================================================
// MonsterMessSplat
// ============================================================
// === Monster Hunt ===
//
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson
// For more info, https://shrimpworks.za.net
// ============================================================

class MonsterMessSplat extends BloodSplat;

/*
Rescales the decal based on properties of the other actor.
*/
function rescale(Actor other) {
DetachDecal();

DrawScale = 0.025 * Other.CollisionRadius;

AttachToSurface();
}

defaultproperties {
}
11 changes: 9 additions & 2 deletions src/template-options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ mutators:
est:
name: Solo Motosierras
description: Reemplaza todas las armas con la Motosierra!
- class: MonsterMess
en:
name: Monster Mess
description: Monsters make a bloody mess!
est:
name: Monster Mess
description: Monsters make a bloody mess!

gametypes:
- class: MonsterHunt
Expand All @@ -17,12 +24,12 @@ gametypes:
en:
name: Monster Arena
est:
name: Cacería de Monstruos (Estadio)
name: Cacer�a de Monstruos (Estadio)
- class: MonsterHuntDefence
en:
name: Monster Defence
est:
name: Cacería de Monstruos (Defensa)
name: Cacer�a de Monstruos (Defensa)

maplists:
- class: MonsterDefaultMaps
Expand Down

0 comments on commit 8e43477

Please sign in to comment.