Rate of fire
Rate of fire
-
- Posts: 150
- Joined: Wed Jan 11, 2006 12:01 am
Sorry if this has been asked before but is there any way, possibly via hex editing, that the rate of fire of the lasers could potentially be modified?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 34
- Joined: Tue Oct 13, 2020 12:14 am
Player fighter cannon cooldown:
AI fighter cannon cooldown:
The point of interest here is the last byte of each of these instructions: hex 2F (47 decimal) which is the cooldown time, multiplied per laser. The game's timing system is based off 236 units per second, so that's approximately 1/5 a second for single fire. Because of the multiplier per number of shots, dual fire would be every 2/5 second, quad fire every 4/5.
Also note that it's a single byte, so the highest you can go is hex 7F (127 decimal) before it becomes negative.
This doesn't change energy consumption or recharge rates. Also you may be constrained by the projectile limit if the cooldown is too fast.
Code: Select all
Memory
At offset: 491878, bytes: 6BC92F
At offset: 49187B, bytes: 6BD22F
EXE file
At offset: 90C78, bytes: 6BC92F
At offset: 90C7B, bytes: 6BD22F
Code: Select all
Memory
At offset: 4918A4, bytes: 6BF62F
At offset: 4918BD, bytes: 6BD22F
EXE file
At offset: 90CA4, bytes: 6BF62F
At offset: 90CBD, bytes: 6BD22F
Also note that it's a single byte, so the highest you can go is hex 7F (127 decimal) before it becomes negative.
This doesn't change energy consumption or recharge rates. Also you may be constrained by the projectile limit if the cooldown is too fast.
-
- Posts: 150
- Joined: Wed Jan 11, 2006 12:01 am
I really appeciate this information. Now I just need to figure out what to do with it. Thank you very much!Random Starfighter wrote: ↑Sun Feb 14, 2021 9:38 pmPlayer fighter cannon cooldown:AI fighter cannon cooldown:Code: Select all
Memory At offset: 491878, bytes: 6BC92F At offset: 49187B, bytes: 6BD22F EXE file At offset: 90C78, bytes: 6BC92F At offset: 90C7B, bytes: 6BD22F
The point of interest here is the last byte of each of these instructions: hex 2F (47 decimal) which is the cooldown time, multiplied per laser. The game's timing system is based off 236 units per second, so that's approximately 1/5 a second for single fire. Because of the multiplier per number of shots, dual fire would be every 2/5 second, quad fire every 4/5.Code: Select all
Memory At offset: 4918A4, bytes: 6BF62F At offset: 4918BD, bytes: 6BD22F EXE file At offset: 90CA4, bytes: 6BF62F At offset: 90CBD, bytes: 6BD22F
Also note that it's a single byte, so the highest you can go is hex 7F (127 decimal) before it becomes negative.
This doesn't change energy consumption or recharge rates. Also you may be constrained by the projectile limit if the cooldown is too fast.
update: figured out a hex editor and got them switched. loving the results of 1f
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
@JeremyaFr Could that be integrated in the Weapons hook? I‘v got loads of ideas here
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
Could this affect AI turret ROF?
Random, do you happen to know if AI turret VS Starfighters Accuracy could be also adjusted? Instead of pinpoint accuracy, could there be a margin of error to the spread introduced?
Random, do you happen to know if AI turret VS Starfighters Accuracy could be also adjusted? Instead of pinpoint accuracy, could there be a margin of error to the spread introduced?
-
- Posts: 34
- Joined: Tue Oct 13, 2020 12:14 am
Turret ROF is more complicated, a lot more code working together. It does seem to follow a similar concept of a cooldown and a multiplier, but the base cooldown is kind of weird. I found something that seems to affect smaller ships like transports, but is hard to see much difference with larger ships with multiple types of turrets.
Any significant changes to turret ROF or accuracy would probably require rewriting part of the function. Through the magic of hooks, anything is possible. It just wouldn't be as simple as patching a few numbers here and there.
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
Yeah the main issue is the sniper accuracy of transports. AI CORTS always seemed too accurate for a ship maneuvering all over.Random Starfighter wrote: ↑Tue Feb 16, 2021 2:09 amTurret ROF is more complicated, a lot more code working together. It does seem to follow a similar concept of a cooldown and a multiplier, but the base cooldown is kind of weird. I found something that seems to affect smaller ships like transports, but is hard to see much difference with larger ships with multiple types of turrets.
Any significant changes to turret ROF or accuracy would probably require rewriting part of the function. Through the magic of hooks, anything is possible. It just wouldn't be as simple as patching a few numbers here and there.
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
WIP
Hello,
Here is a WIP of the weapon rate hook.
I've included the cooldown time patch.
I've added a CooldownTimeFactor setting per craft to define the value. The default value is 47 (0x2F).
EDIT: link removed
Hello,
Here is a WIP of the weapon rate hook.
I've included the cooldown time patch.
I've added a CooldownTimeFactor setting per craft to define the value. The default value is 47 (0x2F).
EDIT: link removed
Last edited by JeremyaFr on Sun Mar 28, 2021 6:33 pm, edited 1 time in total.
- AngeI
- Posts: 528
- Joined: Sun Jan 24, 2016 5:27 pm
Does this affect Turret RoF or just regular forward guns?
-
- Posts: 150
- Joined: Wed Jan 11, 2006 12:01 am
sorry if this is a dumb question but what effect does increasing/decreasing the decharge/recharge rates do?
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Well as the name suggests it defines how quickly your lasers decharge and recharge, so
decharge = how fast energy is consumed while firing.
recharge = how quickly your energy fills up again.
decharge = how fast energy is consumed while firing.
recharge = how quickly your energy fills up again.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 150
- Joined: Wed Jan 11, 2006 12:01 am
thank you for the fast response. is it possible to redefine the default values using this hook or only for individual craft?
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
I think there‘s a default.ini where you could define this.
Note that this will affect the vanilla game mission balance. Some missions may become way too easy or unplayable.
Note that this will affect the vanilla game mission balance. Some missions may become way too easy or unplayable.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- Will T
- Posts: 1371
- Joined: Thu Aug 19, 2004 11:01 pm
Yeah, there's potential for things to get very interesting here.
This would really give some huge options if it could be coupled with changing the damage of certain weapons too.
If you could increase the ROF of certain hardpoints on a certain opt or FG and lower their damage at the same time, we could finally get the Autoblasters on the B-Wing.
Give it a reduced power turbolaser on the wing end hard point, and reduced power, fast firing normal lasers on the cockpit and you've got a canon B-Wing in XWA at last. Obviously that would affect balance, but as an option for people less bothered by that, it would be amazing.
Formerly known as The 95 Headhunter
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
I'm still dreaming of a minigun-like implementation, maybe on some custom model. For player-craft it would even be somewhat balanced as you'd still have to mind recharge rate so you can't just squeeze the trigger indefinitely but instead rather use it in short bursts to prevent the imaginary minigun from "overheating" i.e. running out of energy
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 2942
- Joined: Fri Apr 06, 2001 11:01 pm
So is it now possible to vary refire rate by ship?
If so that's way-cool.
If so that's way-cool.
1st Lt Sigurd "BattleDog" Stormhand, Assigned Corsair Squadron, Renegade Wing, CRS Vigilant.
Corsair 8, Squadron TrO.
Corsair 8, Squadron TrO.
-
- Posts: 2942
- Joined: Fri Apr 06, 2001 11:01 pm
Something I thought of a while ago, and have been reflecting on recently.
Is it possible to define the range of lasers for fighter craft? The main application for this would be to make laser bolts faster so that we could increase the speed of fighters and transports without having to make absurd deflection shots. Right now lasers move at something like 1,200 metres per second, compared to 2,000 metres per second in Squadrons. Currently we can increase laser speed but this also increases the range of lasers.
Last edited by BattleDog on Mon Feb 22, 2021 6:40 am, edited 1 time in total.
1st Lt Sigurd "BattleDog" Stormhand, Assigned Corsair Squadron, Renegade Wing, CRS Vigilant.
Corsair 8, Squadron TrO.
Corsair 8, Squadron TrO.
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
WIP
Hello,
Here is a new WIP of the weapon rate hook.
I've fixed a bug.
EDIT: link removed
Hello,
Here is a new WIP of the weapon rate hook.
I've fixed a bug.
EDIT: link removed
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the weapon rate hook.
I've merged the changes from the WIP into the stable version.
Hello,
I've updated the weapon rate hook.
I've merged the changes from the WIP into the stable version.
-
- Posts: 96
- Joined: Sun Mar 09, 2003 12:01 am
Hi, I have beenn trying this, because I wanted so much to make the TIE lasers more like in the movies (or in Squadrons). I mean, that they fire the lasers at faster rate, specially dual lasers. Maybe I am wrong but I understand that the hook allows to change the recharging and consumption rates, not the firing rate. And on the other hand, I tried the exe modification by Random Starfighter but it seems to do nothing in my case.
I wondered if it is just me or really for the TIEs is not possible to accelerate the firing ratio?
Thanks!
I wondered if it is just me or really for the TIEs is not possible to accelerate the firing ratio?
Thanks!