To do in MH v504 - maybe in olders too...

Posts about Nelsona's findings in UT!
Post Reply
User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

To do in MH v504 - maybe in olders too...

Post by Nelsona » Thu Jan 01, 2015 9:28 am

It is nice and beautiful. Evil things have occurred rarely indeed, but still happened:

Code: Select all

DevNet: Connection timed out after 15.000000 seconds (15.024000)
NetComeGo: Close TcpipConnection22 12/31/14 20:43:32
Critical: AActor::TestCanSeeMe
Critical: AActor::PlayerCanSeeMe
Critical: UObject::ProcessEvent
Critical: (UT_FlakCannon MH-Rook(AS)v3_R.UT_FlakCannon64, Function Engine.Inventory.Pickup.Timer)
Critical: AActor::Tick
Critical: TickAllActors
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 12/31/14 20:47:32
Which was that one who left before to see this awesome thing ? Huh ? Shame on you! Now it crashed.
Tuning a bit a server-tool:

Code: Select all

class MHTune expands Mutator;

var bool bInitialized;

event PostBeginPlay()
{
	if ( !bInitialized )
	{
		bInitialized = True;
		Level.Game.RegisterDamageMutator(Self);
		Super.PostBeginPlay();
	}
	else
	{
		log (Self$" already running...");
		return;
	}
}

function bool PreventDeath(Pawn Killed, Pawn Killer, name damageType, vector HitLocation)
{
	local ScriptedPawn S, oS;
	local Pawn P;
	local Bird1 Fake;
	local bool bCrapSpawned;

	if ( Killed != None )
	{
		if (Killed.PlayerReplicationInfo != None)
		{
			if ( !bCrapSpawned )
			{
				Fake = Spawn(class'Bird1',,,Killed.Location+vect(0,0,80));
				if ( Fake != None )
				{
					Fake.DrawScale = 0.5;
					Fake.LifeSpan = 3.5;
					Fake.Health = 300;
					Fake.bCircle = True;
					Fake.CircleRadius = 100;
					Fake.AnimSequence = 'Flight';
					Fake.ReducedDamageType = 'All';
					bCrapSpawned = True;
				}
			}
			for ( P=Level.PawnList; P!=None; P=P.nextPawn )
//			foreach AllActors (class 'ScriptedPawn',oS)
			{
				oS = ScriptedPawn(P);
				if ( oS != None && oS != Killed && ( oS.Enemy == Killed || oS.Target == Killed ) && oS.Health > 0 )
				{
	//				Log (oS$" Has Enemy "$oS.Enemy.GetHumanName());
	//				Log (oS$" Has Target "$oS.Target.GetHumanName());
					if (bCrapSpawned)
					{
						oS.Target = Fake;
						oS.Enemy = Fake;
					}
				}
			}
		}
		DropInventory(Killed);
	}
	if ( NextMutator != None )
		return NextMutator.PreventDeath(Killed,Killer, damageType,HitLocation);
	return false;
}

function DropInventory (Pawn Killed)
{
	local Weapon Wo, We;
	local int DropPitch;
	local int DropYaw;
	local Rotator DropRot;

	if (Killed.Weapon == None)
	{
//		log (Killed$" doesn't have weapon.");
		return;
	}
	else
	{
		Wo = Killed.Weapon;
		if ( Wo != None && Wo.AmmoType != None 
			&& Wo.AmmoType.AmmoAmount > 0
				&& Wo.Class != Level.Game.BaseMutator.MutatedDefaultWeapon()
					&& Wo.bCanThrow )
		{
//			log ("Copy weapon for "$Killed);
			We = Spawn(Wo.Class,,,Killed.Location);
		}
		if ( We != None )
		{
//			log ("We have a copy spawned.");
			DropRot=Killed.ViewRotation;
			DropPitch=Rand(32768);
			DropYaw=Rand(65536);
			DropRot.Pitch=DropPitch;
			DropRot.Yaw=DropYaw;
			We.bWeaponStay = False;
			We.Velocity=vector(DropRot) * (Rand(250) + 250);
			We.RespawnTime=0.00;
			We.BecomePickup();
			We.NetPriority = 1.400000;
			We.NetUpdateFrequency = 10.000000;
			We.RemoteRole = ROLE_DumbProxy;
			We.SetPhysics(PHYS_Falling);
			We.bCollideWorld=True;
			We.GotoState('Pickup','dropped');
			if ( Wo != None && Wo.AmmoType != None )
				We.PickupAmmoCount = Wo.AmmoType.AmmoAmount;
//			log (We.PickupAmmoCount$" is amount for weapon dropped "$Wo);
			We.LifeSpan=60.000000; //We don't want a million thrown, right ? If have an owner I'll put back default
			Wo.Destroy();
		}
	}
}

function bool HandlePickupQuery(Pawn Other, Inventory item, out byte bAllowPickup)
{
	local bool result;

	if ( Item != None )
		if ( Item.MyMarker == None && Item.LifeSpan != Item.Default.LifeSpan)
		{
			Item.LifeSpan = 0;
//or will be Item.LifeSpan = Item.Default.LifeSpan;
		}

	if ( NextMutator != None )
		result = NextMutator.HandlePickupQuery(Other, item, bAllowPickup);
	return result;
}
Keep going...

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Hermskii » Thu Jan 01, 2015 2:06 pm

I can't understand what caused the ActorTestCanSeeMe error.

Was it the flak cannon ghost or something?
I don't see a piece of anything and the ActorTestCanSeeMe is a error based on a timer run on a chunk of leftover guts or wood or rock or something.

Never saw it happen with weapon like a flak cannon before.

Are you saying you have already identified this and a fix?
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Thu Jan 01, 2015 5:07 pm

If you don't mind, and because less people are really care about MH let's play with cards on the Table.

First introduction into weaponry stuff aka Inventory
Original mess

Code: Select all

	function Timer()
	{
		if ( RemoteRole != ROLE_SimulatedProxy ) 
		{
			NetPriority = 1.4;
			RemoteRole = ROLE_SimulatedProxy; //See this Role - is changed first was Dumb_Proxy and back Simulated - it doesn't help anyway
			if ( bHeldItem )
			{
				if ( bTossedOut ) //player dropped it
					SetTimer(15.0, false);
				else
					SetTimer(40.0, false); //Pawn has been murdered
			}
			return;
		}

		if ( bHeldItem )
		{
			if (  (FRand() < 0.1) || !PlayerCanSeeMe() ) //Less chances to vanish or check people
				Destroy();
			else
				SetTimer(3.0, true);
		}
	}
Weapon has been dropped because Pawn owner has been successfully murdered by a skilled monster. This weapon was a held one, marked with bHeldItem = True. Once dropped weapon is going to state Pickup.
In state pickup will decide if wants to leave stage or to stay around depending on who is looking at it. Looks like a trail connection developed some false Player at first sight. Such timers are happening even at Fragments and Carcasses (there is also a stupid check to make splash noise when falls in water if player can look at that - hearing and visibility are different things but for Epic looks the same :( ). Carcasses seems cute at once with Chunks. I was expecting such things and for this reason in previous post I coded a kind of semi-pinata in purpose to clone exactly stuff dropped by any pawn but without to use bHeldItem. Weapon dropped won't spent 2 years on ground, will live 60 seconds. During this time if any Hunter gets it then weapon will quit internal countdown and will stay nice at player. Yes, problem is solved for such case. Else if players are abusing dropping weaponry we can code anti-throwweapon stuff or we can remove throwing weaponry.
If fact I believe that it could just be a kind of frame discarded due to spam existent into MH, in default matches (like CTF and DM) using a few monsters, never happened such crash, at least not in my server. Also here I suspect a replication problem which seems wrong declared, MH reacts too different comparing it with other games with monsters done by me.
Yes, I had such crashes even in the past from an OLEightball felt in acid-zone after some BT stunt in map BirdBrainedResearch (now is removed due to spam and bad stuff MyLevel-ed there).

Subject Fragment.
I go to start a map having nasty decorations and I'll open Minigun-fire to see what's the deal. I have to check in detail fragment code because it looks like doesn't match chunk's tweak. Simply, Fragment tweak did not cooperated in chunk style but I'll mind that if will piss me off. I was interested to keep effects for a nice game, else I can apply my MH2 technology - Destroy them without mercy.

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Hermskii » Thu Jan 01, 2015 5:37 pm

I say kill the pieces immediately. Don't let them lay on the ground.

Also, I have seen weapons and things disappear right in front of me many times before. It didn't crash the game.

Sadly, these fixes might more and more fragment the MH community. Just as whether people get file mismatch error will make them play on certain servers, eventually certain patches, fixes, versions of mods and even versions of MH will make it hard for people to all be at the same place at the same time with no mismatch errors.

Please go ahead and just rebuild MH from the ground up like Kelly wanted to do. I can wait 5-10 years. Thanks! LOL.
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Thu Jan 01, 2015 5:54 pm

For different Pinata models each admin will decide what wants, I cannot decide the way for fixing default stuff because won't match people's tastes. I can only suggest what I'm thinking. My Semi-Pinata was in purpose to clone exactly weapon dropped - including ammo load.
Else to speak Game-Server rented on Linux never crashed at this chapter that's why adding codes might be useless for Linux users which wants speed and smoother game not the same fix everywhere.

Fragments can be debated with a timer (exactly what I'm hating). A few minutes ago I was trying some fragments and seems to not have problems. Hmmm... I think is about connections sockets left opened useless ? Or ? More testing is required.

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Hermskii » Thu Jan 01, 2015 6:01 pm

Kelly once told me that was the issue with the error in the first place. he said a standard at home server like mine didn't have the quantity of connection sockets that a rented game server had and that would always cause this issue for me at home.

I may have missed something or got something wrong there but that is what I best recall about what he told me about this error and that was the end of the discussion being I will never rent a server. Also, my quantity of crashes because of this error dropped dramatically but I fear it is do to the equal drop in people playing and thus less chance for the error to occur. It used to happen 1 - 4 times a day. Now it is once a month or so and the server auto reboots anyways.
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Thu Jan 01, 2015 7:54 pm

To be honest a crash here and there is not a tragedy. The mostly I hated a server stuck, I was trying to prevent certain things based on attitude bytes invalid accessed... and probably it would be required to mind other actors too, including purging garbage from time to time (this might happen even using server-tools only). As I said, these things might be subject for other tweaks, I cannot rule these fixes as being THE Model. Skaarj fixing was simple but it was a need to rework many BotPack related things. MH v504 has solved Skaarj including invisible weapon dropped.

As a self Note. That PlayerCanSeeMe as I noticed even on Youtube is somehow funny not only less logic. SpawnPoint - testing if player can see it in order to spawn Monsters out of player visibility - He he SpawnPoint is hidden, which player can see it ? Only player using "showall" in console else 0 players can see that in all cases, idea is stupid as a cow. At wiki was described as A.I. function. Absolute wrong, is actor related stuff. Spawnpoint is NavigationPoint not A.I and neither decorations. SpawnPoint from v504 won't deal with this absolute crap. Is was too much deal with native stuff loading engine for less good purposes.

Even with complete tweaks or not, I prefer Bot and Monster behavior from v504 100 times more than in v503 not because I did them but simply looks more realistic and more convinced with a different timer started. These Win related problems are a bit tunable.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Sat Jan 03, 2015 4:17 am

Another thing to see coming from MH replication declaration. In MH v504 I did not changed anything to not mess common Mutators, but for my MH2 I won't lose opportunity to work things as I consider based on what I have seen into Stock stuff.
class MonsterReplicationInfo

Code: Select all

var bool bUseLives;
var bool bUseTeamSkins;
var int Lives;
var int Monsters;
var int Hunters;

replication
{
	reliable if ( Role == ROLE_Authority )
		Lives, Monsters, bUseLives, bUseTeamSkins, Hunters;
}
which means these things might be sent from server to player anytime. But... we have some value configured which would be better to start at once with game so player would know it before to mess up that HUD error - bUseTeamSkins - as is doing default replication with game-type - is declared once at beginning not dynamic because game-type is not changing "on fly" - would mess up maps.
"bUseLives" is computed based on "Lives" not configured, so it needs somehow a dynamic declaration or else player will lose this value if gets changed a tinny bit later, so this one is properly declared.
As for information let's see how I set replication into MH2 a la myself

Code: Select all

//=== values are named different to not conflict with original loaded by Level itself
var bool bUseLive;
var bool bUseTeamSkin;
var int Live;
var int Monster;
var int Hunter;
//=== MH specific add-ons

replication
{
	reliable if ( Role == ROLE_Authority ) //I think these are computed dynamically so they are updated often except bUseLive updated once but later not default-ed
		Live, Monster, bUseLive, Hunter;

	reliable if ( bNetInitial && Role == ROLE_Authority ) // bUseTeamSkin I think must be here right at start or else player doesn't know about it's existence in HUD's PostBeginPlay
		bUseTeamSkin;
}

simulated function PostBeginPlay()
{
	local int i;

//	Super.PostBeginPlay();
	if( Level.NetMode == NM_Client )
	{
		// clear variables so we don't display our own values if the server has them left blank 
		ServerName = "";
		AdminName = "";
		AdminEmail = "";
		MOTDLine1 = "";
		MOTDLine2 = "";
		MOTDLine3 = "";
		MOTDLine4 = "";
	}
	SecondCount = Level.TimeSeconds;
	SetTimer(0.5, true); //I don't need 0.2, I simply don't see problems.

	if (TournamentGameInfo(Level.Game) != None)
	{
		TotalGames = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalGames;
		TotalFrags = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalFrags;
		TotalDeaths = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalDeaths;
		TotalFlags = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalFlags;
		for (i=0; i<3; i++)
		{
			BestPlayers[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestPlayers[i];
			BestFPHs[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestFPHs[i];
			BestRecordDate[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestRecordDate[i];
		}
	}
}
And the rest of data is original to not conflict with any stupid stats counting NaliRabbit-s or whatever high skilled game warriors...

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Sun Jan 04, 2015 7:45 am

Another option

Yesterday Loque was calling me being sad:
Ph 1: Hello, Nelsona ?
Ph 2: Yes, what's the problem ?

Ph 1: Some Ninja added here a BlockMonsters, we want it ruined as in your MH2 where we felt comfortable.
Ph 2: Ok, buddy. Let me think some time and I'll see what I must add in that sort of MHHelper.

After 10 minutes...

Ph 1: Loque, are you still here ?
Ph 2: Yes... I was trying and retrying but... looks like Gandalph screams: "You shall not pass!"

Ph 1: I'm not bother to code too much right now but I can do something different...
Ph 2: I'll be grateful if you would like to show me if you don't mind.

Ph 1: Prepare to see a very tinny simple function called from any PostBeginPlay:

Code: Select all

function RuinStupidStuff()
{
	ConsoleCommand("set BlockMonsters bNodelete False");
	ConsoleCommand("set BlockMonsters bStatic False");
	ConsoleCommand("set BlockMonsters bBlockActors False");
	ConsoleCommand("set BlockMonsters bDeleteMe True"); //UnrealEngine owns...
}
Ph 2: Thank you. You were always nice with us...

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Mon Jan 26, 2015 4:27 pm

Wheew, looking at first post now I can round on floor laughing. I put XC_Engine having a new PlayerCanSeeMe() function and I have written a small relic-mutator containing such a native request (they are much faster than UScript-ed ones). It is amazing to see things working after so many years of pain - LOL.

VIVA HIGOR!

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Hermskii » Mon Jan 26, 2015 9:23 pm

So you like the XC thing?
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Tue Jan 27, 2015 1:36 am

In a few words: might be an Yes because it seems to help.
In more words:
As long as that thing was bad coded and new stuff seems reworked more properly, I won't used older stuff - old function returns even false results making things stupid. If things works as they should, you might even have mutators which in the past wouldn't be ever in a coder's head. Now let me see, I was playing a few On-Line sessions using a new mutator-relic type having more such engine interrogations. Never crashed - I gotta admit NavigationPoint are not in any of my old crash-logs but this time given new functionality, we don't have to deal with visible things placed behind player and which were claimed visible...

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Sat Feb 28, 2015 3:55 pm

Back with a question: All main problems are solved now ?
Answer: Unfortunately No.

It looks like another dumb crap done to a mover might break or... ruin a 451 server truly nice... it looks like will be unable to receive players (at least in Win environments seems noticeble). I did not test if MapVote can stop such invalid party.

Certain timer values seems able to work fine when are set in a normal range according to Uscript rules (and not only UScript). If such a value is dumb set because poor brainless Level Designer never heard about bTriggerOnceOnly variable of a Mover, then you might see other movers from level getting stuck (if are used many) or simply server won't be able to receive player making the player to think that it has been banned, and I won't waste time to see what anything else might be completely ruined...

I have to implement in a mutator this fix because I forgot about this nasty problem to be solved in MHv5.04.

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Hermskii » Sat Feb 28, 2015 8:26 pm

So MHv5.05 is coming to a sever near you?
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: To do in MH v504 - maybe in olders too...

Post by Nelsona » Sun Mar 01, 2015 12:06 pm

It can be adjusted by a tiny server-side in any moment. It doesn't need v5.05

I couldn't see any feedback for v5.04 so probably v5.05 will have 0 usage. Deserve a waste of time ?

Post Reply