Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

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

Author Topic: Gear Damage Mod For B.A.T., Pacific planes collection  (Read 4476 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6150
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #12 on: November 13, 2022, 03:35:34 PM »

OK, I went back to the drawing board and re-worked most of the classes. I found what I see as some inconsistencies, some resulting from the original code I was working from present in the old mod. The full, updated mod can be downloaded from the same link in the top post.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9594
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #13 on: November 15, 2022, 01:18:27 PM »

I'm puzzled over the FM_1, as I can't determine which plane this applies to; I include it just in case...
The online translator may have mistranslated your sentence...
So if I'm off topic, I apologise!
The FM-1 (Mod) and FM-2 (stock 409/UP2.01) are F4Fs built by General Motors.
Or see here : https://www.sas1946.com/main/index.php/topic,39097.msg435525.html
Note: FM-1 and FM-2 are included in BAT (***US_Navy) !
FM-1          air.F4F_FM1_GM         1 NOINFO   usa01   DESERT
FM-2          air.F4F_FM2            1          usa01   DESERT


FM-1
A version of the F4F-4, with only 4 machine guns and under-wing mounting points for various loads (2 x 110kg bombs or 6 rockets). 839 FM-1s were delivered to the US Navy and US Marine. 1490 were built in total.


FM-2
It featured a 1350 hp Wright R-1820-56 engine and an enlarged vertical stabilizer. It first flew on 8 November 1942. 4437 FM-2s were built by General Motors and Eastern Aircraft, well after 1943.


Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9594
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #14 on: November 17, 2022, 04:15:19 AM »

In the Java code "SPITFIRE", I see :

    public static void moveGear(HierMesh hiermesh, float f) {
        hiermesh.chunkSetAngles("GearL2_D0", 0.0F, Aircraft.cvt(f * kl, 0.0F, 0.6F, 0.0F, -95F), 0.0F);
        hiermesh.chunkSetAngles("GearR2_D0", 0.0F, Aircraft.cvt(f * kr, 0.2F, 1.0F, 0.0F, -95F), 0.0F);
    }

    protected void moveGear(float f, float f1, float f2) {
        moveGear(hierMesh(), f);
//        if(FM.Gears.isHydroOperable())
        if(FM.CT.getGear() >= 0.997F) {
            kl = 1.0F;
            kr = 1.0F;
            kc = 1.0F;
        }
    }


I think it would make more sense to have :

    protected void moveGear(float f) {
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

JCC

  • member
  • Online Online
  • Posts: 26
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #15 on: November 17, 2022, 09:53:26 AM »

Thanks for update Glenn

I think that there might be a bug though as my plane the F4F-4 had hydraulic landing gear. If my memory serves me well, it had landing gear handcrank. I did remap the letters F and G for for that, but it still did not work. I also tried the F4F-3 and it also had hydraulic landing gear.

It was however quite some time since I used those planes so I might be wrong about that, but if not, could you please see if that can be solved.

Cheers JC
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6150
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #16 on: November 18, 2022, 05:53:43 PM »

UPDATE: Nov 18, 2022. Fixed an oversight in SPITFIRE.class.

Thanks to Gabriel for pointing out my oversight in SPITFIRE.class; now fixed.

My 'confusion' over the FM-1 was related to my understanding that it has the manually cranked gear, like the Wildcat generally. The BAT 4.0 class included most of the gear damage code, and I added the rest of the required elements. But it might be best to remove that class if dropping gear due to damage is not to your liking.  ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9594
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #17 on: November 19, 2022, 03:40:14 AM »

Thanks !

But, I am still confused about the P_40 code!
I don't see a multiplier (kc/kl/kr) in the "MoveGear"!  ;)

    public static void moveGear(HierMesh hiermesh, float f) {
        float f1 = Math.max(-f * 1100F, -90F);
        hiermesh.chunkSetAngles("GearC3_D0", 0.0F, f1, 0.0F);
        hiermesh.chunkSetAngles("GearC4_D0", 0.0F, f1, 0.0F);
        hiermesh.chunkSetAngles("GearC2_D0", 0.0F, 90F * f, 0.0F);
        hiermesh.chunkSetAngles("GearL2_D0", 0.0F, 92F * f, 0.0F);
        hiermesh.chunkSetAngles("GearL3_D0", 0.0F, -45F * f, 0.0F);
        hiermesh.chunkSetAngles("GearL4_D0", 0.0F, f1, 0.0F);
        hiermesh.chunkSetAngles("GearL5_D0", 0.0F, -99F * f, 0.0F);
        hiermesh.chunkSetAngles("GearR2_D0", 0.0F, 92F * f, 0.0F);
        hiermesh.chunkSetAngles("GearR3_D0", 0.0F, -45F * f, 0.0F);
        hiermesh.chunkSetAngles("GearR4_D0", 0.0F, f1, 0.0F);
        hiermesh.chunkSetAngles("GearR5_D0", 0.0F, -99F * f, 0.0F);
    }
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6150
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #18 on: November 27, 2022, 10:53:43 PM »

Update, Nov 28, 2022: Back on Nov 20th I fixed(?) the P-40 code, as pointed out by Gabriel in the previous post, even though the gear damage seemed to have been working already. My change has caused no problem, and I've updated the archive just now...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6150
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #19 on: December 29, 2022, 07:37:48 PM »

Update, Dec 29, 2022. I've lowered the probability threshold for 18 planes whose gear was too easily damaged.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

GeraltNotRivia

  • member
  • Offline Offline
  • Posts: 36
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #20 on: March 07, 2025, 04:46:57 AM »

Is there easy way to edit HUD messages this mod introduces? I want to edit them to my own localization, but can't find where they are stored?
Logged

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9594
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #21 on: March 07, 2025, 05:57:49 AM »

Is there easy way to edit HUD messages this mod introduces? I want to edit them to my own localization, but can't find where they are stored?
Phrases (sentences) are written in Java code.
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3231
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #22 on: March 07, 2025, 06:16:50 AM »

If you would like just to modify or translate the existing HUD messages you need to look into the STD/18n folder where you will find a number of properties file that are used to display the hard coded messages. The properties file can be edited by any basic text editor such as Notepad.
As mentioned by Epervier the content is hardcoded and in the properties files you can just modify the way the text will appear on screen.
Logged

GeraltNotRivia

  • member
  • Offline Offline
  • Posts: 36
Re: Gear Damage Mod For B.A.T., Pacific planes collection
« Reply #23 on: March 07, 2025, 07:09:33 AM »

If you would like just to modify or translate the existing HUD messages you need to look into the STD/18n folder where you will find a number of properties file that are used to display the hard coded messages. The properties file can be edited by any basic text editor such as Notepad.
As mentioned by Epervier the content is hardcoded and in the properties files you can just modify the way the text will appear on screen.

Already done that, but this mod introduces it's own texts, which seems to be just hidden inside of java code or at least i can't find them anywhere.
No big problem of course, just asking.
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.042 seconds with 20 queries.