Ravenfield

Ravenfield

345 ratings
Bot skill tweaker
   
Award
Favorite
Favorited
Unfavorite
Content Type: Mutators
File Size
Posted
31.757 KB
17 Apr, 2022 @ 6:00am
1 Change Note ( view )

Subscribe to download
Bot skill tweaker

Description
This mutator allows to change skill levels of bots in each teams.





behaviour("botskilltweaker")

function botskilltweaker:Awake()
GameEvents.onActorSpawn.AddListener(self, "OnActorSpawn")
self.allylevel=self.script.mutator.GetConfigurationDropdown("allylevel")
self.enemylevel=self.script.mutator.GetConfigurationDropdown("enemylevel")
end

function botskilltweaker:OnActorSpawn(actor)
if actor.isBot then
local lev=self.allylevel
if actor.team==Team.Red then
lev=self.enemylevel
end

local sk=math.random(0,3)

if lev>0 then
sk=lev-1
end

if sk==0 then
actor.aiController.skillLevel=SkillLevel.Beginner
end
if sk==1 then
actor.aiController.skillLevel=SkillLevel.Normal
end
if sk==2 then
actor.aiController.skillLevel=SkillLevel.Veteran
end
if sk==3 then
actor.aiController.skillLevel=SkillLevel.Elite
end

end
end
Popular Discussions View All (1)
2
16 Jul, 2024 @ 7:11am
The little question of the people
JohnTheProphet
105 Comments
Karl 27 Apr @ 5:20am 
I already know that there's a new one
Hijong park  [author] 19 Apr @ 2:24pm 
Someone now made a superior one, so I don't care.
Karl 19 Apr @ 5:49am 
I saw a YT video which was about why you should not use this mod. In the beginning of the video, it showed examples of comments' opinions of this mod and apparently, i was one of them... (I know that no one cares but still, it suprised me really hard that i was seen in a video)
Canada 22 Nov, 2024 @ 6:24pm 
Broken
Hijong park  [author] 24 Sep, 2024 @ 12:06am 
The code is super simple, I'm sure one can just recreate it
𐃫 23 Sep, 2024 @ 10:54pm 
R.I.P one of the best mutators ever
Bott_le 731 31 Aug, 2024 @ 11:08am 
s it me, or do the bots use vehicles very often, but they start shooting very poorly?
The Budginator 9 Aug, 2024 @ 11:50pm 
The beginner drawing looks like the guy doesn’t know how to properly check if his weapon still has ammunition
skoop 17 Jul, 2024 @ 7:21pm 
tempiss, it doesnt work :steamhappy: