Page 1 of 2

GusPack II [Release Candidate]

Posted: Wed Jul 12, 2017 7:56 pm
by Gustavo6046
GusPack II: The Pack of Gus

Status: Stable
Version: v2018.09.10.1-RC9

Download!

1) What is GusPackII?

GusPackII is a compilation of many things I have done from late 2016
to date. This means some mutators, the Auto Rockets, Mush Match
(my biggest project so far), and many other small things, the latter
of which most are only accessible from modders and UnrealEd users. :)

2) How do I use it?
Play with the mutators and learn! Auto Rockets and Attach Rockets are
fun ones. Auto Rockets seek your enemies while Attach Rockets do the
same, but in a dumber way, although they do stay in a place until
there is an enemy in sight. Whoa!

3) What is Mush Match?

MushMatch is a gametype I have been doing that combines detective
skills, craziness, and fun! All by some lines vaguely defined by a
browser game.

(a) If you are a human, you use your detective skills to find and
kill mushes, which usually kill people you know (or know only once
they're dead) are humans, and strap Beacons on those if you think
they are suspectable AND strong enough they'd require team effort.

(b) If you are a mush, you can infect humans into mushes using the
Sporifier, and must be stealthy and avoid beacon projectiles they
might fire at you. Otherwise you can get dead quickly on a gametype where
mushes are only a fraction of the players in the match, in an ideally balanced
setup.

And of course, Mush with it's trademarks
and other related stuff are copyright (C)2012 MotionTwin/Twinoid.
Their current license applies.

3) It says I don't have X.u, X.utx, or some random package file, required to use a random mod feature. What do I do?

It shouldn't need any dependencies, but if you find out it needs
any file in specific, please warn me and I'll hotfix it ASAP.

Please note, though, that updates are in real-time and there
are currently no changelogs. Good luck.

4) (bonus) Where did the MushMatch thread go?
It's this one! I just changed it so that I didn't need to post another
thread. MushMatch was already distributed as GusPackII anyways
:D

5) Does this thing have a trailer?
Nope, but soon it might get one. I'm planning it now :D

6) Do you even have testers?
Yes, people like you, who use UT99.org on a daily basis,
and post in this topic to help me, are those who help me - and,
by extension, yourself, with a higher product quality - in the end.
Especially with testing, tee hee!

License and Legality

This program is ⓒ2018 Gustavo R. Rehermann.

It is freely allowed to distribute, embed and use the source code of this Software.
Modifications of the Source Code do NOT have the legal warranty of the original
version of the Software.
It is only allowed to modify, use or distribute the
artistic assets (textures, models and sounds) if either the original Software
is mentioned or the Author is attributed. The source code can only be modified
if the original Software is mentioned.

Re: MushMatch for GusPackII

Posted: Thu Jul 13, 2017 2:11 am
by EvilGrins
When it says "the humans" or "the mushes" are those references for teams?

Because it looks like standard Deathmatch and not Team Deathmatch.

Re: MushMatch for GusPackII

Posted: Thu Jul 13, 2017 6:07 am
by sektor2111
Gustavo6046 wrote:By the way, this works on any map with player starts.
:what: By curiosity give me an example of a game-type working in maps with no PlayerStart type actors.

Re: MushMatch for GusPackII

Posted: Thu Jul 13, 2017 7:40 pm
by Gustavo6046
I meant maps of any gametype :P

Re: MushMatch for GusPackII

Posted: Fri Jul 14, 2017 9:09 pm
by Gustavo6046
Bump, and TL;DR: download link and an error
So, during testing I got an error, which I couldn't figure out why it happened. But other than that the gametype seemed fine, so I'd like to post the download link.
The error:
Image
EDIT: This error happens on any maps, and with most, if not all, kinds of Actors. Although it's most commonly associated to SpottedMush or NotMush. :P
EDIT 2: More examples:
Image
Image
(more coming soon as crashes are detected)

Re: MushMatch for GusPackII [BETA 1 RELEASED]

Posted: Fri Jul 14, 2017 11:25 pm
by OjitroC
If, despite the error, someone wants to play a MushMatch, you'll need to explain what this is and how it is played - in a readme, for example.

Re: MushMatch for GusPackII [BETA 1 RELEASED]

Posted: Fri Jul 14, 2017 11:43 pm
by Gustavo6046
OjitroC wrote:If, despite the error, someone wants to play a MushMatch, you'll need to explain what this is and how it is played - in a readme, for example.
Oh yes, sorry, I forgot about that... :P

a) If you are a human, you use your detective skills to find and kill mushes, which usually kill people you know (or know only once they're dead) are humans, and strap Beacons on those if you think they are suspectable AND strong enough they'd require team effort.
b) If you are a mush, you can infect humans into mushes using the Sporifier, and must be stealthy and avoid beacon projectiles they might fire at you. Or you can get dead quickly on a gametype where mushes are only a third of the players.

EDIT: I just added a readme file to the zip.

Re: MushMatch for GusPackII [BETA 1 RELEASED]

Posted: Sat Jul 15, 2017 4:00 pm
by Gustavo6046
Beautiful. I just compiled and uploaded (via a batch file that uses 7zip) a VERY BAD error.
Image
which I found out does not happen if I comment out the body of

Code: Select all

function bool HasHate(Pawn InstigatedBy, Pawn Other, optional bool bForwardOnly)
{
	local bool b;

	if ( !bForwardOnly && self != FirstHate )
	{
		Log(self@FirstHate@bForwardOnly);
	
		return FirstHate.HasHate(InstigatedBy, Other, true);
	}
		
	else
	{
		if ( InstigatedBy == self.Owner && Hater == Other )
		{
			Log("a"@self);
			b = true;
		}
			
		else if ( self.NextHate != None )
		{
			Log("b"@self@NextHate);
			b = self.NextHate.HasHate(InstigatedBy, Other, true);
		}
			
		else
		{
			Log("c"@self);
			b = false;
		}
	}
	
	Log(b);
	
	return b;
}
and just return False.

Dang.

EDIT: I found out that AssessBotAttitude is called lots of times, which probably means it multiplies the HasHate call stack 'till a limit is reached.

Code: Select all

simulated function byte AssessBotAttitude(Bot aBot, Pawn Other)
{
	local Pawn P;

	if ( Other.PlayerReplicationInfo == none )
		return 2;
		
	if ( aBot.PlayerReplicationInfo.Team == 0 )
	{
		if (
			Other.bIsPlayer
			&& Other.FindInventoryType(class'GusPackII.NotMush') == None
			&&
			(
				(
					Other.PlayerReplicationInfo != none
					&& Other.PlayerReplicationInfo.Team == 1
					&& Other.FindInventoryType(class'GusPackII.SpottedMush') != none
				)
				||
				(
					Hates != None 
					&& Hates.HasHate(Other, aBot)
				)
				||
				(
					Beacons != None
					&& Beacons.CheckBeacon(Other)
					&& Beacons.FindBeacon(Other).Instigator.FindInventoryType(class'GusPackII.SpottedMush') == None
				)
			)
		)
			return 1;
		
		if ( FRand() < 0.3 )
			return 3;
		
		return 2;
	}
	
	if ( aBot.PlayerReplicationInfo.Team == 1 )
	{
		if ( Other.PlayerReplicationInfo.Team == 0 )
		{
			if ( aBot.FindInventoryType(class'GusPackII.SpottedMush') != None )
				return 1;
		
			if ( Other.CanSee(aBot) )
				return 2;
		
			for ( P = Level.PawnList; P != None; P = P.NextPawn )
				if ( P.bIsPlayer && P.PlayerReplicationInfo != None && P.PlayerReplicationInfo.Team == 0 && P.LineOfSightTo(aBot) && P != Other )
					return 2;
		
			else
			{
				if ( Other.MoveTarget != None && VSize(Other.Location - Other.MoveTarget.Location) > 512 && aBot.FindInventoryType(class'GusPackII.Sporifier') != None )
					aBot.Weapon = Weapon(aBot.FindInventoryType(class'GusPackII.Sporifier'));
			
				return 1;
			}
		}
			
		return 3;
	}
}
It still crashes after this change:

Code: Select all

function bool HasHate(Pawn InstigatedBy, Pawn Other) // no longer begin from FirstHate if not FirstHate
{
	local bool b; // for debugging purposes...

	if ( InstigatedBy == self.Owner && Hater == Other )
	{
		// Log("a"@self);
		b = true;
	}
		
	else if ( self.NextHate != None )
	{
		// Log("b"@self@NextHate);
		b = self.NextHate.HasHate(InstigatedBy, Other);
	}
		
	else
	{
		// Log("c"@self);
		b = false;
	}
	
	// Log(b);
	
	return b;
}
This is an emergency. I must upload an working version before everyone else downloads the mod! :oops:

I wonder if this crash is of a different kind.
Image

Other than the fact it's seemingly not a collision crash :P

EDIT 2: It seems to be fixed, other than it does not recurse infinitely it seems, but rather recurse A TRUCK TON. Did you know even if I don't log those:
Image
my game is still VERY slow?

Code: Select all

function bool RecurseHas(Pawn InstigatedBy, Pawn Other)
{
	Log(self@NextHate@InstigatedBy@Other);

	if ( Other == Hater && InstigatedBy == Owner )
		return true;
	
	if ( NextHate != None )
		return NextHate.RecurseHas(InstigatedBy, Other);
		
	return false;
}

function bool HasHate(Pawn InstigatedBy, Pawn Other)
{
	return FirstHate.RecurseHas(InstigatedBy, Other);
}
EDIT 3: I'm starting to think the error is NOT on that very function.
Whole code of the HateList actor:

Code: Select all

class HateList extends Info;

var HateList NextHate, FirstHate;
var Pawn Hater;

simulated function Delete()
{
	local HateList h;

	for ( h = FirstHate; h != None; h = h.NextHate )
		if ( h.NextHate == self )
			h.NextHate = NextHate;
	
	Destroy();
}

function int ListSize(optional bool bForwardOnly)
{
	if ( !bForwardOnly && self != FirstHate )
		return FirstHate.ListSize(true);

	if ( NextHate == None )
		return 1;
		
	else
		return NextHate.ListSize() + 1;
}

simulated function HateList AddHate(Pawn Other, Pawn InstigatedBy)
{
	if ( Hater == Other && Pawn(Owner) == InstigatedBy )
	{
		// Log("#3#"$self@O($Other$") I("$InstigatedBy$")");
	
		return self;
	}

	if ( NextHate != None )
	{
		Log(self@--@ListHead());
	
		return NextHate.AddHate(Other, InstigatedBy);
	}
		
	self.NextHate = Spawn(class'HateList', InstigatedBy);
	self.NextHate.Hater = Other;
	self.NextHate.FirstHate = self.FirstHate;
	self.NextHate.NextHate = None;
	
	// Log(self@+=@NextHate);
	
	return NextHate;
}

function HateList ListHead()
{
	local HateList h;

	for ( h = self; h != None; h = h.NextHate ) continue;
	
	return h;
}

function HateList SingleCheck(Pawn InstigatedBy, Pawn Other)
{
	if ( InstigatedBy == Owner && Other == Hater )
		return self;
		
	return None;
}

function bool RecurseHas(Pawn InstigatedBy, Pawn Other)
{
	Log(self@NextHate@InstigatedBy@Other);

	if ( Other == Hater && InstigatedBy == Owner )
		return true;
	
	if ( NextHate != None )
		return NextHate.RecurseHas(InstigatedBy, Other);
		
	return false;
}

defaultproperties
{
	bStatic=false
	bNoDelete=false
	CollisionRadius=0
	CollisionHeight=0
	bCollideActors=false
	bBlockActors=false
	bBlockPlayers=false
}

Re: MushMatch for GusPackII [BETA 1 RELEASED]

Posted: Sat Jul 15, 2017 4:59 pm
by Barbie
You can easily run into an endless recursion here:

Code: Select all

function bool HasHate(Pawn InstigatedBy, Pawn Other, optional bool bForwardOnly) {
...
		 b = self.NextHate.HasHate(InstigatedBy, Other, true);
...
}
Simplest version: A.NextHate == A
Two member version: A.NextHate == B and B.NextHate == A
Three member version: A.NextHate == B and B.NextHate == C and C.NextHate == A
etc.

Re: MushMatch for GusPackII [BETA 1 RELEASED]

Posted: Sat Jul 15, 2017 5:03 pm
by Gustavo6046
Thanks, I'll check that. HOWEVER, I've been logging. NextHate equals ListHead() in the penultimate node of the list, however it calls FirstHate.RecurseHas() instead. wtf

Also, checking for NextHate == FirstHate does not work. double wtf

I should really use a for loop
blog shit
EDIT:
I got an unrelated crash.
Image
However I think this edit works!!

Code: Select all

function bool SingleCheck(Pawn InstigatedBy, Pawn Other)
{
	return ( InstigatedBy == Owner && Other == Hater );
}

function bool RecurseHas(Pawn InstigatedBy, Pawn Other)
{
	local HateList h;
	
	for ( h = self; h != None; h = h.NextHate )
		if ( h.SingleCheck(InstigatedBy, Other) )
			return true;
			
	return false;
}
EDIT 2: ...or not. :/

EDIT 3: Triggered.
Image
And the best, it doesn't freeze the game, but make it run at like SUPER LOW FPS. And no infinite recursion is detected. I'm sure now that the error must be elsewhere!

Code: Select all

function bool SingleCheck(Pawn InstigatedBy, Pawn Other)
{
	Log(self@InstigatedBy@Other@InstigatedBy == Owner@Other == Hater);

	return ( InstigatedBy == Owner && Other == Hater );
}

function bool RecurseHas(Pawn InstigatedBy, Pawn Other)
{
	local HateList h;
	local int i;
	
	for ( h = self; h != None; h = h.NextHate )
	{
		if ( h.SingleCheck(InstigatedBy, Other) )
			return true;
		
		if ( h == self && i > 0 )
		{
			Warn("I ran into an infinite recursion. Avoided.");
		
			return false;
		}
			
		i++;
	}
			
	return false;
}
EDIT 3: HOW many times is AssessBotAttitude called? I'm sure it's over (250 / 4) aka 62. With 4 hates it gets super slow!!

EDIT 4: Removing logs seems to make it faster... until Infinite Recursion Detected.

EDIT 5: Seemingly it didn't work remaking those linked lists into inventory items:
Image

EDIT 6: Seems that with the advent of Beta 2 most errors went away. But MushMatch is still some unstable thing. :/

Re: GusPackII [BETA 2 RELEASED]

Posted: Sat Jul 15, 2017 9:38 pm
by JackGriffin
This isn't your blog. Ask a question or work this stuff out where we don't have to scroll through useless stuff.

Re: GusPackII [BETA 2 RELEASED]

Posted: Sat Jul 15, 2017 10:01 pm
by Gustavo6046
Oh, yes, sorry.

Okay so, occasionally when I get a BeaconList inventory (and other, not-so-related events, in a less frequent mnner) the game crashes, kind of like this:
Image
How do I find out where the error is and, if possible, what could be causing it? Shrinker comes with Unreal 4Ever Tournament, so the real cause can't be traced in that error window. I'll check logs; while in the past they never gave me enough information as to why the crashes were happening every 30 seconds, maybe something special is logged on crash this time? (EDIT: which it doesn't :( ).

The source code is in the zip, with GusPackII. My compiling batch file automatically uploads it to Google Drive.

[ps: please move this to a more appropriate section, this is not dedicated to just MushMatch anymore]

Re: GusPackII [BETA 2 RELEASED]

Posted: Sat Jul 15, 2017 11:49 pm
by ANUBITEK
Spoiler
Image
all this double postan goin on up in m'here

Re: GusPackII [BETA 2 RELEASED]

Posted: Sun Jul 16, 2017 3:41 am
by Gustavo6046
Beautiful. I just saw the finest piece of art, made in the resolution of micrometers, with quality tools, on a very fine paper, and a golden coating, and Mona Lisa overlayed on ultraviolet. :ironic:

Re: GusPackII [BETA 2 RELEASED]

Posted: Sun Jul 16, 2017 6:54 am
by sektor2111
And I have just seen an explosion of stupid codes untested, but happily announced with whistles and bells and Big Letters and USELESS as usual. I'm not even bother to read everything because it's a waste of time. What you do here is not a BETA regarding to what you think. A BETA thing should pass first Testing stage awaiting other testers, this doesn't even work as should so you will not be able to record any sort of trailer at this point because... it will go to a self-defaming thing.
We need an admin to wipe the floor here...
You can keep posting in "Last BS posted the Sequel" section - that's the spam location.