B-Wing problem

This is the XWA Upgrade Forums! In here you'll find some of the most talented 3D modellers and texture guys on the net!

Moderators: Darksaber, General_Trageton, K_Kinnison

Post Reply

B-Wing problem

Silentbob87
Recruit
Posts: 1
Joined: Tue Jan 05, 2016 12:48 pm

Post by Silentbob87 » Tue Jan 05, 2016 12:55 pm

Hi all,

I am not sure if thats just a bug or a problem, due to XWA Upgrade

I am just trying to get that mission done, with the rebel base to abandon at Kothlis, So my X-Wing gets blown up everytime and I decided to try the B-Wing, but now it occured that, when I am only using Lasers, it always fires a huge amount of Torpedos, while using just one Laser cannon. (the torpedos are unlimited, the counter of also equipped torpedos is not affected by that). Also the loading screen for lasers is not working correctly anymore, cannons stop firing, when its still loaded.

I did not have that problem in a former mission, where I also piloted a B-Wing.

Maybe someone can help, I am using the gog version of the game, and everything els went just fine so far.

User avatar
Jaeven
Ensign
Galactic Empire
Posts: 353
Joined: Mon Mar 30, 2015 3:18 am

Post by Jaeven » Tue Jan 05, 2016 2:47 pm

That's the type of error that occurs if a ship is equipped with warheads even though it doesn't have a warhead launcher.

Which is strange, because the B-wing obviously has a warhead launcher. I'd recommend re-installing the B-wing (not the whole XWAU, just the B-wing), see if that fixes it.

Edit: Iirc you can also use concussion missiles. Try using them and see if you get the same error.

User avatar
DarHan
Cadet 1st Class
Rebel Alliance
Posts: 124
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Fri Jan 08, 2016 8:02 pm

It’s actually a very frequent problem: if you fly a mission using anything else than the default ship, then the weapons on the ship you chose will be messed up. For example, trying to fly the “Escort Rebel Fleet” mission with an X-Wing rather than the default A-Wing gives me a X-Wing with a single canon firing from under the cockpit.

Apparently, the only way to fix the issue is to fly a mission that uses your ship of choice as the default choice, then come back to the original mission. In the example above, if I fly any other mission where the X-Wing is the default ship, then fly “Escort Rebel Fleet” as an X-Wing, then the messed-up weapons issue doesn’t occur.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

SirBrass
Recruit
Posts: 7
Joined: Fri Jan 15, 2016 2:47 am

Post by SirBrass » Fri Jan 15, 2016 1:55 pm

Try installing the individual ships which are giving you issues (don't uninstall the overall craft pack) and see if that fixes the problem. I had the same b-wing issue with UCP 2.3 and just installed b-wing v4.0 from here and it fixed the issue right up.

User avatar
DarHan
Cadet 1st Class
Rebel Alliance
Posts: 124
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Mon Jan 18, 2016 3:35 pm

I just tested that solution and installed the X-Wing v4.0 on top of the UCP 2.3. I launched “Escort Rebel Fleet” from the flight simulator. Switched to the X-Wing… Nope, the problem is still definitely there.

However, reinstalling the B-Wing seems to have fixed that ship for the Kothlis Base mission.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

Wotan Weave
Cadet 4th Class
Posts: 20
Joined: Thu Jun 16, 2011 7:23 pm

Post by Wotan Weave » Mon Feb 04, 2019 5:30 pm

Sorry for posting on such an old thread.

Did anyone ever figure out a real fix for the issue of having a single firing point and endless warheads after changing ships in the flight simulator? I've tried reinstalling individual fighters after the mass craft updates. And I've tried the "choose a mission that uses the ship you want to choose and then go back to the mission you want to fly" workaround. Neither of those fixes work consistently.

I've also encountered this issue with AI ships. Recently, I played the mission where all the experimental TIEs are attacking the Liberty. All of the AI B-wings did nothing but shoot a steady stream of warheads. It was interesting.

Is this a weapon hardpoint issue or a corrupt mission file issue?

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Feb 07, 2019 5:28 pm

Hello,
I've figured out what causes this problem. It is not related only to B-Wing. It happens with all starfighters present in the hangar with an exterior model.

The models files (.opt) are fine.
The missions files (.tie) are fine.

The problem is situated in the HangarObjects files. When a base model is replaced with an exterior model, the game engine will use the exterior model instead of the base model. Since the exterior model doesn't include hardpoints for the weapons, the weapons will be messed up.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10151
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Feb 07, 2019 7:00 pm

Now we have the advanced base opts (available with the next version of XWAUCP or DSUCP) there will be no need to replace the the base opts with the exterior opts using the HangarObjects files :)
“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

Wotan Weave
Cadet 4th Class
Posts: 20
Joined: Thu Jun 16, 2011 7:23 pm

Post by Wotan Weave » Thu Feb 07, 2019 7:06 pm

That is some fantastic sleuthing. Nice job.

So in the stock game, did the exterior models include hardpoints or was there only one kind of model - no base or exterior distinction?

Is this something that can be fixed?

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Feb 07, 2019 7:38 pm

Hello,
Here is a fix:
EDIT: the fix is now included in the hangars hook.

Setup:
Replace hook_hangars.dll in XWA directory with the one in the zip.

Replacements of base model with exterior model are ignored.
Last edited by JeremyaFr on Mon Feb 11, 2019 4:45 pm, edited 1 time in total.

Wotan Weave
Cadet 4th Class
Posts: 20
Joined: Thu Jun 16, 2011 7:23 pm

Post by Wotan Weave » Thu Feb 07, 2019 7:40 pm

Nice work! I'll give this a shot soon.

Thanks!

User avatar
keiranhalcyon7
Cadet 1st Class
Posts: 240
Joined: Tue Jan 02, 2018 6:41 am

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

Nice find. But, wasn't the player craft always loaded as an exterior opt, if available?

In that zip file, is it just the new dll that fixes the problem, or do the text files need to be replaced as well?

Bman
Lieutenant JG
Posts: 670
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Fri Feb 08, 2019 6:41 am

Yes and No. If you have anything in your HangarObject.txt file(s) say for example Awing.opt = AwingExterior.opt or Awing.opt = CustomShipExterior.opt, the contents of the latter are assigned to the base .opt, "Awing.opt" on the left side of the statement. That's what Jeremy is talking about. The purpose of even having that assignment statement is esthetics. Usually the ___exterior.opt models are more detailed than the base models, and typically don't have hardpoints added to them, hence causing the game engine to hiccup. A more legitimate reason to use the statement would be to assign a completely different model to temporarily replace an existing one. Like Awing.opt = SnowSpeeder.opt Since this engine is now evolving, base.opt models can theoretically now have as much detail as the exterior models so there would be no reason anymore to use Awing.opt = AwingExterior.opt. Does that make any sense ?
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

User avatar
keiranhalcyon7
Cadet 1st Class
Posts: 240
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Feb 08, 2019 7:02 am

...

Ok, different approach. I can reliably reproduce the issue with 1b0m8w.tie, switching to the b-wing. After installing the new dll (leaving all text files alone), the issue is resolved. It looks like the text files are just examples.

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 08, 2019 10:04 am

keiranhalcyon7 wrote:
Fri Feb 08, 2019 6:11 am
Nice find. But, wasn't the player craft always loaded as an exterior opt, if available?

In that zip file, is it just the new dll that fixes the problem, or do the text files need to be replaced as well?
For the player craft, an exterior model is used if available.

In the fix, only the dll has changed. The txt files are examples.

User avatar
keiranhalcyon7
Cadet 1st Class
Posts: 240
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Feb 08, 2019 5:29 pm

Thanks. But I meant, if the player craft has always used an exterior model if available, and the fighters have always had exterior models, how did the game ever load the hardpoints?

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 08, 2019 5:41 pm

When the game engine loads a base opt file, it stores the handle to the file in an array at address 0x007CA6E0. When an exterior model is loaded, the handle is stored in a variable at address 0x0091AB74. The engines glows data for the exterior model are stored in an array at address 0x00910960. The hardpoints are read from the base opt.

User avatar
keiranhalcyon7
Cadet 1st Class
Posts: 240
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Feb 08, 2019 6:21 pm

Ok, so then, the problem was that the exterior models for the hangar craft were already loaded, and the game didn't realize, when switching to one of those craft, that the base models weren't?

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 08, 2019 7:33 pm

Yes

Here is what happens:
  1. The X-Wing base model is loaded because it is present in the mission tie file.
  2. The X-Wing exterior model is loaded because the player craft is an X-Wing and an exterior model for the X-Wing exists.
  3. The B-Wing base model is about to be loaded because it is referenced in a HangarMap.txt file.
  4. The B-Wing exterior model is loaded instead of the base model because it is replaced in a HangarObjects.txt file.
  5. The B-Wing hardpoints are read from the exterior model because the base model has been replaced.
  6. The base model for the B-Wing is not loaded.
  7. When you switch craft and choose the B-Wing, the base model is not reloaded because the game engine thinks it has been loaded. The game engine doesn't know that the base model has been replaced with the exterior model.
  8. The B-Wing exterior model is loaded because the player craft is now a B-Wing.
  9. The game engine thinks that the B-Wing model has no hardpoints because the exterior model loaded instead the base model has no hardpoints set.
  10. The weapons for the B-Wing are messed up.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10151
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Feb 10, 2019 12:07 pm

Jeremy, will this updated hook become the New Hangar Hook, if it's going to fix the hardpoints problem???

Plus it will no longer be a problem once the Advanced Base opt are available, we won't have a need to replace base craft with exterior craft

If this is going to replace the Hangar Hook, perhaps a line in the readme can be added stating that all [CraftName]Exterior.opts will be ignored :)
“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

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1455
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Feb 10, 2019 1:43 pm

Hello,
I've uploaded a new version of the hangars hook with the fix.
I've added a line in the readme saying:
The replacement of a base opt with an exterior opt is ignored: lines like "FlightModels\ObjectA.opt = FlightModels\ObjectAExterior.opt" are ignored.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10151
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Feb 10, 2019 1:44 pm

Thanks Jeremy :)
“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

Wotan Weave
Cadet 4th Class
Posts: 20
Joined: Thu Jun 16, 2011 7:23 pm

Post by Wotan Weave » Mon Feb 11, 2019 4:02 pm

I understand virtually nothing of what I just read. But the new hook works great.

Thanks Jeremy!

Post Reply