Splitting MonsterHunt packages?

Discussions about Coding and Scripting

Re: Splitting MonsterHunt packages?

Postby sektor2111 » Sat Feb 11, 2017 8:10 am

I was crawling codes a bit, so I'll tell what I think.
Code: Select all
   if ( (ScriptedPawn(Killer) != None) && (Other.PlayerReplicationInfo != None) ) //Weird bug... fix?
      Other.PlayerReplicationInfo.Deaths += 1;
Bug actually comes from GameInfo.Killed which has return; rather than letting codes to run sanitized for reaching at scorekill and calling stuff as should - once again, Return is Not an Answer. Update GameInfo.Killed - I have rewritten Engine anyway.
Code: Select all
   if ( (Killer != None) && Killer.bIsPlayer && (Killer.PlayerReplicationInfo != None) && (S != None) )
   {
      if ( S.bIsPlayer )
         S.bIsPlayer = false; //Prevent skaarj log bug on non-XCGE servers (?)
Like I said, in NON XCGE servers which uses UTJ Skaarj unarmed cannot be killed EVER - because of "RajorJack" stupidity and other messed up timings, ScoreKill is NOT called for it - and I'm stating on this, based on years of looking at this bug - but I have added some love in ReduceDamage - that one is being called.
Code: Select all
if (Injured != None)
if (Injured.bIsplayer && injured.PlayerReplicationInfo == None)
injured.bIsPlayer = False;
// the same with InstigatedBy
//... the rest of default code
Using this in another Botpack exactly in DeathMatchPlus root but it's doable in child games as well.
Code: Select all
   if ( aBot.Health < 1 ) //Is this even needed?
I think yes, and wrapped with a restartplayer.
Code: Select all
            if ( bAttract )
            {
               NewDest = aBot.MoveTarget; //Jumping outside a ForEach iterator is very ugly, avoid it
               break;
            }
Let's say that I saw more things done with "Break" inside an iterator with no many issues (or none issues ?)...
Next... I repeat myself 1337Mercenary is a TeamCannon not a ScriptedPawn and it doesn't have any fix nor code to trigger monster around it. Game was freezing when some 25 "Mercs" have been killed by some powerful tentacles *spawned in a MH-BoomBoomBridge test session... If you want you can write 50 ReplaceFunction types for "TeamScriptedPawn" trash - this is no longer a StationaryPawn.
Checkout all damaging things from monsters probably not all are being called but... there are SlapDamage - RipDamage - ThrustDamage, some WhipDamage is 0 by default, LungeDamage, SpinDamage. Even if some of them might not be used, they can be implemented in other child creatures so it should be recommended to have them.

Code: Select all
// Fix monster dropped weapons/items breaking the client's inventory chain
function bool PickupQuery( Pawn Other, Inventory item )
{
   local bool bResult;
   
   bResult = Super.PickupQuery( Other, Item);
   if ( bResult && Item.bAlwaysRelevant )
      Item.bAlwaysRelevant = false;
   return bResult;
}
Oh well, disagree... I had an old affinity for properly using monster weaponry... and actually I don't see what is broken as long as you don't have weaponry held before game initialization - Skaarj should not hold weapons in first server second - that's all. All monsters brought LATER in game doesn't drop bugged weapons as monsters from Map during Level.bStartUp, see MH-3072.... which people are not trying to figure "educational" stuff from there... I'm happily using weapons from Skaarj - and I don't have any "logging" problems.

Edit:Until this MH thing will be operational, probably it might be advisable to fix my goofing (no valid docs and info in 2014) toward MH, which means fixing dispersion aka OldPistol, removing UT replacements, tweaking old weaponry properly, and doing a release of a MH504 fully compatible with v503, v500, v450 in order to not cause any mismatch by creating a conformed package. And then, people can do what they want...
Underground Location.
User avatar
sektor2111
Godlike
 
Posts: 2446
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Splitting MonsterHunt packages?

Postby Higor » Sun Feb 12, 2017 7:09 am

sektor2111 wrote:I was crawling codes a bit, so I'll tell what I think.
Bug actually comes from GameInfo.Killed which has return; rather than letting codes to run sanitized for reaching at scorekill and calling stuff as should - once again, Return is Not an Answer. Update GameInfo.Killed - I have rewritten Engine anyway.

I see, it's not a bug then, it's intended behaviour by Unreal devs.
What it needs is a proper workaround, noted.

sektor2111 wrote:
Code: Select all
   if ( aBot.Health < 1 ) //Is this even needed?
I think yes, and wrapped with a restartplayer.

I am yet to spot a bot failing to respawn in my UT years.
This line is likely the result of a bug during original MH dev.

sektor2111 wrote:
Code: Select all
            if ( bAttract )
            {
               NewDest = aBot.MoveTarget; //Jumping outside a ForEach iterator is very ugly, avoid it
               break;
            }
Let's say that I saw more things done with "Break" inside an iterator with no many issues (or none issues ?)...

Forgot to remove that old comment, there was an AllActors iterator before I implemented a chained list.


sektor2111 wrote:
Code: Select all
// Fix monster dropped weapons/items breaking the client's inventory chain
function bool PickupQuery( Pawn Other, Inventory item )
{
   local bool bResult;
   
   bResult = Super.PickupQuery( Other, Item);
   if ( bResult && Item.bAlwaysRelevant )
      Item.bAlwaysRelevant = false;
   return bResult;
}
Oh well, disagree... I had an old affinity for properly using monster weaponry... and actually I don't see what is broken as long as you don't have weaponry held before game initialization - Skaarj should not hold weapons in first server second - that's all. All monsters brought LATER in game doesn't drop bugged weapons as monsters from Map during Level.bStartUp, see MH-3072.... which people are not trying to figure "educational" stuff from there... I'm happily using weapons from Skaarj - and I don't have any "logging" problems.

ANY faulty mutator/mod/map can produce bAlwaysRelevant inventory that can be transferred onto the player, not just Skaarj drops, so this is a general purpose fix that produces the smallest possible overhead by patching the pickup event.
The deal with bAlwaysRelevant inventory is a UT post-v400 patch that optimized inventory replication for pickups, the rule/limitation added is very simple:
- If item is bAlwaysRelevant=True, it only tells player of appearance and location and completely skips UnrealScript replication blocs.

Ideally this code is supposed to be added in Inventory (GiveTo), but since this MH build is supposed to run in non-XCGE servers as well, PickupQuery is just as good a location for this fix.
Now, PickupQuery isn't exclusive to players, it's also being called on SkaarjTroopers too so it qualifies as optimal fix (for two completely different problems, but related).
Just try MH-SkaarjTower_BOT on a XCGE server and you'll notice the channel list no longer reaches 1023 as it happened before this change, that's because the server isn't sending you all these SniperRifles owned by monsters.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby sektor2111 » Sun Feb 12, 2017 8:56 am

Higor wrote:Just try MH-SkaarjTower_BOT on a XCGE server and you'll notice the channel list no longer reaches 1023 as it happened before this change
Ahah, so this is for bandwidth. I though that you speak about bugged weapon dropped with invisible HUD render. That one in v504 has a cheap solution (pretty ugly I think) by refreshing all weapons owned by monsters at starting game but... now I have another method.

Me thinking then to debate this problem from outside... a small block for controlling weaponry owned by creatures - probably in CountMonsters... hm... But I'm still trying to figure a solution for getting resources at DevPath...

Edit:
And some feedback about MH Higor and FerBotz.
I took a map operational with MH and Bot, MH-AS-ColdSteel. Of course in my version I don't have any PathNode in walls or spots blabbering, properly tested with MHBotyman4 and working.
Ferbotz for such a case doesn't really know what they need to do, crawling around and very few time advancing level. I'm not gonna do more research about objectives chapter but such a map (like LiandriInvasion) has a valid order of objectives which Bot should follow else I don't see where is their help, I got around 2 times their score and in my 3072 map they had nasty problems with lifts and almost corroding themselves with BioRifle - I got around 10 times their score. In one of those November types conversions where all Bot was attacking Boss, 3 Ferbotz were camping around armor doing nothing. MH Console was clean but not speaking about FerBotz.

Edit2: Another fact is that some buttons probably are not gonna be accessed as before:
Code: Select all
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
Warning: Property TriggerEvent1 of Class MonsterHunt.MonsterWaypoint not found
Warning: Skipping 2 bytes of type 6
I think you should use/dispatch TriggerEvents1 ... 4, which are used in original MH maps with Bot support.
Underground Location.
User avatar
sektor2111
Godlike
 
Posts: 2446
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Splitting MonsterHunt packages?

Postby Higor » Fri Feb 17, 2017 8:19 am

Early Hint system code, Translator events are the first prototype.
You touch one and you'll be able to read it for 30 seconds (from anywhere in the map atm, will tweak textbox display later) if you aim at it.

Needs icons, closed triggers events, etc...
MH_TranslatorPreview.JPG


Also Monsters killing players code is handled better now.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby sektor2111 » Fri Feb 17, 2017 5:58 pm

I'll drop back TriggerEventX if I'm gonna use this, yeah "deprecated" as they were before. Stuff which I wrote for keypoints will get broken this way, attached MH versions are not working nearby this one (friendly) because variables needed and dependencies created have been removed.
Underground Location.
User avatar
sektor2111
Godlike
 
Posts: 2446
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Splitting MonsterHunt packages?

Postby Higor » Tue Feb 21, 2017 12:12 am

Rewrote OLstinger with 100% original code, UIweapons and derivates will attempt to use U1's weapon priorities instead of the OL class names.
Net simulation should be better on this stinger, there's a small different with alt-fire animations but it's a way to ensure net simulation doesn't break.

Also, coders have access to a very handy counter that tells them whether a zone has monsters or not.
EDIT: I'm taking some time because I'm working on FerBotz in parallel, testing new directives to see if they work on this MH.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby Higor » Wed Feb 22, 2017 11:15 pm

Some more interface work.
Monster waves CAN be interrupted and now said interruption is displayed on the scoreboard.
The hint system has been improved a bit, text solid, box doesn't move to left if below crosshair.

And translator events also display these...
MH_TranslatorHint.JPG



My next challenge will probably make a OL Dispersion pistol that works with the powerups.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby Higor » Fri Feb 24, 2017 9:44 pm

Some thoughts on 'splitting' and future changes.

Most users won't know better than to replace MH v503 with a conformed build, and that'll prevent a lot of clientside features from being available.
There's also a pending commit with decal changes too, and if applied, most ppl playing on v503 won't see monsters bleed at all.

Splitting MH in two packages isn't only related to upgrades, but also to client interface while the core MH provides basic functionality for these interfaces/extensions to work.
So, one way to make things work in all environments would be to make the visuals and interface a separate, non-conformed package so the server would be running GEN 2 + interface while the client runs GEN 1 + interface.
Communication between the extension and the core will be a new chapter if that approach is going to be taken.
It's fairly easy to make the extension communicate with a core that may not be present in the client, simply use accessors and package dependancy will go away.
But on the other side, making the core communicate with a generic extension without adding package dependancy will require a few new tricks.

The good side of this is that if this is done early, then beta versions of the interface would be available for testing even if the MH gen 2 core isn't finished.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby sektor2111 » Sat Feb 25, 2017 7:45 pm

I think for that Gen 2 package player should download something for getting new things (HUD ?, etc.) else it will not use too much new stuff... I was probing a default player 503 with new MH and it doesn't look like an improved game.
Underground Location.
User avatar
sektor2111
Godlike
 
Posts: 2446
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Splitting MonsterHunt packages?

Postby SC]-[WARTZ_{HoF} » Sat Feb 25, 2017 7:54 pm

sektor2111 wrote:I think for that Gen 2 package player should download something for getting new things (HUD ?, etc.) else it will not use too much new stuff... I was probing a default player 503 with new MH and it doesn't look like an improved game.


I agree that for scoreboard/HUD extras there should be an add-on package for MonsterHunt.u so default player 503 client can atleast see those improvements.
Image
Image
Image
SC]-[WARTZ_{HoF}
Adept
 
Posts: 294
Joined: Tue Feb 21, 2012 7:29 pm

Re: Splitting MonsterHunt packages?

Postby Chamberly » Sat Feb 25, 2017 8:20 pm

Additional package! Don't want to download it? Press F10 to skip!

I hardly ever see these package nowadays.
Image
Image
irc.globalgamers.net #uscript
http://irc.lc/globalgamers/uscript
Image
User avatar
Chamberly
Godlike
 
Posts: 1491
Joined: Sat Sep 17, 2011 4:32 pm
Location: Tennessee, USA
Personal rank: Dame. Vandora

Re: Splitting MonsterHunt packages?

Postby SC]-[WARTZ_{HoF} » Sat Feb 25, 2017 8:58 pm

Chamberly wrote:Additional package! Don't want to download it? Press F10 to skip!

I hardly ever see these package nowadays.


I haven't seen one of those in awhile. I think maybe secktor is thinking new conformed MonsterHunt.u could fix more server side stuff while addition package for hud improvements for clients.
Image
Image
Image
SC]-[WARTZ_{HoF}
Adept
 
Posts: 294
Joined: Tue Feb 21, 2012 7:29 pm

Re: Splitting MonsterHunt packages?

Postby sektor2111 » Sat Feb 25, 2017 9:38 pm

Perhaps default properties will trigger an automated download dependent file. I'm not sure if "Optional" do helps at this point. However HUD and Scoreboard as separate adds are not that big, download takes around 1 second, I don't see any reason for making them Optional, just allow everyone to enjoy new look.
I recall a server with a file having optional download. I pressed F10 and later... client crashed because file content was needed but file was not on purpose for mapping.
Underground Location.
User avatar
sektor2111
Godlike
 
Posts: 2446
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Splitting MonsterHunt packages?

Postby Higor » Sun Feb 26, 2017 3:58 am

Counters associated to monster spawners have their status displayed on said monster spawners's scoreboard info box, text is localizable.
MH_ScoreCounters.JPG
MH_ScoreCounters.JPG (17.63 KiB) Viewed 234 times


Some of boom boy's maps use different spawner code, it could be implemented too.


============
bTournament option.
I'm considering bTournament to be used to delay game start until ALL players signal they're ready, but with the change that not all slots need to be full.
That could be used greatly for LAN's and friendly clan games.

It could also be greatly used on coop maps to get all players ready and have their items properly decide the map's starting inventory... if MH were to ever properly handle coop maps.
Can't deny that MH's potential is huge.
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

Re: Splitting MonsterHunt packages?

Postby Higor » Sat Mar 04, 2017 2:56 am

Open beta build, the whole thing has been split in 3 packages.

CR: contains content shared by server and client interfaces.
CL: contains client extensions, this is the one modders have to rename and rebuild.
MonsterHunt: base game package, requires CR.

Right now CL is almost empty, but contains templates that can be used to modify CR classes' behaviour easier, like implementing modified HUD, ScoreBoard, supporting more map events/hints, etc.

CR contains MHCR_HUD, MHCR_ScoreBoard that contain all the updated client interface.
CL contains subclasses of CR stuff with no additional code MHCL_HUD, MHCL_ScoreBoard.
MonsterHunt also contains CR subclasses MonsterHUD, MonsterBoard.
So the mechanics of cross compatiblity are these:
- 503 server, proto client: server tells client to use MonsterHUD and MonsterBoard, client uses own MonsterHUD, MonsterBoard that have CR code.
- Proto server, 503 client: server tells client to use MHCL_HUD, MHCL_ScoreBoard, client uses them as intended.
- Modded server, any client: server tells client to use custom HUD and Scoreboard, clients download it and use it.

In MonsterHunt.ini it's possible to select the extension actor that will manage the custom HUD, ScoreBoard, Event+Hint handling.

==========
When it comes to subclassing the MonsterHunt class, that's not yet ready.
So far the rules are zero interaction between CL and MonsterHunt, everything has to go through CR
Attachments
MH_proto_beta0.7z
MonsterHunt.u is undownloadable.
Do not upload to redirect.
(226.4 KiB) Downloaded 16 times
Higor
Godlike
 
Posts: 1454
Joined: Sun Mar 04, 2012 6:47 pm

PreviousNext

Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 3 guests