MH: Gametype vs Mutator

Discussions about GameTypes
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

MH: Gametype vs Mutator

Post by Barbie »

I'm referring to the package MonsterHunt2v3 and I have asked myself why the code is divided into MonsterHunt.uc (what is a subsubsubclass of GameInfo) and KHMBase.uc (expands Mutator). Because MonsterHunt is a new game type all code can be put into MonsterHunt.uc? Why using a Mutator also?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
FXANBSS
Skilled
Posts: 231
Joined: Thu Dec 26, 2013 7:03 pm

Re: MH: Gametype vs Mutator

Post by FXANBSS »

Maybe the difference between GameInfo and Mutator is small.
Example: AddDefaultInventory function that is from GameInfo is almost the same than the ModifyPlayer from the Mutators.

Well, i don't know too, maybe there is something that you can't do in GameInfo and you can only do it via Mutators.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: MH: Gametype vs Mutator

Post by JackGriffin »

The short answer: 2v3 was never supposed to be anything but a test version.

The long answer as to why the separation is that I was struggling to find a way to fix things that preserved the existing maps and actors. I couldn't just create a 'new' Monsterhunt gametype, as that would have caused all kinds of version mismatches. 2v1 through 2v3 were refining attempts to fix things and this culminated in MonsterHunt2 over at ModDB.

All that being said Nelsona did everything I was trying to do and he did it better all the way around.
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH: Gametype vs Mutator

Post by sektor2111 »

FXANBSS wrote:Maybe the difference between GameInfo and Mutator is small.
Now it's your turn at posting non-senses ? If you haven't coded a game-type these things for you might be identical but you really don't understand what is a mutator is and what a is game-type (game controller/game core).
Barbie wrote:I'm referring to the package MonsterHunt2v3 and I have asked myself why the code is divided into MonsterHunt.uc
And I was asking myself why CheckReplacement is part of mutator not game controller AND we need that - It's advisable to look at default DeathMatchPlus and see it Divided Too. BaseMutator aka MutatorClass for default matches is DMMutator where things are a bit fine tuned as long as after some Unreal experience Epic was busy to code a featured TournamentPlayer unable to use old stuff On-Line because of "Tournament" brilliant formula. Of course this is not an example and not how they do replacements - but used later as a main model.
You might want to rewrite something for 2015 (oops almost 2016) rather than digging into an old mod which was done using knowledge base from another old times. You also might wanna understand that SetPawnDifficulty which is important after all, called as "MonsterHunt(Level.Game).SetPawnDifficulty(...)" is doing nasty things in attached MH types because of a string named "MONSTERHUNT" for gametype which doesn't exist in this case being called that one from loaded Level which doesn't run. I have moved that in Mutator to prevent dumb things - so... I want a mutator after all but mutator is not a GAME-TYPE as GameInfo's childs. I thought that you understood these already...
I'M REPEATING and asking 1000 times what is so bad if you made a "WHATEVERMH expands TeamGamePlus config (somewhere)" with all code and you will do a null child "MonsterHunt expands WHATEVERMH;". Then calling "WhateverMH(Level.game).Something" won't mess anything + advantage of accessing functions/variables from main game core, even from another separate mutator-tool (which you might want perhaps server-side), as long as you don't have to load player with Authority specific things because player doesn't lead the action, server (quote at Sweney) "is the man".
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MH: Gametype vs Mutator

Post by Barbie »

CheckReplacement is part of mutator not game controller
What? Wait... Oh well, I assumed by logic that it would exist there, too, but it seems not. Yes, CheckReplacement is needed, so a Mutator have to be used, too.
SetPawnDifficulty
I have moved that into the Mutators CheckReplacement() function, because I did not see a sense in calling it once in GameInfo.PostBeginPlay and on every GameInfo.ScoreKill. Furthermore I have to track what Monster was changed and what not if I call SetPawnDifficulty multiple times on the same Monster (what would be done if used in ScoreKill).
"WHATEVERMH expands TeamGamePlus config (somewhere)" with all code and you will do a null child "MonsterHunt expands WHATEVERMH;
Nice trick :D
But I suppose that is only needed if 3rd stuff is running which might access "MonsterHunt(Level.Game)"?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MH: Gametype vs Mutator

Post by Barbie »

Barbie wrote:Yes, CheckReplacement is needed, so a Mutator have to be used, too.
GameInfo.IsRelevant calls BaseMutator.IsRelevant and BaseMutator.IsRelevant calls CheckReplacement - so a Mutators CheckReplacement could be done by GameInfo also. Thanks to Chris for motivating me to have a closer look. :)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH: Gametype vs Mutator

Post by sektor2111 »

Barbie wrote:I did not see a sense in calling it once in GameInfo.PostBeginPlay and on every GameInfo.ScoreKill
PERFECT :rock:
Barbie wrote:But I suppose that is only needed if 3rd stuff is running which might access "MonsterHunt(Level.Game)"?
Not needed. Simply calling a mod what is running masked won't harm anything as long as in MonsterHunt even DeathMatchPlus(Level.game).Something works flawless as TeamGamePlus(Level.Game).SomethingCalled.

Because you said 3rd let's see what I think:
- Gamestart with destroying crappy Botpack deals right from INITGame - Full control + functions goes to "someMH2" game masked by an empty MonsterHunt.uc just to deliver game in TAB for player - THIS is the main problem. Calling someMH2(Level.game). someFunction() won't fail (you might wanna be sure to prevent things to get screwed by a dumb controller or whatever retarded co-admin). And you can set a value MIG (My Game)
MIG = SomeMH2(Level.Game).
Then wrapped access MIG.bUseTeamSkins MIG.bUseLives MIG.NextPoint - after a proper check to "if(MIG != None)". The work as long as your null MH is a child of someMH2 which runs in background as ScriptedPawn code is running inside a Brute. It's the same deal for game-types preventing calls to null things;
- Replacements + other damaging and or tweaks - goes to mutator based on HandlePickupQuery, PreventDeath, CheckReplacement (even takedamage and the rest);
- Stupid regenerators - I don't like these timers inside a mutator (Epic never did this) so I dropped them in a separate actor timer based (control bonuses, control healing + ammo, control music changed, control moron monsters, control self fight if is not accepted, all "onfly" control goes OUT of any thing called mutator. Why ? This actor might also deliver simulated things replicated helping at a moment.

My dumb issues were at a moment pickups cloning - later I figured them at Suits (because of a default call which is for wick armor with empty immunity)... Later I had a recall about ASMD damage which is not copied at replacement messing mapper's setup, and so on, I hope I'll get them done well finally.

With that IsRelevant thing I was fooling once and this is the first step to mess default stuff or mutators helpers (I was intended to change rules but I stepped back faster) - more stuff will need rewritten so I prefer to stay In 3 threads: Game-Core, Mutator-Helper, Timed-Karmazor. Auxiliary - attaching small toys at nasty actors in order to control them.

Of course these are ONLY my thoughts not rules - if you have presents for public I'll be interested to see any possible new faster formula, even XC stuff, ect.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MH: Gametype vs Mutator

Post by Barbie »

Barbie wrote:But I suppose that is only needed if 3rd stuff is running which might access "MonsterHunt(Level.Game)"?
Oh well, I assumed that I am as a root admin are the only one who decide what mutator is run and what not. But there might be map embedded Mutators that run then without my knowledge... I hope I'll get informed by log entries about access violations then.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH: Gametype vs Mutator

Post by sektor2111 »

That's good because some of them in the past were proving their skill in "admin set" and they were switching things making a soup which finally was crashing. I was asking one of them if can CODE some fix rather than bullshitting in Console. He did not know how to help so I have changed password, later I lagged server as much as possible and he left "because of Internet issues". The best guard is main admin and stuff itself meant to punish bad habits. Yesterday I was fixing multiple firing - somehow I liked that (testing purposes) but I think these bugs are better to be history for 2016 which soon will knock at doors.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH: Gametype vs Mutator

Post by sektor2111 »

To not forget some needs. You might default your own player class. While new player find himself a genius trying all sort of commands you can respond on his screen what you think about his attempts and even giving him opportunity to a self kick and or logging and kicking just because he is invited to play not to mock things. You can even remove summon command which if I think well is useless in a server's normal game-play, if things are wrapped well is not a need for anything like that.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: MH: Gametype vs Mutator

Post by MrLoathsome »

Have either of you looked at the source for my UT2U1 tweak mutator?

The main thing it does is to intercept that base call to the CheckReplacement
and fixes many of the issues you are discussing.

Since that also reduces the processing that occurs every time anything is spawned, things seem to run
better all around. (Even if you are not using monsters or U1 maps/items etc.... In any default UT game.)

Look at that function in the default UT99 code. Why is it doing all that?
Only reason, was because they were still selling Unreal and Unreal Gold at the time.

Its just a few functions that you should be able to merge in with whatever project you wish.
Pretty sure it must happen in a mutator, and not the gametype code however.

Correct me if I am wrong, or if UT2U1 has horrible bugs I am not aware of.
8)
blarg
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: MH: Gametype vs Mutator

Post by papercoffee »

MrLoathsome wrote:UT2U1
Even bots getting smarter and react more natural instead of "I ignore the enemy until I can get this pretty Shock-Rifle... Oh look health vials... and the colour fits to my shoes."
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH: Gametype vs Mutator

Post by sektor2111 »

I have options to stop replacements as needed. Mod used by me is able to detect XC_Engine (I read each word posted by Higor) without creating a dependency, and won't use internal handler if XC_Engine is v16 able to hook old weapons. MY PROBLEM was client - server ran clean as crystal, in big parts that MeleeDamageTarget can be a bit loved - by BOT - read again - Bot is fixing that monster error. The rest of changes between Weapon/TournamentWeapon are just too crappy for client, not to mention animations missing blabbering messages - we should take care at client too NOT ONLY server. Did I mention some stupid projectiles fired by Old weapons ? I guess not. Let me see, my way is replacing them for stopping dumb things in client as long as I don't have any longer any sort of Skaarj problem inside MH2 toward weaponry replacements. Issues are on other side...
Because Barbie started to debate Mutator vs Game-Type I have something + info based on observations. My hard load is... TIMER used. That's a devastator but is in fashion. You don't have MH if any regen doesn't exist - so to speak low skill is trendy now days, not fighting team-work based. I could write a different regenerating tool but there are other interesting things to study. These days are boring for me and I'm relaxing by fixing Bot Pathing in some DM stuff playing rarely MH.
The rest of my games with Monsters doesn't use DMMutator after all having their own BaseMutator - they also uses a handler if XC_Engine is not detected.
Post Reply