Hooks
Moderator: JeremyaFr
Re: Hooks
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated all the hooks that have a config file.
I've added support for a global "hooks.ini" file. This file contains all the individual cfg files.
I've also updated XwaHooksSetup.
All the individual cfg files are merged into a single global "hooks.ini" file.
All the individual readme txt files are merged into a single "Hooks_Readme.txt" file.
Hello,
I've updated all the hooks that have a config file.
I've added support for a global "hooks.ini" file. This file contains all the individual cfg files.
I've also updated XwaHooksSetup.
All the individual cfg files are merged into a single global "hooks.ini" file.
All the individual readme txt files are merged into a single "Hooks_Readme.txt" file.
- Ace Antilles
- Posts: 7922
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Nice work. This is certainty a much tidier option and I welcome thatJeremyaFr wrote: ↑Wed Jul 22, 2020 3:09 pmUPDATE
Hello,
I've updated all the hooks that have a config file.
I've added support for a global "hooks.ini" file. This file contains all the individual cfg files.
I've also updated XwaHooksSetup.
All the individual cfg files are merged into a single global "hooks.ini" file.
All the individual readme txt files are merged into a single "Hooks_Readme.txt" file.
Just to double check, any changes in the current Hook CFG files need to be inputted into the Hooks.ini file now. right?
What if someone still has say Hook_Sfoils.cfg and the new Hooks.ini also. Will it still read the cfg file or only the INI?
Trying to see if there's any possible conflicts that will need resolving.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The hooks.ini file is read before the cfg file.
If a section exists for a hook in the ini file and a cfg file also exists, then the content of the ini section is used.
If there is no section for a hook in the ini file and a cfg file exists, then the content of the cfg file is used.
If a section exists for a hook in the ini file and a cfg file also exists, then the content of the ini section is used.
If there is no section for a hook in the ini file and a cfg file exists, then the content of the cfg file is used.
- Ace Antilles
- Posts: 7922
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Cool that seems to make sense.
So I assume if the Hooks.ini file is not in the main folder and neither are any CFG files then nothing works or you get crashes.
I really like this system it's a lot simpler in some ways and a lot easier to see what's added to the XWA folder.
So I assume if the Hooks.ini file is not in the main folder and neither are any CFG files then nothing works or you get crashes.
I really like this system it's a lot simpler in some ways and a lot easier to see what's added to the XWA folder.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
If there is no hooks.ini and no cfg file, then default values are used.Ace Antilles wrote: ↑Wed Jul 22, 2020 3:40 pmSo I assume if the Hooks.ini file is not in the main folder and neither are any CFG files then nothing works or you get crashes.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
You should update your first post to point to the downloads page for hookssetup instead of the bottom of another forum topic.
Trev
Trev
-
- Posts: 48
- Joined: Thu Jul 02, 2020 1:00 pm
Jeremy First thank you for simpifying the files
Could I possibly make a suggestion though, please.
But first could I ask, is the Hooks.ini generated when the hooks are downloaded, or is it a standalone file that can be edited at your end?
If it's generated, then ignore the text below, but please let me know either way
Looking at the Hooks.ini, sorry but it's a little messy, it took me a minute or two to figure out everything, as the [***] sections are surrounded within other text, could I suggest you change it to this
The dinput.dll it the main dll file, so shouldn't the text go at the top?
Anyhow so it just a little tidier
Thanks
Could I possibly make a suggestion though, please.
But first could I ask, is the Hooks.ini generated when the hooks are downloaded, or is it a standalone file that can be edited at your end?
If it's generated, then ignore the text below, but please let me know either way
Looking at the Hooks.ini, sorry but it's a little messy, it took me a minute or two to figure out everything, as the [***] sections are surrounded within other text, could I suggest you change it to this
The dinput.dll it the main dll file, so shouldn't the text go at the top?
Anyhow so it just a little tidier
Code: Select all
[dinput]
; OutputStats = 0 or 1
; When set to 1, outputs hooks stats using OutputDebugString
OutputStats = 0
[hook_d3d]
IsHookD3DEnabled = 1
[hook_d3dinfos_textures]
Size = 10000
[hook_hangars]
; SelectionMode = ForceHangar or BasedOnModelIndex or BasedOnModelIndexAzzameenCampaign
SelectionMode = BasedOnModelIndexAzzameenCampaign
; Set the proving ground hangar opt model. The default value is "" or "FlightModels\".
ProvingGroundHangarModel = FlightModels\
; Draw shadows: 0 = no, 1 = yes
DrawShadows = 1
; Shadow lod: 0 = most detailed, 1 = less detailed
ShadowLod = 0
[hook_joystick_ff]
; Select a joystick with force feedback
; 0 to select the first device
; -1 to select the last device
; integer value to select a device by its index
JoystickDeviceIndex = 0
; Enable small joystick movement
; 0 to disable small movement
; 1 to enable small movement
EnableSmallMovement = 1
[hook_mission_objects]
; UnlimitedTurretLaser = 0 or 1
; When set to 0, the lasers are limited
; When set to 1, the lasers are unlimited
UnlimitedTurretLaser = 1
[hook_normals]
; Output: from 0 to 3
; 0 = color
; 1 = X axis
; 2 = Y axis
; 3 = Z axis
Output = 0
[hook_opt_limit]
Size = 65536
[hook_resolution]
; Auto set the game resolution
; 1 to enable the feature
; 0 to disable the feature
IsAutoResolutionEnabled = 0
; Define the resolution width
; When set to 0, the screen width is used
ResolutionWidth = 0
; Define the resolution height
; When set to 0, the screen height is used
ResolutionHeight = 0
[hook_sfoils]
; CloseSFoilsAndOpenLangingGearsBeforeEnterHangar = 0 or 1
; When set to 0, normal behavior
; When set to 1, s-foils must be closed and landing gears opened before enter hangar
CloseSFoilsAndOpenLangingGearsBeforeEnterHangar = 0
; CloseLangingGearsBeforeEnterHyperspace = 0 or 1
; When set to 0, normal behavior
; When set to 1, landing gears must be closed before enter hyperspace
CloseLangingGearsBeforeEnterHyperspace = 0
[hook_textures_tag]
; OutputDebugStrings = 0 or 1
; When set to 0, the hook doesn't print debug strings
; When set to 1, the hook prints debug strings
OutputDebugStrings = 0
[hook_weapon_color]
WeaponSwitchBasedOnIff = 0
; blue
WeaponImpactColor_3100 = 0xFF0000FF
; red
WeaponImpactColor_3200 = 0xFFFF0000
; green
WeaponImpactColor_3300 = 0xFF00FF00
; purple
WeaponImpactColor_3400 = 0xFFFF00FF
; yellow
WeaponImpactColor_3500 = 0xFFFFFF00
WeaponLightColor280 = FF3300
WeaponLightColor281 = FF3300
WeaponLightColor282 = 00FF33
WeaponLightColor283 = 00FF33
WeaponLightColor284 = 3333FF
WeaponLightColor285 = 3333FF
WeaponLightColor286 = 6633FF
WeaponLightColor287 = FF6633
WeaponLightColor288 = FF3300
WeaponLightColor289 = 00FF33
WeaponLightColor290 = 3333FF
WeaponLightColor291 = 6633FF
WeaponLightColor292 = FF6633
WeaponLightColor293 = FF6633
WeaponLightColor294 = FF6633
WeaponLightColor295 = FF33FF
WeaponLightColor296 = 3333FF
WeaponLightColor297 = FF3300
WeaponLightColor298 = FF66FF
WeaponLightColor299 = 0
WeaponLightColor300 = 0
WeaponLightColor301 = FF3300
WeaponLightColor302 = FF3300
WeaponLightColor303 = 00FF33
WeaponLightColor304 = 00FF33
WeaponLightColor305 = 00FF33
WeaponLightColor306 = 00FF33
WeaponLightColor307 = 0
[hook_windowed]
X = 0
Y = 0
Width = 0
Height = 0
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
The "Hooks.ini" and "Hooks_Readme.txt" are generated by XwaHooksSetup after the hooks are downloaded.
But I can improve the generating code.
The "Hooks.ini" and "Hooks_Readme.txt" are generated by XwaHooksSetup after the hooks are downloaded.
But I can improve the generating code.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated XwaHooksSetup.
The main hook is placed at the top of the config and readme files.
The empty lines in the config file between a section name and the first setting are removed.
Hello,
I've updated XwaHooksSetup.
The main hook is placed at the top of the config and readme files.
The empty lines in the config file between a section name and the first setting are removed.
- Haakan
- Posts: 81
- Joined: Sun Jul 14, 2019 1:36 am
Hello there!
If you'd be so kind m8, I've got a question here : Will this update override any custom settings we might have in our cfg files?
Thanks!
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.
CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.
CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
The ini file is read before the cfg files. So if both a cfg file and a corresponding ini section exist, then the setting from the ini file section are used.
The ini file is read before the cfg files. So if both a cfg file and a corresponding ini section exist, then the setting from the ini file section are used.
- Ace Antilles
- Posts: 7922
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Finding an unusual issue with Hook_Mission_Objects that Will T discovered.
I can't get any Fighter FLYABLE ship to swap with any other Fighters.
You can change a Non Flyable ship like a Medium Transport into a Shuttle. But I can't turn an A-wing into a R41 for example.
It looks like something happened in various tests as the CMD got large, kinda like an LOD change, but it still didn't show the right opt.
Been using this code as examples.
JeremyaFr can you take a look into it please and see what you can magically discover[Objects]
FlightModels\Frigate2Standard.opt = FlightModels\Frigate2Medical.opt
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
To replace the A-Wing with a R41, you can try to replace this in HangarObjects and Objects:
To replace the A-Wing with a R41, you can try to replace this in HangarObjects and Objects:
Code: Select all
;HangarObjects
FlightModels\AWing.opt = FlightModels\R41.opt
Code: Select all
;Objects
FlightModels\AWing.opt = FlightModels\R41.opt
FlightModels\AWingCockpit.opt = FlightModels\R41.opt
FlightModels\AWingExterior.opt = FlightModels\R41.opt
- Ace Antilles
- Posts: 7922
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
It didn't work. Did it work for you?JeremyaFr wrote: ↑Wed Sep 02, 2020 2:33 pmHello,
To replace the A-Wing with a R41, you can try to replace this in HangarObjects and Objects:
Code: Select all
;HangarObjects FlightModels\AWing.opt = FlightModels\R41.opt
Code: Select all
;Objects FlightModels\AWing.opt = FlightModels\R41.opt FlightModels\AWingCockpit.opt = FlightModels\R41.opt FlightModels\AWingExterior.opt = FlightModels\R41.opt
As said before it looks like something happens as the display image changes size, kinda like an LOD change, but it still didn't show the right opt.
You can change a Non Flyable ship like a Medium Transport into a R41. But I can't turn any Flyable fighter into another flyable fighter, R41 as an example.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
I tested in B4M2.
So 1b4m2b.ini looks like that:
So 1b4m2b.ini looks like that:
Code: Select all
;1b4m2b.ini
[Resdata]
Resdata\Planet2.dat
[HangarObjects]
FlightModels\AWing.opt = FlightModels\R41.opt
[Objects]
FlightModels\AWing.opt = FlightModels\R41.opt
FlightModels\AWingCockpit.opt = FlightModels\R41.opt
FlightModels\AWingExterior.opt = FlightModels\R41.opt
- Ace Antilles
- Posts: 7922
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
That way did work but it changed things in the Hangar too which wasn't what I really wanted though.
It let me do the necessary experimenting I needed to check anyway.
Thanks for your help.
It let me do the necessary experimenting I needed to check anyway.
Thanks for your help.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated XwaHooksSetup.
I've added support for tools exe in the hooks zip packages.
For now, no hook has a config tool inside the zip. So it is not needed to redownload the hooks.
Hello,
I've updated XwaHooksSetup.
I've added support for tools exe in the hooks zip packages.
For now, no hook has a config tool inside the zip. So it is not needed to redownload the hooks.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the mission objects hook.
Now you can overwrite the cockpit pov settings when an opt is replaced via the hook.
Suppose that the new craft is "FlightModels\[Model].opt".
To define the cockpit POV, set CockpitPovX, CockpitPovY and CockpitPovZ in a file named "FlightModels\[Model]CockpitPov.txt" or create a section named "[CockpitPov]" in "FlightModels\[Model].ini".
Hello,
I've updated the mission objects hook.
Now you can overwrite the cockpit pov settings when an opt is replaced via the hook.
Suppose that the new craft is "FlightModels\[Model].opt".
To define the cockpit POV, set CockpitPovX, CockpitPovY and CockpitPovZ in a file named "FlightModels\[Model]CockpitPov.txt" or create a section named "[CockpitPov]" in "FlightModels\[Model].ini".
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the mission objects hook.
Now turrets settings are replaced when a craft is replaced.
Hello,
I've updated the mission objects hook.
Now turrets settings are replaced when a craft is replaced.
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the mission objects hook.
I've fixed a crash with the turrets.
Hello,
I've updated the mission objects hook.
I've fixed a crash with the turrets.
-
- Posts: 72
- Joined: Mon Feb 02, 2015 9:32 am
Can the mission objects hook be used to define a flightgroup opt rather than a flight model?