GoldenEye: Source Forums

  • November 23, 2024, 03:05:00 am
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Change Bots Target Priorities  (Read 7403 times)

0 Members and 1 Guest are viewing this topic.

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Change Bots Target Priorities
« on: August 19, 2012, 12:35:13 pm »

This question is really aimed at KM, as he is probably the only one that can answer me, though correct me if I'm wrong of course. I was wondering if there is any console command to make myself the only target for bots in deathmatch, so essentially all bots against me. This would be really fun, it would be like when you let the KF7 rip in Facility and all the guards would come running.
Logged

TriDefiance

  • 00 Agent
  • ***
  • Posts: 343
  • Reputation Power: 78
  • TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!TriDefiance is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #1 on: August 19, 2012, 12:41:16 pm »

As KM stated before, he will be adding more features to the AI system. A command that let's all the bots go after you is currently not in 4.2, put I'm pretty sure he'll but it eventually. As for now, just play free for all! :)
« Last Edit: August 19, 2012, 12:47:52 pm by TriDefiance »
Logged

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Change Bots Target Priorities
« Reply #2 on: August 19, 2012, 01:56:11 pm »

You will need to edit the bot's script, which is not hard at all.

Open up "gesource/scripts/python/Ai/bot_deathmatch.py"

Scroll down to line 55, you'll see a function called "IsValidEnemy( self, enemy ):"

Change the contents of that function to:

Code: [Select]
	def IsValidEnemy( self, enemy ):
myteam = self.GetTeamNumber()
if myteam != Glb.TEAM_NONE and enemy.GetTeamNumber() == self.GetTeamNumber():
return False
if enemy.IsNPC():
return False

return True

The problem with this, however, is the bots will still target other NPC's as enemies through the "Seek Enemy" routine. But we can fix that too.

Open up "gesource/scripts/python/Ai/Tasks/CommonTasks.py"

Go to line 15, add this right below the part that says "for contact in contacts:"

Code: [Select]
			if contact["ent_handle"].Get().IsNPC():
continue

Remember in Python, indentation MATTERS.
« Last Edit: August 19, 2012, 02:10:29 pm by killermonkey »
Logged

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #3 on: August 19, 2012, 02:07:37 pm »

Thanks a lot KM, really nice of you to do that. Can't wait to try this, I reckon it'll be great fun. :)
Logged

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Change Bots Target Priorities
« Reply #4 on: August 19, 2012, 02:10:54 pm »

I made a small typo in the second part. It should be contact["ent_handle"], not c["ent_handle"]
Logged

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #5 on: August 19, 2012, 02:19:40 pm »

Thanks. :)
Logged

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #6 on: August 19, 2012, 02:28:41 pm »

Can't tell if it works, it says that the bots are joining the game, but they don't, it's just me myself and I.

Don't want to cause you any hassle KM, you have enough work with this mod, I thought there might be a quick method through console for this, but it's not important. ;)
Logged

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Change Bots Target Priorities
« Reply #7 on: August 19, 2012, 02:45:27 pm »

I didn't test my code so there may be errors. Lemme try it out myself

I have attached the modified scripts to this post. Just unzip them to your sourcemods directory (folder structure is preserved).

I tested this and it works, pretty neat actually. I can make this a mode eventually! Thanks for the suggestion.
« Last Edit: August 19, 2012, 02:58:52 pm by killermonkey »
Logged

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #8 on: August 19, 2012, 03:10:50 pm »

Your a star, and your welcome. :)
Logged

markpeterjameslegg

  • Did I fire six shots? Or only five?
  • 00 Agent
  • ***
  • Posts: 879
  • Reputation Power: 202
  • markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!markpeterjameslegg is awe-inspiring!
  • Offline Offline
Re: Change Bots Target Priorities
« Reply #9 on: August 19, 2012, 03:32:57 pm »

OMG! This is flipping awesome. I've just been hunted like a dog, at one point at least 2 or 3 of the bots were using Rocket Launchers against me, my heart was actually racing trying to survive the onslaught of Rockets flying at me, and the buzz I felt when I managed to take a couple of them down with just a pistol was immense. This mod should definitely have a survival mode. Great job KM. ;D
Logged
Pages: [1]   Go Up