Page 1 of 1

Pawn shadow, where to enable/disable?

Posted: Wed Nov 21, 2018 2:45 pm
by Aldebaran
If I play online I see no shadow under the monsters (scripted pawns), playing monster hunt only local I have them automatically.
So my question where can I enable them for online play? Can it be a server configuration? Any ideas?

Re: Pawn shadow, where to enable/disable?

Posted: Wed Nov 21, 2018 7:03 pm
by sektor2111
My MH2 versions since 2014 if I'm not mistaking have a different deal at this chapter. Original MH and others MH2 like have this in... Server :loool: , for testing monster skill. I moved this stuff inspired from some ECoop works, heavily adapted to MH because of MH's original structure. There is no configurable shadow in originals-like versions toward monster and for weaponry is totally wrong - Server/Admin should ALLOW PLAYER to decide what kind of rendering might have and not forcing client into crap - see UIWeapons class from original MH, this is completely managed by interface (low detail, high detail, etc.) UT by default has some deal if I'm not wrong, I'm using always high details and all setup is to higher as possible, I think they do work like coronas (client setup from rendering section), possible IF THAT MH2 allows shadows in Client NOT in Server and letting UT to manage these rather than screwing client.
[attachment=0]shdws.png[/attachment]
Here is setup IF MH GAME allows the normal deal rather than adding ticks devastating server and making monster retarded (see AlarmPoints stuff in original MH, and see it in other controllers). It's a waste of resources for no good purpose in original MH format. To be honest with you I was the first moron who wrote a MonsterHunt game-type allowing monster to have shadow ON-Line exactly as OFF-Line else the rest of versions have no deal here and are immune at setup because client has NOTHING like a shadow for monster. Technically my MH controllers should have normal deal here responding at default setup accordingly, and I don't recall to do something configurable leaving render setup to manage this chapter.

Notes for controller changes:
- removing SetPawnDifficulty from AlwaysKeep into another position and from ScoreKill (that's SERVER not client and it's useless) - counting monsters should be done constantly not only when creatures are killed iterating to the death;
- removing shadow test from said function;
- adding a class WhateverNotify or such and making the deal with ScriptedPawn's shadow in client-side.

Another way:
Trying to keep these as they are, but still adding a new Notify class for client = attempting a duplicated processing for shadow in OFF-Line, and maybe figuring if monster difficulty won't get screwed here shadow being tested twice and the first will have the word here.

When you will solve these, probably client will manage decals exactly as it does with the rest of games. To summarize: just break the link between difficulty and shadow decal because it's a nonsense and then things will start working normally by themselves.
As biography code:
MH2_NS_V2, XC_MonsterHunt, whatever ancient MH_SHDWS-whatever (here was first stage - still having bugs...)

Re: Pawn shadow, where to enable/disable?

Posted: Wed Nov 21, 2018 9:59 pm
by Aldebaran
In client I have the graphics maxed out, so I don't think it's a client thing. Also, why should a renderer make a difference between online and offline play...
I saw on a UT monster hunt server that the player pawns had a shadow there but not the scripted pawns.
Also I can remember that playing on some Unreal Gold server all monsters had these shadows which looked really good.
For me it seems to be a monster hunt mod question and in monster hunt 2 that I am using there is badly no configuration for this.

EDIT: Unreal Gold has an option for "Shadow Decoration" in the client, so it will work an all servers.

Re: Pawn shadow, where to enable/disable?

Posted: Thu Nov 22, 2018 7:50 am
by sektor2111
Aldebaran wrote:Also, why should a renderer make a difference between online and offline play...
You must be new at UT I suppose...
Dynamic coronas which I did, movers and all that stuff have a DIFFERENT attitude ON-Line VS OFF-Line.
If you want to have Shadows, see those mods - those games are not MonsterHunt, I'll bet they are different coded and cannot be compared with MH2 or others, even XC_MonsterHunt which I mentioned HAS SHADOW for monsters because controller has structure changed since 2014. I'm no longer using Shadow crap in SetPawnDifficulty because Shadow was a WRONG option in MH and this should go to client not into a controller deal.

Re: Pawn shadow, where to enable/disable?

Posted: Thu Nov 22, 2018 2:06 pm
by Aldebaran
Ok, thank you for the info. I can live with that. It attracted my attention because for me the pawn shadow has a positive upgrading of the visual side. Perhaps someday I will have a look into the coding part... :ironic:

Re: Pawn shadow, where to enable/disable?

Posted: Thu Nov 22, 2018 7:19 pm
by sektor2111
Be my guest. If you have a better deal than mine I'll use yours with all credits. But I will be nice for now telling you a small... little tiny problem. If you want a good shadow according to monster size and all that stuff, you have to take in account collision cylinder where some "special" mappers are doing sh!t. In that case shadow it's an abomination making night around monster. These were new troubles encountered by me at this point when I was about to laugh happy clapping hands, a few minutes later I was about to clap my head at BPak garbage... to not forget some "surfaces" crashing game when render is trying to attach a decal over there - another "awesome" mapping.... Shortly, get ready for new troubles around decals stories.
Right now I have to admit that shadow stuff which I modified (I did not like drawscale deal - it was no deal) it's not a high performance one, each monster visible has this shadow. However, a lousy machine do works nice proving that client has some good resources for managing these Level-Adds. From there I learned how to do some tweaks in clients - useful stuff with other words not only for shadow part as much as for the rest of visibility bugs encountered On-Line.

Re: Pawn shadow, where to enable/disable?

Posted: Fri Nov 30, 2018 10:13 am
by sektor2111
I think today because I had a bit of free time, I went ahead in... some decision. If it's about fixing whatever MH map which initially had more than one issue, I will not only fix stupid things from there but I will implement this feature - MonsterShadow in client side of map without to break compatibility with MonsterHunt types already having this stuff and getting over screwed up deal from original MonsterHunt and other done in similar way - a WRONG deal after all messing up with useless actors in servers. Map in cause will deploy what client needs for having a good looking game, client has resources because it's not delegated to manage any Level.Game it's a participant. Decals are reacting at default setup, if client wants low details it's up on him.
The deal can be stolen by admins willing to add a... ServerPackage because client won't have anything if doesn't know it - if they have knowledge about this way of doing.

Cya with news in whatever mapping thread (for not being OFF-TOPIC :lol2: )

Re: Pawn shadow, where to enable/disable?

Posted: Mon Dec 17, 2018 4:17 pm
by Aldebaran
Thank you very much sektor2111 for the general suggestions how to solve the shadow issue in older Monster Hunt Mods.
After studying the main Monsterhunt class again of my MH2 I do now understand little bit how the shadow class is used with the SetPawnDifficulty function. So I have to change the hole SetPawnDifficulty system which is perhaps not that easy for me and I don't dare to do this at this knowledge stadium. I don't want to risk random server crashes...
You said you will include this client side shadow in some maps perhaps, so could a small mutator create the same effect?
I think not, you would have mentioned it already then...

Re: Pawn shadow, where to enable/disable?

Posted: Mon Dec 17, 2018 5:08 pm
by sektor2111
Aldebaran wrote:I think not, you would have mentioned it already then...
I did one a few years ago but had an old shadow borked. There is a notifier actor which is not only usable in a map, but... can be spawned in a mutator in Postbeginplay in client leaving MonsterHunt to mock with shadow in server as long as client will have another deal.

Code: Select all

class MPawnNotify expands SpawnNotify;

simulated event prebeginplay() //don't check for relevance
{
}

simulated event PostBeginPlay()
{
	local actor other;
	local ScriptedPawn S;

	//Don't add to notifylist if server, but keep available, so it's existence is replicated to clients
	if ( Level.NetMode == NM_DedicatedServer )
	{}	//mutator it's only loaded on server but does nothing there
	else
	{
		Super.PostBeginPlay(); //add.
//		log ("Pawn Notify Initialized.");
		ForEach Allactors(class'Actor',Other)
		{
			if ( Other.IsA('scriptedpawn') && !other.isa('tentacle') && pawn(other).shadow == none)	//no decal for them.
				Scriptedpawn(Other).Shadow = Spawn(class'EMonsterShadow',other,,other.location);
		}
	}
}

simulated event Actor SpawnNotification(Actor other)
{
	if ( Other.IsA('ScriptedPawn') && !Other.isa('Tentacle') && Pawn(Other).Shadow == none )	//no decal for them.
		Scriptedpawn(other).Shadow = Spawn(class'EMonsterShadow',other,,other.location);
	return other;
}
//Client Precache right now
function PreCacheReferences()
{	//never called - here to force precaching of meshes like in any normal UT game...
	//continuing mission in attempt to reduce lag as much as possible
	Spawn(Class'UnrealShare.BruteCarcass');
	Spawn(Class'UnrealShare.LesserBruteCarcass');
	Spawn(Class'UnrealShare.CowCarcass');
	Spawn(Class'UnrealShare.DevilfishCarcass');
	Spawn(Class'UnrealShare.FlyCarcass');
	Spawn(Class'UnrealI.GassiusCarcass');
	Spawn(Class'UnrealI.KrallCarcass');
	Spawn(Class'UnrealShare.MantaCarcass');
	Spawn(Class'UnrealI.MercCarcass');
	Spawn(Class'UnrealShare.NaliCarcass');
	Spawn(Class'UnrealI.PupaeCarcass');
	Spawn(Class'UnrealShare.CreatureCarcass');
	Spawn(Class'UnrealShare.SkaarjCarcass');
	Spawn(Class'UnrealI.TrooperCarcass');
	Spawn(Class'UnrealShare.SlithCarcass');
	Spawn(Class'UnrealShare.TentacleCarcass');
	Spawn(Class'MonsterHunt.RockTentacleCarcass');
	Spawn(Class'MonsterHunt.WaterTitanCarcass');
	Spawn(Class'MonsterHunt.LavaSlithCarcass');
	Spawn(Class'MonsterHunt.LavaTitanCarcass');
	Spawn(Class'UnrealI.WarlordCarcass');
	Spawn(Class'Unrealshare.CreatureChunks');

	//Reinforce Defaults
	spawn(class'TMale1');
	spawn(class'TMale2');
	spawn(class'TFemale1');
	spawn(class'TFemale2');
	spawn(class'TBoss');
	spawn(class'ImpactHammer');
	spawn(class'Translocator');
	spawn(class'Enforcer');
	spawn(class'UT_Biorifle');
	spawn(class'ShockRifle');
	spawn(class'PulseGun');
	spawn(class'Ripper');
	spawn(class'Minigun2');
	spawn(class'UT_FlakCannon');
	spawn(class'UT_Eightball');
	spawn(class'SniperRifle');
	spawn(class'WarheadLauncher');
	//Now Let's see the options for old weaponry
	//These are in fact meshes used - originals
	Spawn(class'UnrealShare.ASMD');
	Spawn(class'UnrealShare.AutoMag');
	Spawn(class'UnrealShare.DispersionPistol');
	Spawn(class'UnrealShare.Eightball');
	Spawn(class'UnrealI.FlakCannon');
	Spawn(class'UnrealI.GESBioRifle');
	Spawn(class'UnrealI.Minigun');
	Spawn(class'UnrealI.QuadShot');
	Spawn(class'UnrealI.Razorjack');
	Spawn(class'UnrealI.Rifle');
	Spawn(class'UnrealShare.Stinger');
//	Spawn(class'olweapons.OLquadshot'); //End
}
Aside, XC_MonsterHunt has a shadow, deal was already changed. If map will add another shadow the tech goes: first came, first served. Monster might have Shadow attached or added by Monsterhunt depending on priority. Shadow is only one per pawn in a Level so nothing goes bugged and server will stay with useless ticks if this is the idea - not in my maintained servers.
Script above is copied from a modified map, old Map LavaTower but this is a modified one for normal MH gaming not an Insta competition. I ran a default MH server for testing and,... it Works On-Line as long as the goal is addressing On-Line Monster Shadow.
I think if you have this in a ServerPackage which will be in ServerActors too, it will work for all MH maps which don't have a ton of load bugging actors. I used once in my noob admin times a "high tech" trick ServerActors=BotPack.UT_Eightball which was visible in all maps with LevelInfo "Reachable". Visible because BotPack is an automated Package based on game-type deps...

Re: Pawn shadow, where to enable/disable?

Posted: Mon Dec 17, 2018 5:43 pm
by Aldebaran
Thank you! I have to check this out...

Re: Pawn shadow, where to enable/disable?

Posted: Mon Dec 17, 2018 7:04 pm
by sektor2111
If you want a different deal we can discuss about another way, making indeed a simple mutator configured like coroner mutator...

Code: Select all

class Coroner expands Mutator;

const version = "1.0";

final function InitializeBugger()
{
	Spawn(class'Coron');
}

Auto State SettingUp
{
Begin:
	log ("Mutator"@Self.Class@in state@GetStateName()@is active using delay...,'Coroner');
	Sleep(2); //Stay a bit away
/*
	Deploy tracker which will stay latent in dedicated servers
but talking a lot in non-dedicated servers - for maps having no corona lights won't do anything
*/
	InitializeBugger();
	if ( Level.NetMode == NM_DedicatedServer )
		log ("Lightning bugger depleted and ready for clients...",'Coroner');
	else
		log ("Lightning bugger depleted and ready...",'Coroner');
	GoToState('');
}
This is proposed for Dedicated and Non-Dedicated servers with logging... I have to admit that I did tests only in Dedicated Servers and Off-Line, the rest of stuff is not interesting for me. You can try using previous class as replacement for "Coron" and then you might have some Shadowing mutator. So... you don't have to do anything in your MH2. If something is not working nice, use standard call from PostBeginPlay and.. remove entire state code. I did this for preventing initial server load because it's not a must have in first tick.

Re: Pawn shadow, where to enable/disable?

Posted: Mon Dec 17, 2018 9:54 pm
by Aldebaran
Great! You are my man! :tu:

It works fantastic here on dedicated server, loaded many maps and had a look in spectator mode.
Only in one of the tried maps, MH-DarkPass, the monsters had no shadow.
In map MH-MayhemCastleV2 the shadow of the big Puppae looks little bit small as the shadow of a normal Puppae.

The mutator is part of my monster hunt mod because I needed the class 'MonsterShadow' for shadow, I have not found the class you are using. But the class 'MonsterShadow' looks fine here.

Would you activate shadows for player pawns too? How should look these condition then?

Code: Select all

if ( Other.IsA('ScriptedPawn') && !other.isa('Tentacle') && Pawn(Other).shadow == none) 
            Scriptedpawn(Other).Shadow = Spawn(class'MonsterShadow',other,,other.location);
Also I am considering of removing the shadow of Gasbags, they are so huge...

Re: Pawn shadow, where to enable/disable?

Posted: Tue Dec 18, 2018 7:20 am
by sektor2111
XC_MonsterHunt has something like EMonsterShadow aka explained ExpandedMonsterShadow (which is used here - copied out of mod) and has a bit of tuning according to these scales. Default Shadow won't take in account DrawScale for Big Mercs Big Kralls, and GiantGasbag makes night around it - it's very poorly coded. I was writing other stuff there and... maybe you can improve that somehow if you have a better solution.
Players are not affected and neither Bots they have shadow hard-coded and that is another class out of MonsterHunt, in exchange you can activate/deactivate these in normal Level's conditions at will because client side has setup in menu accordingly.
I told you that in some maps won't work because maps are crapped up - I'm saying this for years. You might grow priority and decreasing net frequency but I don't know effects for other actors... miss-balancing net stuff heads nowhere, but a test won't hurt.

Re: Pawn shadow, where to enable/disable?

Posted: Tue Dec 18, 2018 12:06 pm
by Aldebaran
You helped me a lot. Yes, some maps are screwing up in this case. For example MH-Kuratorium: Some monsters have shadow and others of the same class have not. That's also if I am playing local without my "fixing" mutator so it has nothing to do with my mutator. But I like shadows so much that I think I will risk some inconsistency.

Re: Pawn shadow, where to enable/disable?

Posted: Tue Dec 18, 2018 1:16 pm
by sektor2111
Yes you can try to push a little bit network - It's about SpawnNotifier - using priority as for players but with a lower frequency and SimulatedProxy. Perhaps would help bNetTemporary in order to not load more traffic, letting Shadow to work only where it should and perfectly controlled by client player. Else you might want to check those maps - surfaces how are set because there are mappers which are only experimenting on people's back their insanity, there nothing helps unless some other hack might take place but I have to think well about it...