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...
Signature location.
User avatar
sektor2111
Godlike
 
Posts: 2194
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: 1413
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.
Signature location.
User avatar
sektor2111
Godlike
 
Posts: 2194
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: 1413
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.
Signature location.
User avatar
sektor2111
Godlike
 
Posts: 2194
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: 1413
Joined: Sun Mar 04, 2012 6:47 pm

Previous

Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 1 guest