Short Bot Note

Need some nice Mods? Here, you are right!
User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Sun Oct 15, 2017 1:58 pm

Gadavre wrote:Bots friendly in Deathmatch
:shock: I don't know the purpose of friends in such a game but this is doable by only making a child game of BotPack.DeathMatchPlus and writting there this useless attitude. Will be needed a custom DM with a few lines changed. These lines are original which are giving to Bot his attitude directives.

Code: Select all

function byte AssessBotAttitude(Bot aBot, Pawn Other)
{
	local float skillmod;

	if ( bNoviceMode )
		skillmod = 0.3;
	else
		skillmod = 0.2 - aBot.skill * 0.06;
	if ( aBot.bKamikaze )
		return 1;
	else if ( Other.IsA('TeamCannon') 
		|| (aBot.RelativeStrength(Other) > aBot.Aggressiveness + skillmod) )
		return 0;
	else
		return 1;
}
aBot does a self check into DM game for attitude toward "other". Here bot has fear in front of Cannon but also has fear in front of "Other" if that Pawn seems stronger than Bot in cause, else it will hate, so to speak will attack Pawn.
- 0 = Fear
- 1 = Hate
- 2 = Ignore
- 3 = Friendly
like in Bot code:

Code: Select all

		result = DeathMatchPlus(Level.Game).AssessBotAttitude(self, Other);
		Switch (result)
		{
			case 0: return ATTITUDE_Fear;
			case 1: return ATTITUDE_Hate;
			case 2: return ATTITUDE_Ignore;
			case 3: return ATTITUDE_Friendly;
		}

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Sun Oct 15, 2017 2:54 pm

sektor2111
Thank you! It works!!!! :tu:

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Sun Oct 15, 2017 3:03 pm

Code: Select all

   if ( aBot.bKamikaze )
      return 1;
What do these lines mean? I don't understand variable bKamikaze

User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Sun Oct 15, 2017 3:17 pm

When bot goes kamikaze has nothing to lose, he is in low health, sick, no friends, no girls, no food (kidding here), mainly will attack enemy knowing that it will die but at least will try to kill enemy at once with him, in RocketLauncher arenas usually is often seen. Wounded but will go to attack.

User avatar
Barbie
Godlike
Posts: 1699
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Short Bot Note

Post by Barbie » Sun Oct 15, 2017 3:20 pm

Gadavre wrote:I don't understand variable bKamikaze
I guess it is the state of reaching a target regardless of own loss or damage - aka suicide attacks.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Sun Oct 15, 2017 5:32 pm

How to make the bot ran to the pickup?
I maked a pickup class.And I called him SmartBomb
Then I added the following lines:

Code: Select all

class SmartBomb extends TournamentPickup;

event float BotDesireability(Pawn Bot)
{
	return  MaxDesireability;
}
defaultproperties
{
     MaxDesireability=5.000000
}
But the Bot does not run very well to the Pickup . He can take it if he just runs past. The Bot runs better to the shield or to the flag. Is there an easy way for Game Type to make the Bot run to the Pickup at once?

User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Sun Oct 15, 2017 7:30 pm

If that pickup is not linked in Path-Net (just added or summoned) it won't distract Bot, else it has to be in state pickup. See somewhere some map in Splitting MH packages thread one of my demo maps using a sort of burguer based on what was doing FeraliDragon but a bit changed for MH purposes, go see it.
See how are moving bots there...
Hint:
In order to figure if that desirability works, put a log inside or Broadcast a message on screen...

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Sun Oct 15, 2017 7:57 pm

sektor2111 wrote: Hint:
In order to figure if that desirability works, put a log inside or Broadcast a message on screen...
I dont know how to do it. I can use only command "verbose" for bots

User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Mon Oct 16, 2017 6:33 am

You have posted a code with a pickup and desirability, I don't get what is that hard to put a log in that pickup. Yeah, a map heavy loaded with pickups and with a bunch of Bots becomes server-intensive as long as Bot is aggressive doing a lot of queries here and there. Did you see Burguer map ? THERE I used logs to see how much Bot likes a burguer and when does it like that. In that case is shown how to manipulate Bot - yes, this is doable in non team-games based on pickups, fake pickups so to speak done just for distraction.
Trivia: Even if pickup grows desirability at extremes, if map is bad pathed Bot will never deal with that pickup, so testing is... sensitive, it do required pathing knowledge as well because these desirability things are tested a lot when Bot is in "Roaming".
Why do you think I drop away maps with 333 PathNodes in a small stupid room and similar ? That's a featured server damage, not mapping. I like maps with Bot support but falling into insanity is not my goal at this point.

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Mon Oct 16, 2017 9:45 am

sektor2111

Code: Select all

class SmartBomb extends TournamentPickup;

function PostBeginPlay()
{
     log("MaxDesireability " $MaxDesireability);
     Super.PostBeginPlay();
}
I correctly put the log?
Last edited by Gadavre on Mon Oct 16, 2017 9:54 am, edited 1 time in total.

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Mon Oct 16, 2017 9:54 am

sektor2111
Perhaps you would be more comfortable to communicate by mail? (gadavre@mail.ru)???

I found A.I. error in the UnrealTournament.log, but I can't fix it myself. However, I want to lay out my mod SmartBomb on this site. Please help!
Spoiler
Show
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:01CA) Accessed None
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:0625) Accessed None
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:08C6) Accessed None
This error does not appear if the Bot is given a weapon by default (ImpactHammer). But weapons should not be in my Мod at all. And I removed all the weapons through the function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
Last edited by Gadavre on Mon Oct 16, 2017 6:44 pm, edited 1 time in total.

User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Mon Oct 16, 2017 5:12 pm

Posting 1)
NO, is about desirability function - that is called when Bots are roaming. By placing logs inside them you can figure how active is a pickup in a map even in game it looks like is sitting down there doing nothing.
Bot has native engine support in roaming through FindBestInventoryPath. That thing can be used by any pawn - implemented. As result I could made that DM tester tool which called (less inspired Botyman), if in v1 there a not many features and V2 was using a bad dependent code, at least V3 is relevant for my latest toys - this is other discussion. More phrases before to be taken here as spam are doable in some chat (HoF uses a chat in main page, IRC, skype, etc.) E-Mails are too slow. On, Skype I have the same ID - you can catch me there from time to time and those are restricted, I'm not using private term because are not that private as people are thinking... I see that I can understand your English, so I'm not disturbed about communication - G00gle translations might brush things as well...

Posting2)
That roaming is indeed a bit complex, but not a rocket science, my rules are clear anything accessed must be in brackets under a condition IF that thing exist else... you can have even more bad turns.
If you want to share your "pickdestination" here in a spoiler probably others will want to read and learn some stuff as well, it might be helpful - just saying..

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Mon Oct 16, 2017 6:46 pm

sektor2111 wrote: Posting2)
That roaming is indeed a bit complex, but not a rocket science, my rules are clear anything accessed must be in brackets under a condition IF that thing exist else... you can have even more bad turns.
Spoiler
Show
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:01CA) Accessed None
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:0625) Accessed None
ScriptWarning: TMale1Bot DM-Agony.TMale1Bot0 (Function Botpack.Bot.Roaming.PickDestination:08C6) Accessed None
Maybe you have an idea how to fix it? You've already done a lot of mutators and mods. You are a great A.I. coder, once you were able to make MBot!!!

P.S. Now I'll look at the code of the MonsterHunt. There the bots do not have a hammer by default. Аnd this error dont appear.

User avatar
sektor2111
Godlike
Posts: 4072
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 » Mon Oct 16, 2017 6:57 pm

That's default Bot or a conformed one ?

User avatar
Gadavre
Experienced
Posts: 137
Joined: Sun Jan 18, 2015 7:55 am

Re: Short Bot Note

Post by Gadavre » Mon Oct 16, 2017 7:29 pm

All the default bots. I did not make new classes of bots

Post Reply