Ravenfield

Ravenfield

197 ratings
Stormtrooper maker
3
   
Award
Favorite
Favorited
Unfavorite
Content Type: Mutators
File Size
Posted
Updated
34.177 KB
9 May, 2022 @ 3:32pm
11 May, 2022 @ 6:09pm
2 Change Notes ( view )

Subscribe to download
Stormtrooper maker

Description
This mutator turns bots into highly trained stormtroopers.





behaviour("stormtroopermaker")

function stormtroopermaker:Awake()
GameEvents.onActorSpawn.AddListener(self, "OnActorSpawn")
self.divide=self.script.mutator.GetConfigurationRange("scalevalue")
self.newsp=self.script.mutator.GetConfigurationFloat("spread")
self.divide2=self.script.mutator.GetConfigurationRange("scalevalue2")
self.newsp2=self.script.mutator.GetConfigurationFloat("spread2")
end

function stormtroopermaker:OnActorSpawn(actor)
if actor.isBot then
if actor.team==Player.enemyTeam then
for i=1,#actor.weaponSlots do
if actor.weaponSlots.baseSpread==0 then
actor.weaponSlots.baseSpread=self.newsp
end
actor.weaponSlots.baseSpread=actor.weaponSlots.baseSpread*self.divide
actor.weaponSlots.followupSpread.maxSpreadAim=actor.weaponSlots.followupSpread.maxSpreadAim*self.divide
actor.weaponSlots.followupSpread.maxSpreadHip=actor.weaponSlots.followupSpread.maxSpreadHip*self.divide
actor.weaponSlots.followupSpread.spreadGain=actor.weaponSlots.followupSpread.spreadGain*self.divide
end
else
for i=1,#actor.weaponSlots do
if actor.weaponSlots.baseSpread==0 then
actor.weaponSlots.baseSpread=self.newsp2
end
actor.weaponSlots.baseSpread=actor.weaponSlots.baseSpread*self.divide
actor.weaponSlots.followupSpread.maxSpreadAim=actor.weaponSlots.followupSpread.maxSpreadAim*self.divide2
actor.weaponSlots.followupSpread.maxSpreadHip=actor.weaponSlots.followupSpread.maxSpreadHip*self.divide2
actor.weaponSlots.followupSpread.spreadGain=actor.weaponSlots.followupSpread.spreadGain*self.divide2
end
end
end
end
80 Comments
SirGreen 3 Jul @ 8:53am 
highly trained lol
Desert Rat 20 Apr @ 9:26am 
This doesn't seem to work?
jango bett 6 Dec, 2024 @ 9:26pm 
played without it for a while and it made me realize how terrible this game is without mods
Sgt. John Helldiver 19 Oct, 2024 @ 3:52am 
@RAGE their weapon dispersion IS their accuracy. AI will always be pointing directly at you when shooting at you in games, and making their weapons more or less accurate is how developers tweak their "aiming" accuracy. It's extremely tricky and frankly impractical to code some kind of system that makes them genuinely not aim their weapon at you correctly when you could just lower their bullet accuracy to simulate it.
Mihaly A Shilage 23 Sep, 2024 @ 7:42am 
if im correct @Hijong park the difference between the two is that accuracy is merely editing the ai's chance of hitting. whilst the weapon dispersion value increases/decreases the value or chance that the weapon will land a hit on a selected target. weather it be an actor. a target or both
Hijong park  [author] 5 Jul, 2024 @ 3:06pm 
The friendly team is based on your selected team before starting the game.
Karl 4 Jul, 2024 @ 2:04pm 
So, do make my Allies more skillfull than the enemy, Do i have to change spread scale of "Friendly"? I was a little confused of which team am i choosing that one of them have more advantage
Hijong park  [author] 28 Nov, 2023 @ 1:34am 
describe the difference between 'modifying accuracy' and 'modifying weapon disperson values'.
Canada 27 Nov, 2023 @ 7:37pm 
can you make a mod that allows you to easily change AI team accuracy rather than just reduce it
PhantomBravo 14 Nov, 2023 @ 10:08pm 
For some reason in Spec Ops mode at least, the values for the Friendly Spread Scale apply to the enemy and vice versa.