Rate of Fire Hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Rate of Fire Hook

Leofus
Cadet 1st Class
Posts: 116
Joined: Wed Jan 11, 2006 12:01 am

Post by Leofus » Sat Jul 16, 2022 2:59 am

is there any way to change the default rate of fire for all craft with this hook? i used a hex editor to change the default rate of fire before but the current rate of fire hook seems to negate this.

Bman
Lieutenant Commander
Posts: 1157
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Jul 18, 2022 4:03 am

You don't need to do any of that. The easiest way to address this is in the .../FlightModels folder, look for the ShipName.ini file you are flying. Open it up with notepad and scroll down to the very bottom. It might have the following or you can manually add it to your file(s):

[WeaponRate]
DechargeRate = 2
RechargeRate = 3
CooldownTimeFactor = 47

The [header] and last code line is most important. CooldownTimeFactor = 47 is the game default rate which is 1 second or 236 time units. Double 47 x 2 to get a slower rate of fire. Multiples of 2 or half that to get quicker rate.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Leofus
Cadet 1st Class
Posts: 116
Joined: Wed Jan 11, 2006 12:01 am

Post by Leofus » Tue Jul 19, 2022 12:12 pm

Bman wrote:
Mon Jul 18, 2022 4:03 am
You don't need to do any of that. The easiest way to address this is in the .../FlightModels folder, look for the ShipName.ini file you are flying. Open it up with notepad and scroll down to the very bottom. It might have the following or you can manually add it to your file(s):

[WeaponRate]
DechargeRate = 2
RechargeRate = 3
CooldownTimeFactor = 47

The [header] and last code line is most important. CooldownTimeFactor = 47 is the game default rate which is 1 second or 236 time units. Double 47 x 2 to get a slower rate of fire. Multiples of 2 or half that to get quicker rate.
i have already done it. the problem is that the current weapon rate hook stops it from working and rather than edit the ini for every single craft i was wondering if there would be a way to avoid that and set a default rate for every craft. if not no problem. i have an old hook that allows my modded exe to function

User avatar
JeremyaFr
XWAU Member
Posts: 3840
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jul 19, 2022 4:10 pm

WIP

Hello,
Here is a WIP of the weapon rate hook.

You can now override the settings for every craft in the "[WeaponRate]" section of the "FlightModels\default.ini" file.

EDIT: link removed

Bman
Lieutenant Commander
Posts: 1157
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Wed Jul 20, 2022 1:17 am

Oooo thanks Jeremy. That will be a lot easier than putting it in patch files.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Leofus
Cadet 1st Class
Posts: 116
Joined: Wed Jan 11, 2006 12:01 am

Post by Leofus » Thu Jul 21, 2022 10:06 am

JeremyaFr wrote:
Tue Jul 19, 2022 4:10 pm
WIP

Hello,
Here is a WIP of the weapon rate hook.

You can now override the settings for every craft in the "[WeaponRate]" section of the "FlightModels\default.ini" file.


xwa_hook_weapon_rate_WIP_2207191807.zip
you are truly amazing

edit: tested and it is glorious

User avatar
JeremyaFr
XWAU Member
Posts: 3840
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jul 24, 2022 3:51 pm

UPDATE

Hello,
I've merged the WIP version of the weapon rate hook into the stable version.

Leofus
Cadet 1st Class
Posts: 116
Joined: Wed Jan 11, 2006 12:01 am

Post by Leofus » Wed Jul 27, 2022 7:26 pm

JeremyaFr wrote:
Sun Jul 24, 2022 3:51 pm
UPDATE

Hello,
I've merged the WIP version of the weapon rate hook into the stable version.
youre the man @JeremyaFr thanks again. im loving this

User avatar
JeremyaFr
XWAU Member
Posts: 3840
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Jan 21, 2023 11:35 am

UPDATE

Hello,
I've updated the weapon rate hook.

This version adds support for gun turrets for objects with the hardpoints mirroring option.

User avatar
JeremyaFr
XWAU Member
Posts: 3840
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jun 13, 2023 7:41 pm

UPDATE

Hello,
I've updated the weapon rate hook.

I've added a setting to enable or disable the fire mesh filter. It is enabled by default.

Post Reply