Hooks
Moderator: JeremyaFr
Re: Hooks
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
The crash was caused by a conflict between the mission tie hook and the mission object hook. The same offset was hooked in both hook.
I've fixed the conflict in the misson object hook.
Please redownload the mission object hook.
The crash was caused by a conflict between the mission tie hook and the mission object hook. The same offset was hooked in both hook.
I've fixed the conflict in the misson object hook.
Please redownload the mission object hook.
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Both hooks seem to be working fine now

- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi again

I think you need a small change In the default hook_mission_objects.cfg file.
Right now it's set to UnlimitedTurretLaser = 1 which is forever powered lasers.
Should be set to 0 by default in your download versions or it affects gameplay.
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
Just checked in a vanilla game, gunner cockpit lasers are unlimited
It's only in the actual cockpit the laser bars decrease
It's only in the actual cockpit the laser bars decrease
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
I will keep the setting to 1 as it is how the vanilla game works.
Set it to 0 may increase the missions difficulty.
Set it to 0 may increase the missions difficulty.
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Don't worry it was a misunderstanding in something I was testing.
Was getting weird results. It's all good now.
Was getting weird results. It's all good now.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the exterior hook.
Now you can set a lod distance for MFD target on a craft basis.
Suppose that the craft is "FlightModels\[Model].opt".
To set the MFD lod distance, create a file named "FlightModels\[Model]Exterior.txt" or create a section named "[Exterior]" in "FlightModels\[Model].ini".
The format is:
LodDistance = value
Hello,
I've updated the exterior hook.
Now you can set a lod distance for MFD target on a craft basis.
Suppose that the craft is "FlightModels\[Model].opt".
To set the MFD lod distance, create a file named "FlightModels\[Model]Exterior.txt" or create a section named "[Exterior]" in "FlightModels\[Model].ini".
The format is:
LodDistance = value
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi Jeremy. Can I suggest something like a master hook update list please?
There are so many updates lately and fixes that aren't always clear it's hard to keep up sometimes.
For example in the start of this thread a small list of which hooks have been updated, what and when to help make it obvious.
Example:
Hook_Weapon_Color.dll - Updated 5/5/20 - Bugs fixed
Hook_Textures_Tag - Updated 10/3/20 - Bugs fixed
Reticule Hook created - Updated 30/4/20
I know you often update the start of the individual thread but it's not always clear when it updated.
Obviously people can download all the hooks again as needed but not everyone will know it's needed.
Sorry if it's just me but I think it would help people a lot to keep track simply. Especially as most hooks won't get updated unless the relevant craft is updated online or a large patch.
Thanks, keep up your amazing work
There are so many updates lately and fixes that aren't always clear it's hard to keep up sometimes.
For example in the start of this thread a small list of which hooks have been updated, what and when to help make it obvious.
Example:
Hook_Weapon_Color.dll - Updated 5/5/20 - Bugs fixed
Hook_Textures_Tag - Updated 10/3/20 - Bugs fixed
Reticule Hook created - Updated 30/4/20
I know you often update the start of the individual thread but it's not always clear when it updated.
Obviously people can download all the hooks again as needed but not everyone will know it's needed.
Sorry if it's just me but I think it would help people a lot to keep track simply. Especially as most hooks won't get updated unless the relevant craft is updated online or a large patch.
Thanks, keep up your amazing work

- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
There is the hooks code history here:
xwa_hooks history
The latest hooks can be downloaded using XwaHooksSetup.
There is the hooks code history here:
xwa_hooks history
The latest hooks can be downloaded using XwaHooksSetup.
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Brillaint! Didn't know of that link to the history.JeremyaFr wrote: ↑Tue May 05, 2020 4:14 pmHello,
There is the hooks code history here:
xwa_hooks history
The latest hooks can be downloaded using XwaHooksSetup.
Maybe put that in the main post would help.

- BenKenobi
- Posts: 94
- Joined: Wed Mar 18, 2020 12:30 pm
Jeremy is way ahead of you, at least since february 2019...
From the opening post:

From the opening post:
You do not have the required permissions to view the files attached to this post.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Strange.
I've edited the post today but the date is not updated.
I've edited the post today but the date is not updated.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the main hook.
I've added a setting to enable or disable the output hooks stats feature.
By default, it is disabled.
Hello,
I've updated the main hook.
I've added a setting to enable or disable the output hooks stats feature.
By default, it is disabled.
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi Jeremy. There's still a Hook_Weapon_Color bug
Load a MINE FIELD in a Skirmish or Battle 3 Mission 4 and the game crashes.
I put back the Hook dated 06 February 2020, which I had been using until the one updated on the 15th May and everything worked fine.
Help us Jeremy, you are our only hope!
This Hook in the Zip is the one that DOES work.
Hope that helps.
Load a MINE FIELD in a Skirmish or Battle 3 Mission 4 and the game crashes.
I put back the Hook dated 06 February 2020, which I had been using until the one updated on the 15th May and everything worked fine.
Help us Jeremy, you are our only hope!

Code: Select all
Faulting application name: XwingAlliance.exe, version: 2.0.0.2, time stamp: 0x3765a9b7
Faulting module name: Hook_Weapon_Color.dll, version: 1.0.0.1, time stamp: 0x5ebea7bd
Exception code: 0xc0000005
Fault offset: 0x00009523
Faulting process ID: 0x4120
Faulting application start time: 0x01d62d8f33152da8
Faulting application path: C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\XwingAlliance.exe
Faulting module path: C:\Program Files (x86)\Steam\steamapps\common\Star Wars X-Wing Alliance\Hook_Weapon_Color.dll
Report ID: a042b48b-598a-4b3e-9137-c41d52f894f8
Faulting package full name:
Faulting package-relative application ID:
Hope that helps.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
You can try this WIP version:
EDIT: link removed
You can try this WIP version:
EDIT: link removed
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
A quick test seemed fine. The mines no longer crash things. They really show up on the radar improvements now too lol
Brilliant work as always Jeremy. Thank you

You may want to edit your readme file slightly though.
** Setup ***
Place hook_weapon_color.dll next to xwingalliance.exe
Copy the "ANIMATIONS.DAT" file in the "RESDATA" directory.
If people aren't clued up and copy ANIMATIONS.DAT from the Hook download then they will overwrite any of the effects improvements like Hyperspace.
Might want to add a bit that it's not needed if you have newer version?
Keep up the great work!
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the weapon color hook.
I've merged the changes from the WIP version.
I've updated the readme file to indicates that "animations.dat" is a sample.
Hello,
I've updated the weapon color hook.
I've merged the changes from the WIP version.
I've updated the readme file to indicates that "animations.dat" is a sample.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the opt limit hook.
I've modified the depth value to fix a bug where the SSD was not shown in the target display.
Hello,
I've updated the opt limit hook.
I've modified the depth value to fix a bug where the SSD was not shown in the target display.
-
- Posts: 3
- Joined: Mon May 06, 2019 4:25 pm
Would it be possible to create a hook to get ship telemetry data for a motion chair?
- Ace Antilles
- Posts: 7705
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi. I'd like to try and understand this more. In simple terms pleaseJeremyaFr wrote: ↑Mon May 04, 2020 1:01 pmUPDATE
Hello,
I've updated the exterior hook.
Now you can set a lod distance for MFD target on a craft basis.
Suppose that the craft is "FlightModels\[Model].opt".
To set the MFD lod distance, create a file named "FlightModels\[Model]Exterior.txt" or create a section named "[Exterior]" in "FlightModels\[Model].ini".
The format is:
LodDistance = value

So I know this code is used in the INI files and it really helps out the FPS on some large detailed ships at a distance. If not everything.
Code: Select all
[Exterior]
LodDistance = 0x7fffffff
2 - Does this code only affect the image that is seen in the MFD display. Or is it what can be seen in front of you out the window too?
3 - I'm not good with Hexadecimal currently. 0x7fffffff = a distance right? How can we tell how far away that distance is. Is there an easy way to calculate distances?
4 - This can be set for any ship or fighter if I am correct. Should 0x7fffffff be a pretty good standard on all Starships and Platforms? Is it useful for Starfighters or unnecessary.
Thanks for the help from anyone in advance.

- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
1. correct.
2. It only affects the MFD display.
3. With the value 0x7fffffff (the max positive int: 2^31-1), the less detailed lod in displayed.
4. It is usefull for big crafts with a lot of triangles.
2. It only affects the MFD display.
3. With the value 0x7fffffff (the max positive int: 2^31-1), the less detailed lod in displayed.
4. It is usefull for big crafts with a lot of triangles.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
There's one thing I don't understand: LODs are meant to display lower-detailed models when you're far enough away that the loss of detail is acceptable. To show the low-quality model always, shouldn't the distance be set to 0, not (max int)?
-
- Posts: 1157
- Joined: Mon Apr 05, 2004 11:01 pm
Think of it this way. LOD's are probably loaded by default first. It's when you approach a starship or object then whatever that trigger-distance "value" is (as defined by each mesh) is when those high poly meshes are rendered. If any given mesh is set to "infinity" then it will always render as is. I think this is a great patch and probably all large models should/will need to have LODs if not already there to improve performance.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- Trevor
- Posts: 539
- Joined: Thu Dec 04, 2014 7:11 pm
What Jeremy is probably doing is setting the "distance to object" not actually changing the trigger distance (part of opt).keiranhalcyon7 wrote: ↑Sat Jun 13, 2020 10:45 amThere's one thing I don't understand: LODs are meant to display lower-detailed models when you're far enough away that the loss of detail is acceptable. To show the low-quality model always, shouldn't the distance be set to 0, not (max int)?
Trev