Need More Fixes ?

Posts about Nelsona's findings in UT!
Post Reply
User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sat Dec 22, 2012 8:26 pm

Back for conclusions about Movers chapter.

This is a very sensitive problem because of different movers types and dumb settings one more messed than other. I found even maps meant to avoid basic mover fix developing another crap close to have a break risk with return when encroach a pawn and is triggered by a counter (once) - counters are launching events once not more times. Yeah, such a mover dumb set might be closed if is involved by new features and a bunch of combinations to except such unexpected cases are not a charm. I fixed as necessary common movers non-linked with triggers when are meant to be triggered by monsters, and that's all. Others need a long list based on map name customized like in Coop, lol. Feel free to do a list for more than 800 maps if is a need to be, I'm not doing this.

In mover code is described a requirement to be fixed when is linked with counters but nobody has time to look a bit what is doing... Great, have fun then and don't cry!

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Mon Jan 07, 2013 12:09 am

After different tests, I made small modifications into the codes previously posted. If anybody copied them for usage, check them well and keep in mind: they aren't a rule, are just suggestions.

Calls to playerreplicationinfo when is about a monster will do errors for sure. Last time I modified some pawns to get rid of errors crushers and to have a normal look, close to original as much as possible.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Mon Jan 14, 2013 12:06 pm

I think here weather is too quiet, maybe a few people interested in more MH things need a trigger for debates. Using a few UTJ codes of course you will want to look at them carefully. Harmfull or not or unimportant some of them claimed as common rules aren't so cool. If fact I ruined some useless lines which just slow down timer. I'll show code:

Code: Select all

function Pawn GetRandomPlayer() {
  local Pawn N;
  local PlayerPawn Dest;
  local Pawn Candidate[32];
  local int num;

  for (N=Level.PawnList; N!=None; N=N.NextPawn) {
    Dest=PlayerPawn(N);
    if (Dest!=None && Dest.bIsPlayer && !Dest.PlayerReplicationInfo.bIsSpectator) {
      if (num<32) Candidate[num] = Dest;
      else if (Rand(num) < 32) Candidate[Rand(32)] = Dest;
      num++; //this num is constantly increased ? Never restarted ? Maybe ... eh...
    }
  }

  if(num==0) return None;
  return Candidate[Rand(Min(32,num))];
}
This one will sort a player from classes PlayerPawn checking if exist one, marked as bISPlayer and not spectator...LOL
If we are using call to TournamentPlayer which by default is bIsPlayer and isn't ever spectator restricting code at what we need who is disturbed ? Will just speed-up avoiding 2 useless checks.

Code: Select all

function timer()
... //some lines
// Start craps
    P = GetRandomPlayer(); //was sorted a random player with those checks RIGHT NOW (1*)
    if(P != None)	//if exist one means we have people in server
    {
        if (kakuCount < kakuTime)kakuCount ++; //bla bla increase value each second
  	if (HealthCount < HealthTime)HealthCount ++;	//the same

        if(kakuTime-kakuCount < 5 &&  kakuTime-kakuCount > 0) //suddenly is almost coming bonus
        {
         BroadcastLocalizedMessage(class'UTJRandomRedeemerMsg',kakuTime-kakuCount,P.PlayerReplicationInfo  ); //3,2,1 Let's burn !!!
        }

	if(HealthTime-HealthCount < 5 && HealthTime-HealthCount > 0) //Incoming other one
	{
   	 BroadcastLocalizedMessage(class'UTJRandomHealthMsg',HealthTime-HealthCount,P.PlayerReplicationInfo  ); //3,2,1 Better
a beer...
   	}

      //BroadcastMessage("Count"@kakuCount@" kakuTime"@kakuTime);

        if (kakuCount >= kakuTime) //Right now we have time to redeemer
        {
   	     kakuCount = 0; //reset value for future bonus
             P = GetRandomPlayer(); //LOL, we did not sorted already a player (1*) ? grr, very interesting
             if(P.bIsPlayer) //LOL, is already player because exist 2 checks - :|
             {
               BroadcastLocalizedMessage(class'UTJRandomRedeemerMsg',kakuCount,P.PlayerReplicationInfo  );
               GiveRedeemer(P);
             }
        }

        if (HealthCount >= HealthTime)
        {
	     HealthCount = 0;
             P = GetRandomPlayer(); //Keep pissing me off... (1*)
             if(P.bIsPlayer) //Yeah, no wander
             {
               BroadcastLocalizedMessage(class'UTJRandomHealthMsg',HealthCount,P.PlayerReplicationInfo  );
               GiveHealth(P);
             }
	}

    }
//craps end
Is a double sort of player and a double check enhanced with another recheck for a nasty bIsPlayer which can be addressed only as TournamentPlayer. Spectators are different classes not TP so won't ever bug the game. I was under accusation for stoling UTJ codes ? Really ? How many mods have these stupid checks and we ask for a heavy timer ? Good, I reworked this timer and I removed all triple checks. Is MY TURN to do timers.
Yes, now I deserve to slap myself because I didn't others earlier.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sat Jan 19, 2013 6:14 pm

Timer was simplified, I played a few maps to see if everything is fine. Um... maybe I have to develop a bit A.I. technology based on movers number. Mover visibility is causing issues - local game is very different from Net-Game based on these original craps. I simply cannot do everything from my wishes because Movers are just garbages. I'm really curious which one of testers guys checked this chapter - I think he sleept nice and later said: IS OK ! - LOL.

Will be better to see if exist more movers in a map following 2 ways:
1) Movers, 1 or 0 pieces = FULL Power HUNT - no move until remains 0 threat in zone;
2) Movers, a lot = Restricted hunt - hunt nearby enemy and do not waste to much time (current technology) - I'm still not so glad about this;
3) Is not developed yet - High Speed hunt for 10 minutes remaining - run and gun without camping as much as possible (I'm thinking to implement this ... or ... Too much load ?)

At point 2) - a few details. In Net Games any computer controlled pawn can see through a door like being unexistent. Even they attempt to fire at enemy completely ignoring that closed door. Assuming Monster and Bot, both of them being very angry, will see them fighting over that door until game is ended "Time OUT" or simply server/standalone crashed after a bunch of hours because of millions of garbage objects filling memory and ruining game - yep, a PC is not unlimited as some of you are thinking.
In this point 2) I added a condition to not insist so much in hunting, if exist issues caused by bad mapping that's not my problem.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sat Jan 19, 2013 7:41 pm

And if until this moment, player was able to use any of those ... um ... 5 colors ?; red, blue, green, yellow (gold), and... no color (or white ?) changing them right in game and being red again in 2 matches, I think after a few tests I solved completely playing in any color as long as you are connected to a server. I did not do strong tests using Nexgen, at first look things seems to works properly.
I contact server using yellow color - I vote - I play a bit - I vote - I play again - I vote - I play - after all these checking myself I see the same yellow (gold) color unchanged using normal skins not any "work".

How was solved - for codes interests - I'll explain a few things. Modifying skin is coming from TeamGamePlus as follows (I just suppressed useless things):

Code: Select all

event PostLogin( playerpawn NewPlayer )
{
	Super.PostLogin(NewPlayer);

	if ( Level.NetMode != NM_Standalone )
		NewPlayer.ClientChangeTeam(NewPlayer.PlayerReplicationInfo.Team);

}
And new codes will look as follows:

Code: Select all

event PostLogin( playerpawn NewPlayer )
{
	Super(DeadMatchPlus).PostLogin(NewPlayer); //Do call to parent skipping TeamGamePlus

/*
	if ( Level.NetMode != NM_Standalone )
		NewPlayer.ClientChangeTeam(NewPlayer.PlayerReplicationInfo.Team);
	Remove this section - client won't change any team 
*/

}
Also we have to debate AddToTeam, this one will be like this:

Code: Select all

function AddToTeam( int num, Pawn Other )		//Yea, exactly to Team (not outside :D)
{
	local teaminfo aTeam;
	local Pawn P;
	local bool bSuccess;
	local string SkinName, FaceName;
	num = 0;

	if ( Other == None )
	{
		log("Added none to team!!!");
		return;
	}
	if (MaxTeams == 2 || MaxAllowedTeams == 2) //So what ? Let me know if might be a problem ...
	if ( Other != None )
	{
		aTeam = Teams[num];
		aTeam.Size++;
		Other.PlayerReplicationInfo.Team = num;
		Other.PlayerReplicationInfo.TeamName = aTeam.TeamName;
		bSuccess = False;
		if ( Other.IsA('PlayerPawn') )
		{
			Other.PlayerReplicationInfo.TeamID = 0; //So, team assigned...
// PlayerPawn(Other).ClientChangeTeam(Other.PlayerReplicationInfo.Team); This is ended right now.
		}
		else if ( Other.IsA('ScriptedPawn') )
			ScriptedPawn(Other).TeamID = 1; //Works for sure in AlwaysKeep.

		while ( !bSuccess )
		{
			bSuccess = true;
			for ( P=Level.PawnList; P!=None; P=P.nextPawn )
				{
				if (P.IsA('ScriptedPawn'))
					continue;
				if ( P.bIsPlayer && (P != Other) && (P.PlayerReplicationInfo.Team == Other.PlayerReplicationInfo.Team) 
					&& (P.PlayerReplicationInfo.TeamId == Other.PlayerReplicationInfo.TeamId) )
					{	
					Other.PlayerReplicationInfo.TeamID++; 	//This indeed is important.
					bSuccess = False;			//No comment here.
					}
				}
		}
		
		if (MonsterReplicationInfo2(GameReplicationInfo).bUseLive)
			Other.PlayerReplicationInfo.Deaths = MonsterReplicationInfo2(GameReplicationInfo).Live;

		if (MonsterReplicationInfo2(GameReplicationInfo).bUseTeamSkin)	//Bla, bla ... useless trashes
		{
			Other.static.GetMultiSkin(Other, SkinName, FaceName);		//Was always nasty in Network
			Other.static.SetMultiSkin(Other, SkinName, FaceName, num);	//Cheap hacks from TournamentPlayer
		}
	}
}
Now I think time will come to remove lives usage - servers need players not to be empty - also changing color from gold to whatever, seems to lose lives count - is just another replication data wrong done in original MH, still not fixed - is necesary a reworked controller to keep player data unaltered using arrays - I think it not deserve any waste of time.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sun Jan 27, 2013 5:33 am

I developed a small fix for monster teaming during my work to other kind of monster and facing codes more directly.

In some of my latest works (I sent them to a few people) maybe a good eye observed randomly an overpowered monster (I have safe limits anyway) apearing especially at later spawned monsters. This is let's say an issue, even is not disturbing people so much (just a few chickens maybe).

I'll explain the trouble source:
A monster is initialized basically (not too much) my teaming code coming right in that moment randomly. Problem: If monster not finished initialization will keep doing this. In a moment will check if belongs to some team or not and wants to make sure about an existence of a LEADER. Since there is not leader just a whole team, will deny teaming in first check. Later (400 ms), my tweak will reinforce teaming, this time monster won't do anything because passed initialization.

This small trouble looks like was solved.
I checked monster how is looking for Leader. I just saw a simple check not very detailed. If monster wants a Leader this means can be ANY kind of Leader, doesn't matter the state. To avoid a relevancy problem, I set a leader in first second of timer after IsRelevant check, to not brutalize the console with manure.
ChooseTeamAttackFor returned errors as usual (by Epic) so I set another trick embedded in this fake Leader to fool them completely. Also I'll reset any already existent Leader because if this one is dying, all later monsters will reject teaming again.
Now I have to check more maps with monsters spawned to notice if they might be still overpowered.
I don't know how many people understood how works teaming at monsters. I noticed in maps a few attempts but ... nvm, let me be happy until next point.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Tue Jan 29, 2013 4:37 pm

Yep, next point (rare but really annoying). Something exist in default stuff and is named
TriggeredDeath. A trigger combined with this stuff is meant to kill a pawn instigator touching this assumed bad zone.
This one works fine for Bots as for human Players... yeah, even killed and scorekill are called perfectly... but... monsters are just temporary dead in such cases, lol. Once touched area by a player, monsters seems to become alive again (they aren't removed as supposed) of course troubles are coming from Engine.Pawn (as usual), combined a bit with PreventDeath which is triggering a code to not completely kill the creature. This thing looks very ilogic if not really dumb. Monster is hidden cannot be touched by projectiles, see HidePlayer() - "awsome" ideea as presented and monster hidden having exactly 1 health point:

Code: Select all

function HidePlayer()
{
	SetCollision(false, false, false);
	TweenToFighter(0.01);
	bHidden = true;
}
and

Code: Select all

	// mutator hook to prevent deaths
	// WARNING - don't prevent bot suicides - they suicide when really needed
	if ( Level.Game.BaseMutator.PreventDeath(self, Killer, damageType, HitLocation) )
	{
		Health = max(Health, 1); //mutator should set this higher
		return; //Nelsona: Really ? How much ? 10000 is enough ?  :twisted: 
	}
And, they can kill you of course even you cannot kill them once awaked to life.
First time I was sad but later after different attempts to fix this real stupidity, I found a more spectacular fix when a monster is killed by nobody without any accesed none.

Code: Select all

function killed.........
.......
	else if ( Killer == None )
	{
	if ( Other.IsA('ScriptedPawn') )
....... //checking different deaths
... //in end of subject
	if ( ScriptedPawn(Other).CarcassType != None )
		ScriptedPawn(Other).SpawnGibbedCarcass(); // Happy death with new suit...
	Other.Destroy(); //And ... Happy holiday !
	return; //Decide if you want this or not... I want it for the moment.
...
//Ura !

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sun Feb 10, 2013 4:56 pm

As EG concluded, monsters might develop dumb behavior firing in a spot without a relevant target. This behavior is more visible if monsters aren't interested about themselves just about a few Bots and Player. I did not checked in detail with a MindReader recoded, I just supposed what is about. 95% code works fine (10% still causing troubles based on LastSeenPosition ?), anyway action is more logic now. Monster with player enemy if cannot see him for a while will wander stopping spaming projectiles useless. To not have a nasty load I developed a timer checking this each 7 seconds (6 seconds seems a kind of limit in A.I. combat when is attempting to change strategy or to wander - I saw this somewhere). If this time is passing and monster is sleeping still firing forever, there are chances to stay calm until player shows up again.

Interested ? Is like this...

Code: Select all

class AMutator expands Mutator
	config(Somefile);
var int lolattacktime, blockattacktime;
....
function postbeginplay
{
...
lolattacktime = 0;
blockattacktime = 7;
...
}
....
function timer()
{
local.....;
local.....;
...
	for ( P=Level.PawnList; P!=None; P=P.NextPawn )
	{
		ST = SkaarjTrooper(P);
		S = ScriptedPawn(P);
		B = Bot(P);
		Q = Queen(P);

		if (S != None && S.Health > 0)
			{
.....
			lolattacktime++;
			if (lolattacktime >= blockattacktime)
			{
			if ((S.Enemy != None && S.IsInState('RangedAttack') && !S.CanSee(S.Enemy)) || (S.Enemy == None && S.IsInState('RangedAttack')))
			{
				S.Target = None;
				S.bHunting = False;
				S.GotoState('Wandering'); //not touch enemy
			}
			if (S.Enemy != None && S.Target != S.Enemy && S.CanSee(S.Enemy) && S.IsInState('RangedAttack'))
			{
				S.NeedToTurn(S.Enemy.Location);
				S.Target = S.Enemy;
			}
			lolattacktime = 0;
		}
...............
...............
If is not good, do not use this.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Tue Feb 19, 2013 5:49 pm

Moving forward.

If monsters are nice, if Bots copied a small part of player attitude, if Bot support is added... sometimes I don't know where I need to go, which objectives are completed and which aren't completed especially in bigger maps with objectives not very announced.

Also an unknown map well pathed might frustrate player looking at Bot how accurate "knows" mission.
Well, continuing the debug part of mod worked by me, I implemented Net Code for ShowPath to be available ON-LINE (testing purpose and navigation help). I just put an add-on to not ruin "RememberSpot" just to set another usefull feature.

I simply make player at his "mutate ai" command to "rent" some A.I. content.

If player is typing "mutate ai", Waypoints switch visible to invisible and reversal - but, this is triggering next objective hunted by Bot to be "Destination" for human as well. If player will input ShowPath, the magic lamp will spawn at nearby pathnode (even having a stronger light - to be a bit visible behind doors). The magic lamp will guide player to next objective untouched. For the moment I'm checking everything and I fixed a small code to not ruin Leader at testing maps. For future if I'll start doing maps I need to have a good mod to "speak" about everything which isn't OK. I cannot set 200 fixes because will do a heavy PostBeginPlay which seems to make things unwelcomed if it takes too long (slow machines). Examples are a lot:
-a code to do a general mover fix - mapper's laziness;
-another code to fix dumb mover setting TriggerControl (new "ideea");
-a code to fix a monster tag from a factory having the same tag with factory - stupid Accesed None - a new "feature";
-a code to check useless drawscale;
-a code to check wrong INI settings ?;
-a code to manage HUDs;
-a code to complete replacements correctly;
-a code to remove spaming;
-a code to make teaming correctly;
-a code to... 100 × bullshits :evil: .
Is just a hard load heavily managed even by strong machines (not helps so much).

I'll bet on 10$ that nobody can do a MH map for general MH Not only for
mod A or mod B:
- movers set correctly;
- monsters from map by default to not intend to fight each-other in firsts moments;
- monsters to not fall into void because of dumb placement ideeas;
- no crappy words repeated to piss off people - by native english speakers;
- paths added well;
- small areas with monsters creating traps and guarding well their objectives;
- Bot support functional;
- no idiotic polys slowing down performance;
- brushes deintersected correctly following rules to not have BSP holes;
- no triggers looping themselves;
- inventories to help hunting;
- no stuff without Net Codes;
- ect. ?
I'm wander why I'm working at each detail in mod, because others seems only to do a kind of "feign mapping".

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Fri Feb 22, 2013 1:34 am

Note: Some commands (even good in testing purpose) aren't available as player in 451 versions any being "fixed" only for admins. Who used them since they doesn't have ON-LINE support ? RemoteRole = ROLE_None like decals :P.
Except other new exploits and unwanted "fixes" for different native functions compromised in 451 version, I'm wander when UTPG team will return to finish their job, because is not only incomplete and developed new bugs but there is still a security hole unfixed - Anthrax dealed with that (and more ?) BUT I WANT a fix FOR 440 :cry: .

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sun Mar 10, 2013 6:29 pm

Now I have been looking over decals for MH and concluding something incomplete.
- Monsters have shadows in player not server;
- Carcasses are splashing some blood (not a lot - 100 pieces with decals aren't a charm);
- CorpseFlies are spawning but I forgot CorpseRats - I solved this as well;
- Those Corpse Pawns are about to die in short time (assuming they are small with a small life) - useless to see them trapped unkillable in a zone inaccesible for player - great mapping in subject :(;
- Since last position was a bit harder I just brought blood for living monsters damaged near walls, they are splashing blood over wall behind them like Tournament Players. Don't worry, water zones have their specific blood type like smoke.
Land Fight:
TentacleUnderAttack.JPG
Water Fight:
Water_Damage.JPG
Water_Dying.JPG
And of course those decals won't live forever to brutalize video-card. I think is a good looking game. Maybe next move will be to make Scoreboard a bit nicer.
You do not have the required permissions to view the files attached to this post.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sun Mar 10, 2013 6:56 pm

Bad for me, I forgot something. Creatures with green blood:
EvenGreenBlood.JPG
For Water as well
UnderWaterMerc.JPG
I think is OK now.
You do not have the required permissions to view the files attached to this post.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sat Mar 16, 2013 5:11 pm

In fact as an old request, there is other option possible (I'm thinking to add it or not - I'm undecided).

Problem with MaxMonsterHealth was solved a long time ago - very accurate - 0.000 error.

I can solve MinMonsterHealth as well. Is for special cases when skilled hunters want to prove their awsome hunting skills. We can set as configurable value a minimum of health allowed for monsters. Example: A pupae won't play with less than 500 HP, also for others except Corpse Monsters (CorpseFly and CorpseRat). Game can be more challenging if was so easy until this moment. If A.I. paths are included in map this might lead in a really awsome hunt (of humans, :P - or a nice fight with decals and blood on walls).

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
Location: Still at Keyboard
Contact:

Re: Need More Fixes ?

Post by Nelsona » Sun Mar 17, 2013 5:00 am

Back in ideea. NO, is nice to see them rescaled not equal. Is not very smart to see Krall with default the same health as Pupae. A multiplier is a more proper option than a fixed value.

User avatar
Hermskii
Site Admin
Posts: 8514
Joined: Sun Jul 10, 2005 9:56 pm
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: Need More Fixes ?

Post by Hermskii » Sat Mar 23, 2013 9:00 pm

I need to go ahead and make a "Nelsona Knows" section or topic and put all of his great finds in one place. HOOK...you reading this???
~Peace~

Hermskii

Post Reply