Hooks

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

Moderator: JeremyaFr

Post Reply

Re: Hooks

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Jan 09, 2019 5:24 pm

You know that kind of sentence where, getting to the end of it, you no longer know how it started? XD
https://www.youtube.com/watch?v=He02Z5YdZbg
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Jan 13, 2019 12:29 am

Regarding the weapons hook. Something I only just noticed with testing is that the lasers when set to something other than red/green, the ambient light splash is still either red or green. I don't know if that could be adjusted to be able to be set on a per FG basis, or if the laser hardpoints will/should need to be set to the most similar color (red or green) that you are using for a given craft. I guess this could also apply to the ion cannons too.

It's a pretty minor detail so I dunno if it really matters, but it struck me as odd looking.

Say:
IF weapon rebel laser = FG blue THEN weapon light splash = ion cannon.
IF weapon green laser = FG purple THEN weapon light splash = ion cannon.
IF weapon green laser = FG yellow THEN weapon light splash = green laser.

Or somesuch.

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

Post by Darksaber » Sun Jan 13, 2019 12:49 am

I've already mentioned this in the private forum, the Impact colours are in the Animation.dat, I doubt there is anything that can be done about it, plus you don't notice it that much
Darksaber wrote:
Thu Jan 03, 2019 9:56 pm
Did you know there is a laser impact colour it's ok when you have the Red Geen Blue, as the impact for those are Red Green Blue, if were introducing different colours the LaserReb.opt has a red impact but if your introducing different colours they will still have the red impact, oh you can find the impact colours in the Animation.dat starts at

3100 = Blue = associated with the Ion and IonTurbo opts
3200 = Red = associated with Rebel
3300 = Green
3400 = Purple, not sure if it associated with a type of laser
3500 = Yellow, I believe is associated with weapon slot 307
“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
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Jan 13, 2019 1:00 am

Darksaber wrote:
Sun Jan 13, 2019 12:49 am
I've already mentioned this in the private forum, the Impact colours are in the Animation.dat, I doubt there is anything that can be done about it, plus you don't notice it that much
Darksaber wrote:
Thu Jan 03, 2019 9:56 pm
Did you know there is a laser impact colour it's ok when you have the Red Geen Blue, as the impact for those are Red Green Blue, if were introducing different colours the LaserReb.opt has a red impact but if your introducing different colours they will still have the red impact, oh you can find the impact colours in the Animation.dat starts at

3100 = Blue = associated with the Ion and IonTurbo opts
3200 = Red = associated with Rebel
3300 = Green
3400 = Purple, not sure if it associated with a type of laser
3500 = Yellow, I believe is associated with weapon slot 307
Obviously I missed that post. I agree it's not a huge issue, but it would be nice to be able to select certain colors per FG if possible.

I think the purple is either used by the flare, or by the magnapulse warheads.

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

Post by Bman » Tue Jan 15, 2019 5:40 am

What I did few years ago for TFTC was to change the splash animations using a traditional fire ball color-effect for a more universal solution for all the different colors. But it's a W-I-P/experimental phase, meaning I"m not satisfied with the outcome yet. If anyone wants to test what I have done, send me a PM.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Spyder
XWAU Member
Posts: 103
Joined: Sat Feb 18, 2012 11:29 am

Post by Spyder » Thu Jan 17, 2019 6:34 pm

I'm experimenting with adding additional FG textures to my new X-wing opt. The base opt has a total of 172 textures and runs perfectly fine ingame except for when it's shields are hit, then I get a triangulating to infinity artifact but only for FG 7 and up.
FG
0= Red.
1=Gold.
2=Blue.
3=Green.
4=Red 1.
5=Red 2.
6=Red 3.
7=Red 4.
8=Red 5.
9=Red 6.
10=Blue 1 (From rogue one)
11=Partisan.
12=Phoenix Squad.
13=New republic navy.
You do not have the required permissions to view the files attached to this post.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Jan 27, 2019 9:16 am

Another general request for Jeremy - in the hook zip files, could the readmes all be named for the hook they apply to, so that when I mass-extract them all to a single dir after downloading them with XwaHooksSetup, the readmes don't collide?

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

Post by JeremyaFr » Sun Jan 27, 2019 12:55 pm

When you use XwaHookSetup, the hooks zip files are extracted to a "Setup" directory. In the process, the readme files are renamed to match the hooks names.

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

Post by Bman » Sun Jan 27, 2019 4:17 pm

I'm getting the same triangulating to infinity effect Spyder shows above. Only I was using DS's Red Squadron X-wings (compacted, not released yet). But it seems to be only happening on maybe one of the FG markings.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Jan 27, 2019 5:58 pm

JeremyaFr wrote:
Sun Jan 27, 2019 12:55 pm
When you use XwaHookSetup, the hooks zip files are extracted to a "Setup" directory. In the process, the readme files are renamed to match the hooks names.
...

Yes. Yes it does. :zensur:

Thanks Jeremy.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Mon Jan 28, 2019 7:08 pm

I think I've found a bug in hook_opt_limit:

Code: Select all

static const HookPatchItem g_trianglingPatch[] =
{
	{ 0x193C4A, "750C", "9090" },
	{ 0x193C52, "0002", "0080" },  <== offset does not match patcher.xml...
};

Code: Select all

  <Patch Name="[Recommended] triangling to infinity" Description="Fix the 'triangling to infinity' glitch.">
    <Item Offset="193C4A" From="750C" To="9090" />
    <Item Offset="193C53" From="02" To="08" />   <== ...here
  </Patch>
The symptom is ("'triangling to infinity' patch" is not correctly initialized) popups on game start, and no further hook patches are applied.

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

Post by Darksaber » Mon Jan 28, 2019 7:21 pm

The Hooks fine, you will have to remove the patch from the exe

Click on restore to remove the patch from the exe, you then shouldn't get the error message
“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
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Mon Jan 28, 2019 8:20 pm

Ok, I just realized how the offsets are fine, because of the leading 0s. My mistake on that. But hook.cpp:PatchMemory() checks the exe value against both the from and the to values. Shouldn't it see that the to value matches and not issue an error?

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

Post by JeremyaFr » Mon Jan 28, 2019 8:33 pm

In the patcher, the from value is 02 and the to value is 08.
In the hook, the from value is 02 and the to value is 80.

The from values are the same but the to values are different, so an error message is shown.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Tue Jan 29, 2019 5:41 am

Son of a gun. And you know, the real sting is, it would have been obvious if I'd just finished my debug output enhancement before posting:

EnhancedDinputDebugging.PNG

Sorry to be a bother.
You do not have the required permissions to view the files attached to this post.

User avatar
Spyder
XWAU Member
Posts: 103
Joined: Sat Feb 18, 2012 11:29 am

Post by Spyder » Tue Jan 29, 2019 9:47 am

I'm getting the same triangulating to infinity effect Spyder shows above. Only I was using DS's Red Squadron X-wings (compacted, not released yet). But it seems to be only happening on maybe one of the FG markings.
I found that it's caused by a mesh with transparent textures, in my case it was the visor on the head mesh. I dont know why but it seem unrelated to the number of FG as I originally thought. My workaround was to adjust the LOD distance for the head mesh so it only renders att very close distance.

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

Post by JeremyaFr » Tue Jan 29, 2019 3:40 pm

Spyder wrote:
Thu Jan 17, 2019 6:34 pm
The base opt has a total of 172 textures and runs perfectly fine ingame except for when it's shields are hit, then I get a triangulating to infinity artifact but only for FG 7 and up.
Bman wrote:
Sun Jan 27, 2019 4:17 pm
I'm getting the same triangulating to infinity effect Spyder shows above.
Hello,
If you open the opt with the latest version of XwaOptEditor (v 1.0.38), have you an error message?

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

Post by JeremyaFr » Tue Jan 29, 2019 8:33 pm

Hello,
I'm able to reproduce this triangling effect. I've tested "FamilyTransportExterior.opt". It caused the triangling effect when the cockpit is hit.
To fix it, I open the opt with XwaOptEditor and save it. The effect is gone.

When a face group has more than 384 vertices and a transparent texture, the game may either crash or show the triangling effect.

Here is the list of OPTs that can have this problem:
In DSUCP:
  • FamilyTransportExterior
  • OutriderExterior
  • PlanetaryFighterExterior
  • RazorFighterExterior
  • Tycon
  • YwingBCockpit
  • YwingBExterior
  • Z-95Exterior

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

Post by Darksaber » Wed Jan 30, 2019 7:29 pm

Thanks Jeremy, I've fixed those
“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: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Jan 30, 2019 7:38 pm

Thanks

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Jan 31, 2019 7:26 am

I'm having a problem with camera angles 4 and 5 in the hangar. The camera positions appear to be randomly assigned to a poorly-chosen location, apparently randomly chosen each time I enter the hangar. (The behavior is a bit like the location x/y/z is being sourced from some incorrect memory locations.)

How my installation got to its current state: I installed DSUCP2.5, and everything was good. Then I installed the Comm Relay & Sattelites [sic, incidentally], and noticed that it overwrote a bunch of hooks. So, not knowing if these were outdated hooks, I downloaded and installed the latest hooks (hence my troubles, above). (Note: this was before the resolution hook was published... if that matters.)

EDIT: R2 is also missing....

User avatar
Phoenix Leader
Rebel Alliance
Posts: 437
Joined: Wed Aug 08, 2018 2:20 pm

Post by Phoenix Leader » Thu Jan 31, 2019 11:41 am

Problems while installing the Comm Relay & Satellites?
I simply cannot install them: when I try to run the installer, it gets immediately deleted.
The other installers don't have this problem.

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

Post by Darksaber » Thu Jan 31, 2019 11:52 am

Your virus checker must be picking up a false positive, and deleting/quarantining the installer. There are no viruses in the installer I can assure you of that and nothing that would harm your system

I'll check out what happening with the comm relay/sat installer
“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
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Jan 31, 2019 2:27 pm

Ok I've updated the Communication Satellites and Comm Relay installer

I've also included all the latest Hooks including Hook_Res1200, Hook_Resolution and Hook_Slam.
Please note: The Hook files are only overwritten if the existing file is older than the new file, otherwise installation of the Hook is skipped.

@Phoenix Leader - If you anti virus is still deleting/quarantining the ComSatv1.0.exe installer, then it's a false positive and you will need to exclude the file from being checked, why it's deleting it I haven't a clue, could be the name I dunno???

@keiranhalcyon7 - All hooks in the SatCom installer have been updated to the latest versions, as I said above if the Hook files already exist and are the same, the installer will skip them, and will only install if the are newer than already installed.

the resolution hook is just a small gimmick it doesn't alter anything major in game

Sorry I don't understand what you mean by " EDIT: R2 is also missing...."

Why your having problems with camera angles 4 and 5 in the hangar again I dunno seem strange that the coordinated are random, perhaps a few screenshots of these random location might explain things
“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
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Feb 01, 2019 6:11 am

Darksaber wrote:
Thu Jan 31, 2019 2:27 pm
@keiranhalcyon7 - All hooks in the SatCom installer have been updated to the latest versions, as I said above if the Hook files already exist and are the same, the installer will skip them, and will only install if the are newer than already installed.
Ok, thanks for the heads-up on that.
Sorry I don't understand what you mean by " EDIT: R2 is also missing...."
I mean, the hangar droids (one of which is an r2 unit with the same color scheme as R2) are missing. Since those two camera angles depend on the droids' positions, the fact that they're missing is closer to the root cause than just observing that the angles are messed up.

After reading through the readme for the hangars hook, it seems a bit like the LoadDroids = 0 functionality is being triggered. But that setting doesn't appear in any file in my directory, except in that readme.

Post Reply