Ravenfield

Ravenfield

440 ratings
AI effective range decreaser
4
3
7
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Mutators
File Size
Posted
Updated
7.029 KB
29 Mar, 2022 @ 9:18pm
3 May, 2022 @ 4:41pm
8 Change Notes ( view )

Subscribe to download
AI effective range decreaser

Description
This is my attempt to Fix Super human AI snipers who kills you with pistol or rocket launcher from far away.

It simply decreases all bot weapons' effective range to assigned divided value on spawn.

You can set the minimun effective range as well to prevent some weapons being used in too close.

Maybe if you want to improve this mutator try this source :




behaviour("effectiverangedecreaser")

function effectiverangedecreaser:Awake()
self.divide=self.script.mutator.GetConfigurationRange("dividevalue")
self.mint=self.script.mutator.GetConfigurationFloat("minthres")
self.maxt=self.script.mutator.GetConfigurationFloat("maxthres")

for i=1,#WeaponManager.allWeapons do
local weapon=WeaponManager.allWeapons.prefabWeapon
weapon.effectiveRange = weapon.effectiveRange/self.divide
if weapon.effectiveRange>self.maxt then
weapon.effectiveRange=self.maxt
end
if weapon.effectiveRange<self.mint then
weapon.effectiveRange=self.mint
end
end
self.gameObject.Destroy(self.gameObject)
end
Popular Discussions View All (1)
1
3 May, 2022 @ 4:48pm
help
alf
115 Comments
King of Partrea 4 May @ 10:27pm 
THIS IS SO ANNOYING IN-GAME, THANK YOU FOR MAKING THIS MOD BRO!
Meltryllis 5 Oct, 2024 @ 2:02am 
Hey Author! i'm working on my vietnam war mod config, giving the enemy team AK-47 (300 metres effective range) i want the realistic and non super human or too easy effective range,
could you give me the numbers? i want to enjoy the semi realistic battle of vietnam war's chaotic firefight

Effective range dividing value:
Maximum effective range threshold:
Minimum effective range threshold:

thanks alot!
ggggkku3234 1 Oct, 2024 @ 4:50am 
Thanks for letting me know, you are the best modder ever!
Hijong park  [author] 1 Oct, 2024 @ 2:34am 
If I were you trying to enjoy musket battle I would set split value as 1, maximum range as 100, and minimum value as 0.
ggggkku3234 1 Oct, 2024 @ 12:32am 
Could you please help me? If possible, please do this
Valid range split value:

Maximum range threshold:

Minimum range threshold:
Please write it as shown. Thank you!
Hijong park  [author] 30 Sep, 2024 @ 8:44pm 
dividing value divides the weapon's original effective range to the assigned value. if dividing value is 2 and the weapon's default range is 1000 the result will be 500.

If you want to let bots use musket at zero distance, just set Minimum range threshold to 0.
ggggkku3234 30 Sep, 2024 @ 7:08pm 
I have a question. Do I just write 100 as the "Maximum Range Threshold"? And how do I adjust the "Valid Range Split Value"? And how do I adjust the "Minimum Range Threshold"?
Hijong park  [author] 30 Sep, 2024 @ 2:49pm 
it prevents bots using the weapons within such range
ggggkku3234 30 Sep, 2024 @ 1:23am 
So what is the minimum valid range threshold?
Hijong park  [author] 30 Sep, 2024 @ 1:19am 
Then adjust maximum range threshold to 100 meters