32-bit mode hook

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

Moderator: JeremyaFr

Re: 32-bit mode hook

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

Post by Bman » Sun Aug 18, 2019 9:33 pm

Great. Looks a lot better.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Tue Mar 10, 2020 4:33 pm

UPDATE
Hello,
I've updated the 32bit hook.

I've fixed an incorrect detection of transparent textures. This fix requires an updated textures tag hook.

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

Post by JeremyaFr » Wed May 06, 2020 12:38 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed the default illum value.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed May 06, 2020 5:50 pm

Thank you :)
“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

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

Post by JeremyaFr » Mon May 18, 2020 1:42 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a bug related to the dat images mipmaps.

CupcakeFS
Cadet 4th Class
Posts: 10
Joined: Sun Feb 07, 2021 8:50 pm

Post by CupcakeFS » Wed Nov 24, 2021 3:01 am

JeremyaFr wrote:
Thu Jul 18, 2019 6:20 pm
This hook enables 32-bit mode.
8-bit OPTs are converted to 32 bits and the game can load 32-bit OPTs.
The game can load 32-bit DAT images. Existing DAT images are converted to 32 bits.

(...)
Installing this hook would generally make the game look better, right? I don't completely understand how letting the game load (larger than 8-bit?) 32-bit DAT images makes the game look better, but I don't need to know the technical details, and I could read more about it on my own if I was really interested in the topic. So, without getting too technical ...

Could this hook cause lower frame rates? I know that the real answer is for me to make a temporary back-up, and then test it.

I assume there's some description of minimum system requirements--at least hypothetically--so is that something to keep in mind before using the hook? I have an 8th-gen i7 based laptop. It's far from a "gaming PC," but mostly because of the lack of a powerful GPU. I've read that XWA wasn't coded to take advantage of modern GPUs, so maybe the lack of a GPU might not be the bottleneck in my current set-up.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Nov 26, 2021 7:43 am

CupcakeFS wrote:
Wed Nov 24, 2021 3:01 am
Could this hook cause lower frame rates? I know that the real answer is for me to make a temporary back-up, and then test it.
No: hook_32bpp.dll is unlikely to cause lower frame rates. Even before this hook, all textures were converted to a 32-bit format inside ddraw anyway. The difference is that before this hook, we could only load 7-bit indexed formats (i.e. lower-quality images) and now we can load full 32-bit formats (higher-quality images). But either way, the images that are used by DirectX are 32-bit.
I assume there's some description of minimum system requirements--at least hypothetically--so is that something to keep in mind before using the hook? I have an 8th-gen i7 based laptop. It's far from a "gaming PC," but mostly because of the lack of a powerful GPU. I've read that XWA wasn't coded to take advantage of modern GPUs, so maybe the lack of a GPU might not be the bottleneck in my current set-up.
I've got a Surface Book 2 from... 3 years ago more or less. It's got an i7 with an nVidia 1060 and the game runs fine. I can even run it in VR. Your processor is fine, but you'll need a reasonably-good GPU to run it with the effects on.

It's true that XWA wasn't originally coded to take full advantage of the GPUs, but the modern effects we've added do place a significant load on the GPU now. If you don't have a proper GPU you can always disable a few of the effects or disable all of them using the Babu Frik configurator to get better performance.

CupcakeFS
Cadet 4th Class
Posts: 10
Joined: Sun Feb 07, 2021 8:50 pm

Post by CupcakeFS » Fri Nov 26, 2021 7:23 pm

That makes sense, thanks.

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

Post by JeremyaFr » Fri Dec 24, 2021 1:35 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've added support for compressed images in dat files.

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

Post by Bman » Sat Apr 02, 2022 8:51 am

Hi @JeremyaFr, I sent you a PM for details but I'll post summary here. For the "xwa_hook_weapon_color" package could the statement code "WeaponColor_fgFG_ = color marking value" and WeaponColor_fgFG_XXX = color marking value" etc, be removed and placed into optional mission.ini files in the mission directory, so it could dynamically override the static default values assigned in any FlightModels/Craft.ini file based on the FG index number in the mission.tie file ? Also, could a particular wingman within a FG of 6 ships have a different color than rest of the squadron ? i.e. WeaponColor_fgFG_wingman#_XXX = color marking value
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sat Apr 02, 2022 5:48 pm

WIP

Hello @Bman ,
Here is a WIP of the weapon color hook.

You can now define settings on a per mission basis.

Suppose that the mission is "[MissionDir]\[Mission].tie".
To define settings on a per mission basis, create a file named "[MissionDir]\[Mission]_WeaponColor.txt" or create a section named "[WeaponColor]" in "[MissionDir]\[Mission].ini".
All the settings defined in a [Model] file can be replaced in a [Mission] file. The key of the setting in the mission file must be prefixed with "[Model]_".
For example, "WeaponColor" in "[Model].ini" become "[Model]_WeaponColor" in "[Mission].ini".

Download:
EDIT: link removed

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

Post by Bman » Sat Apr 02, 2022 7:58 pm

Awesome. Thanks!
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Mon Apr 04, 2022 6:11 pm

UPDATE

Hello,
I've updated the weapon color hook.

I've merged the changes from the WIP version into the stable version.

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

Post by JeremyaFr » Mon Jul 04, 2022 8:06 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've added support for profiles and skins in hangars.

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

Post by JeremyaFr » Wed Jul 13, 2022 4:32 pm

UPDATE

Hello,
I've updated the 32bpp hook.

CraftOptName = SkinNameA, SkinNameB
CraftOptName_fgc_# = SkinName1, SkinName2, SkinName3
# in CraftOptName_fgc_# is an integer for the opt color marking index, starting at 0.
The default SkinName is "Default" or "Default_#" where # is the markings index.

You can now define default skins for flightgroup colors without setting the skins in the mission ini file.

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Mon Jul 18, 2022 12:55 am

JeremyaFr wrote:
Wed Jul 13, 2022 4:32 pm
UPDATE

Hello,
I've updated the 32bpp hook.

CraftOptName = SkinNameA, SkinNameB
CraftOptName_fgc_# = SkinName1, SkinName2, SkinName3
# in CraftOptName_fgc_# is an integer for the opt color marking index, starting at 0.
The default SkinName is "Default" or "Default_#" where # is the markings index.

You can now define default skins for flightgroup colors without setting the skins in the mission ini file.
Is it possible to enable the ability to set default skins for object profiles?
Your focus determines your reality.

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

Post by Bman » Thu Sep 29, 2022 4:02 am

Yes, but probably better to bake-in one default level of skins on a model to keep the file size smaller. (Can be 32-bit A-RGB textures too). Other secondary and tertiary etc. skins can go into---for example-- the XWA\ FlightModels\Skins\Xwing\Default\Tex00033.png or ....Xwing\Rogue\Tex00033.png. They can be referenced on a per mission.ini file basis, down to the FG's too.

Hello @JeremyaFr, in the newest "xwa_hook_32bpp.zip" package, there are 12 *.dll files. Do all of those go into the main XWA folder or just the specific files listed in the Readme.txt file ? Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Thu Sep 29, 2022 5:42 am

Bman wrote:
Thu Sep 29, 2022 4:02 am
Hello @JeremyaFr, in the newest "xwa_hook_32bpp.zip" package, there are 12 *.dll files. Do all of those go into the main XWA folder or just the specific files listed in the Readme.txt file ?
All the DLLs go in the XWA directory.

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

Post by Bman » Sun Oct 02, 2022 4:48 am

Done. Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sat Dec 10, 2022 4:04 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've improved the opt loading time.

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Sat Dec 31, 2022 6:02 pm

@JeremyaFr Ok I found a bug...when I add a skins folder to an opt it replaces the textures no problem but it is wiping out the normal maps from the dat file.
Your focus determines your reality.

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

Post by JeremyaFr » Sun Jan 01, 2023 5:15 pm

Hello,
The normal maps are related to the Effects DDraw.

@blue_max Can you take a look?

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Jan 01, 2023 5:53 pm

Master Qui-Gon wrote:
Sat Dec 31, 2022 6:02 pm
@JeremyaFr Ok I found a bug...when I add a skins folder to an opt it replaces the textures no problem but it is wiping out the normal maps from the dat file.
Hello, please send me your files and I'll take a look :)

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Mon Jan 02, 2023 12:07 pm

blue_max wrote:
Sun Jan 01, 2023 5:53 pm
Master Qui-Gon wrote:
Sat Dec 31, 2022 6:02 pm
@JeremyaFr Ok I found a bug...when I add a skins folder to an opt it replaces the textures no problem but it is wiping out the normal maps from the dat file.
Hello, please send me your files and I'll take a look :)
Sent to your PM
Your focus determines your reality.

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

Post by JeremyaFr » Mon Jan 02, 2023 12:23 pm

When a skin is applied to a texture, the hook appends "_fg_" to the texture name, followed by the color index.
If the Effects DDraw doesn't support that then it may explain why normal maps don't work with skins.

Post Reply