SLAM Hook
Moderator: JeremyaFr
Re: SLAM Hook
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death
Current Holder of the Frying Pan of Death
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Probably. The better question is, is it worth the effort? Remember, the system was only designed for & tested with one craft. There are probably all sorts of abusable corner cases when it's enabled it for others.
Last edited by keiranhalcyon7 on Wed Feb 13, 2019 9:37 pm, edited 1 time in total.
- Rookie_One1
- Posts: 1655
- Joined: Thu Feb 26, 2004 12:01 am
abusable corners ? what a weird image
*abuse corner*
*abuse corner*
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death
Current Holder of the Frying Pan of Death
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
There seems to be an issue with the hook. If one uses SLAMS during a mission, then quits and refiles, the sound won't play anymore.
In slam.cpp:
The issue here I believe is that the sound isn't checked if it's loaded or not. Removing "!soundsLoaded" fixes the issue, but I'm sure there are better solutions.
In slam.cpp:
Code: Select all
if (hasSlam && !soundsLoaded)
{
soundsLoaded = true;
...
}
- JeremyaFr
- Posts: 3712
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Thanks for the bug report.
I've fixed it.
Please redownload xwa_hook_slam.zip
I've fixed it.
Please redownload xwa_hook_slam.zip
- JeremyaFr
- Posts: 3712
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the SLAM hook.
I've added support for an upcoming sounds hook.
Hello,
I've updated the SLAM hook.
I've added support for an upcoming sounds hook.
- AngeI
- Posts: 501
- Joined: Sun Jan 24, 2016 5:27 pm
Hi @JeremyaFr, we've noticed a bug or at least an unintentional feature of SLAM. Basically if you press the key, even with zero energy available, the SLAM will still briefly activate and cause a speed boost. You can basically abuse this system by rapidly tapping the K key to activate SLAM and with persistence achieve the maximum speed boost even without laser energy. I don't know if some sort of brief cooldown can be enabled or a way for it to check for sure there is energy available before activating, but hopefully something that can be fixed.
- capitanguinea
- Posts: 226
- Joined: Sun Aug 30, 2015 3:59 pm
It is due to the fact that the value of laser capacitor is shown discretized in game in number of shots ready to be fired but the value itself is continuos. So even when you have not enough to burn a laser shot aimed to target the system has energy allocated to his capacitors and Slam can use it for a quick boost.
- AngeI
- Posts: 501
- Joined: Sun Jan 24, 2016 5:27 pm
Makes sense. The question is can we make it so it doesn't do this for SLAMcapitanguinea wrote: ↑Fri Feb 11, 2022 10:24 amIt is due to the fact that the value of laser capacitor is shown discretized in game in number of shots ready to be fired but the value itself is continuos. So even when you have not enough to burn a laser shot aimed to target the system has energy allocated to his capacitors and Slam can use it for a quick boost.

- capitanguinea
- Posts: 226
- Joined: Sun Aug 30, 2015 3:59 pm
Strictly speaking unless there is a laser charge level trigger inside the hook I believe it is not possible. One trick would be enable a count down to give a minimum lapse from deactivation to activation of the slam. Another would be change the curve of acceleration making slam work as a turbo punching at high rates of engines rpms minimizing his effects in the first few tenths of second (giving a hiccup jump to high speed)AngeI wrote: ↑Fri Feb 11, 2022 5:06 pmMakes sense. The question is can we make it so it doesn't do this for SLAMcapitanguinea wrote: ↑Fri Feb 11, 2022 10:24 amIt is due to the fact that the value of laser capacitor is shown discretized in game in number of shots ready to be fired but the value itself is continuos. So even when you have not enough to burn a laser shot aimed to target the system has energy allocated to his capacitors and Slam can use it for a quick boost.![]()
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
AngeI, question - does the SLAM system exhibit this behavior even when the cannon capacitors are completely drained, e.g. when you've been redirecting the power to engines, and the capacitors have been sitting at 0 for a few seconds already?
- AngeI
- Posts: 501
- Joined: Sun Jan 24, 2016 5:27 pm
Yes, so I'm not sure how it can be that this energy reserve is still present with all power redirected to engines and nothing left in the reserves. Adding a cooldown timer between activations seems the best way to handle this imo, even if its just a second or two. You have to spam the button rapidly to keep maintaining the high speed.keiranhalcyon7 wrote: ↑Fri Feb 11, 2022 10:47 pmAngeI, question - does the SLAM system exhibit this behavior even when the cannon capacitors are completely drained, e.g. when you've been redirecting the power to engines, and the capacitors have been sitting at 0 for a few seconds already?
- JaggedFel
- Posts: 411
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
If the value of the capacitors can be read directly, can a threshold be set instead, so you can't activate SLAM before a certain charge builds up?
Ye Olde Galactic Empire Mission Editor v1.13.12
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- JeremyaFr
- Posts: 3712
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the slam hook.
There was a bug where the SLAM system could be activated by repeatly pressing the K key, even if there is no energy.
Now, when there is no energy, the SLAM system will not be activated and the MSG_OVERDRIVE_UNABLE message (Engine overdrive boosters cannot be engaged) will be displayed.
Hello,
I've updated the slam hook.
There was a bug where the SLAM system could be activated by repeatly pressing the K key, even if there is no energy.
Now, when there is no energy, the SLAM system will not be activated and the MSG_OVERDRIVE_UNABLE message (Engine overdrive boosters cannot be engaged) will be displayed.
- JeremyaFr
- Posts: 3712
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the slam hook.
I've added a "SlamEnablePenalty" setting.
To define the SLAM enable penalty, set the "SlamEnablePenalty" setting in "hook_slam.cfg". It is an integer value. The default value is 4.
Hello,
I've updated the slam hook.
I've added a "SlamEnablePenalty" setting.
To define the SLAM enable penalty, set the "SlamEnablePenalty" setting in "hook_slam.cfg". It is an integer value. The default value is 4.