Page 7 of 12

Re: SmartStockBots mutator

Posted: Fri Nov 11, 2022 10:29 pm
by Que
interesting.. but id rather not be dependent on XC_Engine tbh. but good to know. thanks

Re: SmartStockBots mutator

Posted: Wed Jan 11, 2023 3:37 am
by Buggie
Spectate such bots:

Re: SmartStockBots mutator

Posted: Sun Jan 15, 2023 4:54 am
by Buggie
New features:
16. FixCTFReturnOnlyAlternatePaths
- Fix select AlternatePaths on map with bReturnOnly AlternatePaths.

As result:
- bots not do dumb runs to inproper spot.

Work only for CTFGame and subclasses of it. Require AlternatePath bReturnOnly actors on map.

17. AvoidMoveToDead
- Remove MoveTarget if it is dead pawn.

As result:
- bots not do dumb runs to invisible dead enemies.
Updated in first post: viewtopic.php?f=7&t=15400

Re: SmartStockBots mutator

Posted: Sun Jan 15, 2023 2:36 pm
by Old UT Veteran
Buggie wrote: Sun Jan 15, 2023 4:54 am New features:
16. FixCTFReturnOnlyAlternatePaths
- Fix select AlternatePaths on map with bReturnOnly AlternatePaths.

As result:
- bots not do dumb runs to inproper spot.

Work only for CTFGame and subclasses of it. Require AlternatePath bReturnOnly actors on map.

17. AvoidMoveToDead
- Remove MoveTarget if it is dead pawn.

As result:
- bots not do dumb runs to invisible dead enemies.
Mind explaining a bit more about #17? Maybe I haven't been paying attention. :tongue:

Re: SmartStockBots mutator

Posted: Sun Jan 15, 2023 3:40 pm
by Buggie
It hard notice if you not use mind reader.
Usually bots jumps as monkeys and hard understand what and where, so such behavior goes unnoticed.

I observed this behavior in CTF games for bots who defends, but suspect it can be in other cases as well.

Bot wanna kill enemy. Bot see enemy close enough. Bot set Enemy as MoveTarget. Which make it reach destination for bot.
Bot kill enemy or this do someone else. (possible later cause bug).
Bot not check state of Enemy. bot just simply goes to dead Enemy. Which is hidden, in state Dying and basically just move invisible with same speed.
For humans actual view goes to head gibs which spawned on death and jumps on floor.
For bot change movement need external distraction or reach MoveTarget.

I see as bot chase dead enemy for 1 or 2 seconds, and after turn to wandering or roaming. Or bot reach dead or timer for movement out and MoveTarget updated.

Re: SmartStockBots mutator

Posted: Sun Jan 15, 2023 5:10 pm
by papercoffee
Just tested it ...holly sheet those bots got some moves.
They certainly gave me a run for their money. First time I got defeated by bots and don't feel ashamed.

:gj: :agree1: :tu: :rock: well done Buggie.

EDIT----------------
Now I feel the urge to remake my Northern Lights map fitting for vehicles.

Re: SmartStockBots mutator

Posted: Tue Jan 17, 2023 4:16 am
by Buggie
Issue: Skaarj getting stuck
Reason: Bad code in OldModels.
Spoiler
OldModelssktrooperbot use next code for Falling state (Logging is mine):

Code: Select all

state FallingState
{
ignores Bump, Hitwall, HearNoise, WarnTarget;

  function Landed(vector HitNormal)
  {
    local float landVol;
log("DBG:" @ AnimSequence @ GetAnimGroup(AnimSequence));
    if ( GetAnimGroup(AnimSequence) == 'Dodge' )
    {
      if (Velocity.Z <= -1100)
      {
        if ( (Velocity.Z < -2000) && (ReducedDamageType != 'All') )
        {
          health = -1000; //make sure gibs
          Died(None, 'Fell', Location);
        }
        else if ( Role == ROLE_Authority )
          TakeDamage(-0.15 * (Velocity.Z + 1050), None, Location, vect(0,0,0), 'Fell');
      }
      landVol = Velocity.Z/JumpZ;
      landVol = 0.008 * Mass * landVol * landVol;
      if ( !FootRegion.Zone.bWaterZone )
        PlaySound(Land, SLOT_Interact, FMin(20, landVol));
      GotoState('FallingState', 'FinishDodge');
    }
    else
      Super.Landed(HitNormal);
  }

FinishDodge:
log("Start wait finish dodge Anim");
  FinishAnim();
 log("End wait finish dodge Anim");
  bCanDuck = true;
  Goto('Done');
}
So after do Dodge it run
GotoState('FallingState', 'FinishDodge');
And goes to

Code: Select all

FinishDodge:
log("Start wait finish dodge Anim");
  FinishAnim();
 log("End wait finish dodge Anim");
  bCanDuck = true;
  Goto('Done');
Which never end, because BotpAck.Bot in this state define

Code: Select all

    function AnimEnd()
    {
        PlayInAir();
    }
Which in this bot implement as

Code: Select all

function PlayInAir()
{
  BaseEyeHeight =  Default.BaseEyeHeight;
  TweenAnim('InAir', 0.4);
}
So this goes to endless call TweenAnim after it end, and FinishAnim never return.

I go implement next fix in Next SmartStockBots:

Code: Select all

    // try fix bug with stuck in air OldModels.OldModelssktrooperbot
    if (Bot.Physics == PHYS_Walking && Bot.Velocity.Z == 0 && Bot.AnimSequence == 'InAir' && !Bot.bAnimFinished) {
        Bot.bAnimFinished = true; // break wait in FinsihAnim
    }
With it loop break and it goes fine.
Since this check called only 10 times per seconds, there possibly additional delay up to 0.1 sec after real dodge end.
I think this OK.

Some authors (like @_21) make dirty fix of OldModels.u with replace
if ( GetAnimGroup(AnimSequence) == 'Dodge' )
to
if ( GetAnimGroup(AnimSequence) == 'Shielded' )
This make this if never run, so fall in loop not happen. But other related code too not run.

My fix must fine work with such fixed version too.

In general there must no but in such condition as
Bot.Physics == PHYS_Walking && Bot.Velocity.Z == 0 && Bot.AnimSequence == 'InAir'
So it must be safe.
Anyway if find any issues in upcoming release - report here.

Automatically merged

New features:
Local use:
After each load UT use Mod menu for activate loader. After that you can play any map (include campaign ladder) with this mutator (except network play on other servers OFC)
Not activate it if wanna play on ACE servers - ACE kick you.
You need reload UT if wanna play on ACE servers if at least once activate loader during this UT run.
scr_1673933813.png
scr_1673933813.png (12.05 KiB) Viewed 1508 times
Fixed bug with stuck bot skaarj: viewtopic.php?f=12&t=15653

Updated in first post: viewtopic.php?f=7&t=15400

Re: SmartStockBots mutator

Posted: Thu Jan 19, 2023 11:04 pm
by Buggie
Improved ShortMovements. As result bots shortcut more paths and dodge in more cases.

Updated in first post: viewtopic.php?f=7&t=15400

Re: SmartStockBots mutator

Posted: Fri Jan 20, 2023 6:01 am
by UTNerd24
Just double checking. Is XC_Engine required to use SmartStockBots?

Re: SmartStockBots mutator

Posted: Fri Jan 20, 2023 6:25 pm
by Buggie
No.

Re: SmartStockBots mutator

Posted: Wed Jan 25, 2023 12:08 am
by Buggie
New features
18. ClearStateOnDeath
- On death bot state cleared. Currently it include some vars for movement code..

As result:
- bots stop try sometimes do dumb run into wall or deadly zone after respawn.
Update in first post: https://ut99.org/viewtopic.php?t=15400

Re: SmartStockBots mutator

Posted: Fri Jan 27, 2023 7:32 am
by rdy2bz
There appear some warnings in the log file, maybe you can fix them:

Code: Select all

ScriptWarning: SSBClearBotOnDeath CTF-Face-SE.SSBClearBotOnDeath0 (Function Engine.PlayerPawn.TeamMessage:000A) Accessed None 'Player'

Re: SmartStockBots mutator

Posted: Sun Jan 29, 2023 8:19 pm
by Buggie
New features
19. ReportEnemyFlagCarrierLocation
- When bot report about "Enemy flag carrier is here." appear second message in form "Enemy flag carrier is here: %Location Name%"

As result:
- bots report to you where actually flag carrier is. Not where they be when see it.
- Fix fall from edge/into hole in some case for dodge.
- Fix flood in log.

Update in first post: https://ut99.org/viewtopic.php?t=15400

Re: SmartStockBots mutator

Posted: Tue Feb 07, 2023 6:48 am
by Buggie
- Fix crash on v436.

Update in first post: viewtopic.php?t=15400

Re: SmartStockBots mutator

Posted: Fri Feb 10, 2023 6:54 am
by Buggie
- Prevent shoot own translocator.
- Fix flood in log in rare cases.

Updated in first post: viewtopic.php?f=7&t=15400