Page 1 of 1

Engine power indicator issue

Posted: Tue Feb 12, 2019 9:06 pm
by Phoenix Leader
While I was playing a skirmish mission I noticed that the engine power indicator (top-right blue bar) does not scale correctly when flying a craft with a beam system installed. In particular it is not full when all the 3 recharges (cannons, shields and beams) are totally redirected to the engines.
This only happens on crafts with a beam system installed.
I use GOG v18061 X-Wing Alliance installation.
This problem is present with XWACP v1.5, but not in the basic v2.02 installation.

Re: Engine power indicator issue

Posted: Tue Feb 12, 2019 9:20 pm
by Darksaber
I don't know why you think the XWAUCP might be to blame! There is nothing in it to my knowledge that changes the beam system, I wouldn't know where to start to find anything like that. So please find some genuine evidence first before you start accusing my installers and indirectly me of changing something I have no knowledge of!

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 12:14 am
by Driftwood
It probably has something to do with your screen resolution I would guess. Things act and scale weird at higher resolutions in this game.

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 7:36 am
by keiranhalcyon7
DS, relax. He's just reporting what hes seeing, not accusing anyone of anything. I can confirm this; with DSUCP2.5 installed and flying a ship with a beam weapon installed, the engine power indicator is only 3/4 as full as it ought to be.

Base game:
flightscreen0.png
DSUCP2.5:
flightscreen1.png

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 9:54 am
by Phoenix Leader
I experienced this problem playing at 1600x1200 resolution, but after setting 800x600 resolution the engine power indicator was full as it should be.
I think Driftwood's theory is correct: the top left HUD and the top right HUD do not scale the same way when the screen resolution is increased.
With a non modded GOG installation I did not see anything strange because the game was forced to run at 800x600 resolution.

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 10:35 am
by Darksaber
Oh thanks for the apology! Your welcome!

I've just done a test with a vanilla version of GOG removed all the crap they added to the exe that stops you playing above 800x600, set the screen to 1600x1200
And the Right Hud for the Beam System does not scale, anything above 800x600 and it goes out of wack!

I took a quick look at the HUD.dat file and both left and right sides are exactly the same size images, they probably just mirrored the images

It's got to be something in the exe that's stopping it scaling the same way as the Left side and the other HUD objects

EDIT: Just tested it with a vanilla Disc install it does exactly the same thing

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 8:46 pm
by JeremyaFr
This problem is due to a bug in the game engine. In functions L0046B4F0 (DrawBeamStrength3D) and L00469A80 (DrawPowerSettings3D), there is a missing hud scaling.

Here is a fix:

Code: Select all

; Fix beam HUD scaling
At offset 06A960, replace 75226814555B00FFD68B0DC81C8C0033C03BC7750F6888585B00FFD65F5E5D5B83C414C3 with 508B44242625FFFF000089442414DB442414D80DB8026000E8D3F0120066894424265890.
At offset 0691A6, replace 8B0D2CC76800895C241881E1FFFF00008974241C2BC1895C242089442414DF6C2414DF6C241CDC0D90995A00 with 8B0D2CC7680081E1FFFF00008974241C2BC189442414DB442414DB44241CD80DB8026000DC0D90995A009090.
Here is a corresponding patch:

Code: Select all

  <Patch Name="Fix beam HUD scaling">
    <Item Offset="06A960" From="75226814555B00FFD68B0DC81C8C0033C03BC7750F6888585B00FFD65F5E5D5B83C414C3" To="508B44242625FFFF000089442414DB442414D80DB8026000E8D3F0120066894424265890"/>
    <Item Offset="0691A6" From="8B0D2CC76800895C241881E1FFFF00008974241C2BC1895C242089442414DF6C2414DF6C241CDC0D90995A00" To="8B0D2CC7680081E1FFFF00008974241C2BC189442414DB442414DB44241CD80DB8026000DC0D90995A009090"/>
  </Patch>
EDIT: do not apply this because it's anold version. Instead, use the latest version from XwaExePatcher.

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 9:08 pm
by Darksaber
Amazing, thank you Jeremy

Re: Engine power indicator issue

Posted: Wed Feb 13, 2019 9:39 pm
by keiranhalcyon7
Nice. Thanks, Jeremy.

Re: Engine power indicator issue

Posted: Thu Feb 14, 2019 2:24 am
by Phoenix Leader
Many thanks.
You are the best, Jeremy.

Re: Engine power indicator issue

Posted: Thu Feb 14, 2019 4:40 pm
by JeremyaFr
UPDATE
I've removed the second item from the fix as it is not needed.

Re: Engine power indicator issue

Posted: Sat Feb 23, 2019 4:58 pm
by JeremyaFr
UPDATE
I've added the patch to XwaExePatcher.

Re: Engine power indicator issue

Posted: Fri Mar 29, 2019 6:18 am
by Epsilon Eridani
I installed the new craft pack and this problem is not solved at all: when flying an Assault Gunboat with a tractor beam system the engine power indicator is at 0% (empty) when all 3 recharges cannon, shields and beam system are at maximum rate, and it shows 1/8 power (12.5%) in every other energy configuration.
This has been tested both at 800x600 resolution and at 1600x1200 resolution.

Re: Engine power indicator issue

Posted: Sun Mar 31, 2019 7:23 am
by Phoenix Leader
You are right, Epsilon. The engine power indicator (blue bar) now seems to work on a 0 or 1 logic for crafts with a beam weapon system installed.
It shows 0% when all the 3 recharges are at maximum rate, 12.5% if at least 1 recharge is not, and these ones are the only 2 levels displayable.
This now happens regardless of the screen resolution.

Re: Engine power indicator issue

Posted: Sun Mar 31, 2019 8:14 am
by Mark_Farlander
This has something to do with the fact that the engine power indicator should be divided in 12 levels when a beam weapon is installed, whereas 8 levels are enough without it.

Re: Engine power indicator issue

Posted: Sun Mar 31, 2019 8:22 am
by Phoenix Leader
12.5% is 1/8 so it seems the power indicator is still working on the usual 8 levels division, but with a 0 or 1 logic.

Re: Engine power indicator issue

Posted: Sun Mar 31, 2019 7:53 pm
by JeremyaFr
Have you checked that the beam HUD scaling patch is applied?

Re: Engine power indicator issue

Posted: Sun Mar 31, 2019 8:02 pm
by Darksaber
If they have XWAUCPv1.6 or DSUCPv2.6 installed then the answer is yes they have the patch installed, I should point out that the Rebel Beam patch is also included

Re: Engine power indicator issue

Posted: Tue Apr 02, 2019 5:01 am
by Mark_Farlander
Mark_Farlander wrote:
Sun Mar 31, 2019 8:14 am
This has something to do with the fact that the engine power indicator should be divided in 12 levels when a beam weapon is installed, whereas 8 levels are enough without it.
I meant a 12 levels sub-bar division with a beam weapon installed, so there are actually 13 levels available (from 0 to 12 ); or the usual 8 levels sub-bar division without a beam weapon installed, so there are actually 9 levels available (from 0 to 8 ).

Re: Engine power indicator issue

Posted: Fri Jun 28, 2019 5:06 pm
by JeremyaFr
Hello,
It seems that the craft packs don't include the latest version of the patch from XwaExePatcher but an older one. That's what cause the problem.

Re: Engine power indicator issue

Posted: Fri Jun 28, 2019 6:12 pm
by Darksaber
Probably because I didn't know there was a different version

I'll try and create a fix

EDIT: Yes it's the old values patch, plus I missed out the Beam system for rebel starfighters patch :(

Re: Engine power indicator issue

Posted: Fri Jun 28, 2019 8:40 pm
by JeremyaFr
I apologize for the confusion. :kopfwand: