SmartStockBots mutator

Search, find and discuss about Mutators!
Post Reply
User avatar
Que
Inhuman
Posts: 794
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...
Contact:

Re: SmartStockBots mutator

Post by Que »

interesting.. but id rather not be dependent on XC_Engine tbh. but good to know. thanks
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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
Old UT Veteran
Skilled
Posts: 163
Joined: Sat Mar 24, 2012 1:37 am

Re: SmartStockBots mutator

Post 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:
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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.
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: SmartStockBots mutator

Post 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.
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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 621 times
Fixed bug with stuck bot skaarj: viewtopic.php?f=12&t=15653

Updated in first post: viewtopic.php?f=7&t=15400
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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
User avatar
UTNerd24
Adept
Posts: 325
Joined: Sat Oct 22, 2011 6:06 am
Personal rank: Professional Camper

Re: SmartStockBots mutator

Post by UTNerd24 »

Just double checking. Is XC_Engine required to use SmartStockBots?
I've been playing UT for so long it's practically tradition.
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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
rdy2bz
Novice
Posts: 22
Joined: Thu Nov 26, 2015 11:42 am

Re: SmartStockBots mutator

Post 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'
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post 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
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post by Buggie »

- Fix crash on v436.

Update in first post: viewtopic.php?t=15400
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: SmartStockBots mutator

Post by Buggie »

- Prevent shoot own translocator.
- Fix flood in log in rare cases.

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