Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Potez 540 problem  (Read 2178 times)

0 Members and 1 Guest are viewing this topic.

Airbourne

  • member
  • Offline Offline
  • Posts: 338
  • Nil Desperandum
Potez 540 problem
« on: March 18, 2020, 10:41:52 AM »

Here are three pictures of the Potez 540; two are external but the first is a cockpit view.







If you look at the external views you can see that the front gunner hardly sticks up above the line of the fuselage. If you look at the cockpit view however, he fills the whole windscreen. I have long wanted to reduce the size of the gunner in cockpit view to something more in keeping with the external view, which seems to me to be the more realistic. I would happily remove him completely if that is what I have to do - I imagine that is easier than moving him.

I thought the answer was to go to 3do/cockpit, take out the relevant cockpit tga file and alter it in Gimp but I have looked at all the files in the cockpit folder, and the plane folder for that matter, and I can't find any sign of the front gunner.

I am stumped. Can anyone help?
Logged

Mick

  • Modder
  • member
  • Offline Offline
  • Posts: 5454
Re: Potez 540 problem
« Reply #1 on: March 18, 2020, 11:58:14 AM »

Code: [Select]
... it is true that seen from the cockpit, the front turret is on the left, instead of being centered, so should be moved to the center of the windshield ...

I don't know how to do that, but you can try deleting the front gunner like this:

1) In the "Plane/Potez540" folder (not the Cockpit one), open the "hier.him" file (with a text editor, like Windows Notepad for ex)

2) Scroll down to these lines:

Code: [Select]
[Pilot2_D0]

Mesh Pilot2_D0

Parent Turret1A_D0
Attaching 1 0 0   0 0.173648 -0.984808   0 0.984808 0.173648     0 -0.5 -0.035
CollisionObject xpilot2a

CollisionObject xpilot2b

CollisionObject xhead2


[HMask2_D0]

Mesh HMask2_D0

Parent Pilot2_D0

Hidden

Attaching 0 -0.965926 -0.258817 0 0.258817 -0.965926 1 0 0 -9.99998e-005 0.0911589 0.682725


[Pilot2_D1]

Mesh Pilot2_D1

Parent Turret1A_D0
Hidden
Attaching 1 0 0   0 0.173648 -0.984808   0 0.984808 0.173648     0 -0.5 -0.2


[Pilot3_D0]

Mesh Pilot2H_D0

Parent Turret2A_D0

Attaching 0 0 1   -1 0 0   0 -1 0  -0.1 0.8  0
CollisionObject xpilot2a

CollisionObject xpilot2b

CollisionObject xhead2


[HMask3_D0]

Mesh HMask2H_D0

Parent Pilot3_D0

Hidden
Attaching 0 -0.996195 0.0871525 0 -0.0871525 -0.996195 1 0 0 -5.99995e-005 0.0952604 0.713295


[Pilot3_D1]

Mesh Pilot2H_D1

Parent Turret2A_D0

Hidden
Attaching 0 0 1   -1 0 0   0 -1 0  -0.1 0.8  0


[Pilot1H_D0]

Mesh Pilot3_D0

Parent CF_D0

Attaching 1 0 0 0 1 0 0 0 1 0.35151 -3.72324 0.0396355



[HMask1H_D0]

Mesh HMask3_D0

Parent Pilot1H_D0

Hidden

Attaching 0 -0.984807 -0.17365 0 0.17365 -0.984807 1 0 0 0 0.0952742 0.713352



[Pilot4_D0]

Mesh Pilot3a_D0

Parent TurretExt2_D0
Attaching 0 0 1   -1 0 0   0 -1 0   -0.24 0.3 0


[Pilot4_D1]

Mesh Pilot4_D1

Hidden

Parent TurretExt2_D0
Attaching 0 0 1   -0.34202 0.939693 0   -0.939693 -0.34202 0     0 0.4 0


[HMask4_D0]

Mesh HMask4_D0

Parent Pilot4_D0

Hidden

Attaching 0 -0.588126 -0.317746 0 0.286811 -0.651391 0.817194 0 0 0.031266 -0.301406 0.631831

3) Since we don't know if the front gunner is Pilot 2 or 3 or 4, let's start with Pilot2 (assuming that Pilot1 is the pilot and not a gunner) ...

Delete him by putting a double slash just in front of this line:

[Pilot2_D0]      ... like this:  //[Pilot2_D0]

4) Save and exit, launch the game and check the result, if all is good, then no need to go any further (except may be also delete the HMask2 line too) ...

... if the front gunner is still "alive", then he is not Pilot2, but may be Pilot 3 or 4, so restore Pilot2 (delete the //) and try the same trick with Pilot3 etc ...  ;)

Deleting the front gunner shouldn't prevent his MG to fire on its own, when necessary ...  8)
Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9528
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Potez 540 problem
« Reply #2 on: March 18, 2020, 01:55:31 PM »

1) In the "Plane/Potez540" folder (not the Cockpit one), open the "hier.him" file (with a text editor, like Windows Notepad for ex)
C'est vraiment pas ce qu'il faut faire !
En touchant ce dossier et en supprimant le gunner tu provoqueras des erreurs graves car tu supprimes réellement le gunner... donc le code va couiner !
Son problème est juste du visuel ! Mais ce visuel vient du plane donc c'est le code java du cockpit qu'il faut modifier (protected boolean doFocusEnter et protected void doFocusLeave) ou modifier l'emplacement du cockpit en modifiant la position du root dans le hier.him du cockpit.
A voir !
Perso chez moi cet avion est AI only !

Je te laisse le soin de traduire...  8)  ;)
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Mick

  • Modder
  • member
  • Offline Offline
  • Posts: 5454
Re: Potez 540 problem
« Reply #3 on: March 18, 2020, 04:16:39 PM »

Many THX, Epervier ...!  ;)

OK, so I got it wrong simply because by deleting the front gunner, alarms will be triggered, since the code won't be able to find the gunner that is present in it...  :-[

Since the problem is only visual, the cockpit code has to be edited (protected boolean doFocusEnter and protected void doFocusLeave), or also edit the cockpit position, root section of hier.him

In Epervier's game, this AC is AI only, so no cockpit view, so no prob' ...!  8)
Logged

Airbourne

  • member
  • Offline Offline
  • Posts: 338
  • Nil Desperandum
Re: Potez 540 problem
« Reply #4 on: March 19, 2020, 03:57:23 AM »

Thanks for the help, guys. I had in fact followed Mick's advice and deleted the gunner. I haven't yet noticed any thing odd happening but that doesn't mean very much and I will put him back. Java is way beyond my pay grade so I will try to move him and his turret in the hier.him. I will let you know how I get on.
Logged

Dreamk

  • Modder
  • member
  • Offline Offline
  • Posts: 2017
Re: Potez 540 problem
« Reply #5 on: March 19, 2020, 04:34:33 AM »

why java?
First rule in modding: Never complicate things beyond the need.
2 simple steps will solve the issue:

1) move the camera hooks inside the body.msh file
these are currently

[Hooks]
CAMERA <BASE>
CAMERAAIM <BASE>

[HookLoc]
0 -1 0 1 0 0 0 0 1 0.3934 -0.46226 -0.0438601
0 -1 0 1 0 0 0 0 1 0.39413 -0.53903 -0.04515

play with the x and z values

2) If it's not enough play with the Root entry in the hier.him

this is currently

[Root]
Mesh Root
Parent _ROOT_
Attaching 1 0 0 0 1 0 0 0 1 1.12 -0.1 -1.0

play with the x and z values

Logged

Airbourne

  • member
  • Offline Offline
  • Posts: 338
  • Nil Desperandum
Re: Potez 540 problem
« Reply #6 on: March 19, 2020, 11:10:42 AM »

Right. Well, I have slightly changed the hook values for the angle of sight in the cockpit folder but that wasn't enough so the main change is that I found the whole turret and gunner and gun are all governed by the entry [Turret1A_Do] in the hier.him in the plane folder and I played with its x,y,z values to lower it a bit and move it slightly to the right. The result is exactly what I wanted. This hasn't done the external view any favours but the picture catches it at its worst and most of the time you wouldn't notice anything wrong. I can live with it anyway. I am surprised it was easier to move the gunner than kill him off. I thought it would be the other way round.

Thank you all very much for your help.





Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9528
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Potez 540 problem
« Reply #7 on: March 19, 2020, 12:32:17 PM »

why java?
First rule in modding: Never complicate things beyond the need.
2 simple steps will solve the issue:

1) move the camera hooks inside the body.msh file
these are currently
It's not the right solution... in my opinion!  :-X
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Airbourne

  • member
  • Offline Offline
  • Posts: 338
  • Nil Desperandum
Re: Potez 540 problem
« Reply #8 on: March 20, 2020, 02:52:17 AM »

What do you think is the right solution?
Logged

Mick

  • Modder
  • member
  • Offline Offline
  • Posts: 5454
Re: Potez 540 problem
« Reply #9 on: March 20, 2020, 04:00:19 AM »

... the solution lies in what Epervier said before:

"Since the problem is only visual, the cockpit code has to be edited (protected boolean doFocusEnter and protected void doFocusLeave), or also edit the cockpit position, root section of hier.him"
Logged

Dreamk

  • Modder
  • member
  • Offline Offline
  • Posts: 2017
Re: Potez 540 problem
« Reply #10 on: March 20, 2020, 04:17:32 AM »

Editing the cockpit code can only help suppress the turret,not re-positioning it, at least in my understanding.
Playing with the root section of the cockpit hier.him is of course the main thing to do.
The camera hooks inside the body.msh file can help to slightly change the angle of view of the turret - I explain: I the real plane the upper part of the turret was visible in the cockpit - the question here is how much of it was visible - my own opinion., for what it's worth is that the current height of the turret. as seen in the cockpit is quite correct. What is probably not correct is the centering of this turret - it seems indeed too much on the left and needs to be closer to the center - this can be done mainly by acting on the x position of the root, and slight adjustments on the camera hook as we have a line of sight: Virtual Pilot eyes - cockpit panel - turret. A slight change in the angle of the line will not really affect the panel view as it is quite close, but will affect the apparent position of the turret as it is farther from the Virtual Pilot eyes = the camera hooks.
Logged

Airbourne

  • member
  • Offline Offline
  • Posts: 338
  • Nil Desperandum
Re: Potez 540 problem
« Reply #11 on: March 20, 2020, 07:38:14 AM »

Yes, this is essentially what I did. You play with the line of sight hooks in the body.msh file but you can't make a great deal of difference that way so you have to go to the hier.him file and change the settings there. The problem is that if you are not careful you do something that makes the external view of the plane look wrong. In my case it all worked well enough so I am quite happy.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.042 seconds with 27 queries.