Clean enough

Need some nice Mods? Here, you are right!
Post Reply
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Clean enough

Post by sektor2111 »

If exist the question about playing a MonsterHunt with "stock" Pawns pretty clean, the answer is YES.

All need is a package with stock copied reworked. Later we speak about replacements, not common replacement because it won't work. I was writing a few lines (probably aprox. 400 lines) which can be extended for any additional packages doing replacements even without dependencies (non stock creatures). All package needed is new stock+add-ons with New Pawns. Replacement tool might work as Server-Side calling them from packages and copying MESHES without to call original Pawn class. Several things are operated before to spawn creatures to get defaults properly set. After spawning, we put back changes to not screw class. We can copy a lot of things creating almost perfect clones - including monster placed into other monster, including name, including "an IceSkaarj" not "a IceSkaarj", including lightning in case of admins disturbed by dark Levels. You might take a look at resources (source-code only) and improve them if need something or bugs are found. In MH5.04 where Skaarj have weapons, clones seems good too.

Aside note: I have educated a bit my NsMonster package making it more MH compatible (were too aggressive at bumping chapter).
Here it is >
MHReplacer.zip
(7.18 KiB) Downloaded 123 times
Edit:
Errata at "Changer.uc"

Code: Select all

			proto = Caps(T.Prototype);
			bFoundMatch = False;
			if ( proto != "" )

bFoundMatch has been set to False before to scan next factory else we have only a factory changed.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Clean enough

Post by sektor2111 »

And now before to have the "magic server-side" I have to reconsider creatures from MyLevel to not get screwed in Factory, that's easy but I forgot about them in first attempt.
I think I know why Sliths are immune at "corroded" problem. When they were using different classes looks like "fire-offset" might be damaging them randomly. Mesh + coordonates are piece of crap in here. NsMonster will be fine tuned aaand... RangedProjectile variable copied delayed or excepted for such case.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Clean enough

Post by sektor2111 »

Because in 2015 I got mad at still monsters seeing me through doors I think "my stock" are better as follows:

Code: Select all

function SeePlayer(Actor SeenPlayer)
{
	// log(class$" has line of sight to player");
	if ( Pawn(SeenPlayer) != None && Pawn(SeenPlayer) != Self && ValidSight(SeenPlayer) )
		if ( AttitudeTo(Pawn(SeenPlayer)) < ATTITUDE_Ignore ) //Prevent anything nasty
		{
			if (SetMyEnemy(Pawn(SeenPlayer)))
				LastSeenPos = Enemy.Location;
		}
}
And new function works for MBot and NsMonster in the same way. Simple as pie

Code: Select all

function bool ValidSight(Actor SeenPlayer)
{
	local bool result;
	local actor HitActor;
	local vector HitLocation, HitNormal;

	result = False;
	if ( SeenPlayer == None )
		result=False;
	HitActor = Trace(HitLocation, HitNormal, SeenPlayer.Location, Location, false);
	if ( HitActor == None )
		result = True;
	return result;
}
Edit: Some... creatures having suffix as original stock might do funky things... with animations and meshes. These being non-stock I set rules (after arguing with Core - I'm not sure if it is bugged native or not) to prevent replacement at this moment of creatures which aren't from UnrealI and/or UnrealShare.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Clean enough

Post by sektor2111 »

I think I'll keep this version (compiled of course). It can be modified for other custom types as well.
MHReplacer_June_04_15.zip
(7.95 KiB) Downloaded 97 times
Post Reply