Change the rate of fire in turrets (MG42 and Browining .30 calliber)
Hello, guys. I'm trying to figure out a way to chage the rate of fire of mounted machine guns in game for a mod I'm working on. I intend raising the Rate of Fire of the MG42 to it's real-life RoF and will later add a Maxim gun and give it the same RoF as the BAR. However the RoF (or firedelay command) of turrets in game seems to be locked to 0.06.
-I tried changing the 'firedelay' from 0.06 to 0.05 and 0.04 in the .tik files but did not work.
-I tried creating folders inside the 'main' one with the files hoping they would override the ones inside the PK3 files but it also did not work.
-I tried making a custom mounted gun from zero and apply the custom 'firedelay' but they are also afected by the default 'firedelay'.
I any of you know or stumble upon something that can help me with this issue please reply.
It's because of the server FPS, which is defaulted to 20. Raising it using "sv_fps" cvar fixes that, but also breaks the game in many ways.
You can try and see it for yourself, start the first level and play like normal with sv_fps set to 60.
Have you check if you didnt change on the wrong place?
Sometimes the same file is repeated in different files so one will overwrite the other.
Is only the last file loaded is used.
Mod file has several 'z's in it's name so it should be overriding any stock files and settings.
The 'firedelay' is changed for both single player and multi player modes in the tiki file (MG42_gun.tik).
In all of my testing I allways loaded a new game/map in both single player and multi player to make sure the new settings are recognized. Never loaded a previous saved game. Still didn't work.
Tried playing mohaa with openmohaa and the console seemed to be broken. Everytime I opened it and tried to type a command the console closed.
Most people don't seem to be using open mohaa so I will continue to use the base game to work on my mod.
Also some weapons seem to lose their sound effects when I play open mohaa with my mod.
I also tried to assign a lower rate of fire to the turrets to see if it worked. Nope. Rate of fire of turrets are 100% hard coded into a specified value.
Thank you for the help anyway.
Last edited by Soares93; December 13th, 2024 at 10:20 AM.
I just ocorred to me what if I can order the turret to fire more that 1 time in the tiki files? The player clicks one time and the weapon makes a 3 fire burst.
Are there any mods that have burst fire modes for weapons that I can copy the coding or does anyone know of a way to simply add it to the tiki file?
Or make it look like its firing 3 shots but its simply spawnning 3 consecutive muzzle flashes and ejects 3 shells.
I have been experimenting editing the mg42 model, animations and sounds to make it look like it's shooting faster. Animations work fine but it turns out the ingame 20 fps aren't consistent and suffer some delays. I edited the firing sound to repeat at the 0.5s mark to make it sound it's shooting twice as fast, but when those delays don't happen it makes the MG42 sound as it's only firing one shot again.
I've decided that it's simply too complicated to even make the turrets in game to shoot faster and leave it as is.