Special Aircraft Service

Please login or register.

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

Author Topic: Fuel remaining in HUD?  (Read 3358 times)

0 Members and 1 Guest are viewing this topic.

jpten

  • member
  • Offline Offline
  • Posts: 301
Fuel remaining in HUD?
« on: January 16, 2016, 07:05:47 PM »

Since not all planes seem to have working fuel gauges, would it be possible to have the fuel status displayed in the HUD along with speed/height/heading...etc? How hardcoded is the HUD Speedbar?  Thanks.
Logged

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: Fuel remaining in HUD?
« Reply #1 on: January 17, 2016, 01:43:38 AM »

that's actually a great idea, imo - hopefully it's doable... ;)
Logged
.....taking fun seriously since 1968.....  8)

jpten

  • member
  • Offline Offline
  • Posts: 301
Re: Fuel remaining in HUD?
« Reply #2 on: January 17, 2016, 08:45:56 PM »

I have tried a few hacks with the hud_log.properties, and the config.ini but no luck so far but no CTD.  My biggest fear right now is my CUP install has something in a SFS that overrides my edits in the WAW folder.  It should not but CUP is hard to experiment with since it is now (with part 18) being recommended to keep the WAW folder clean of added items.
  What i am searching for at the moment is what does the game use to call the fuel data.  I have busted open a few plane files and find reference to z_fuel1, Z_fuelpres1 and z_fuelpres2 in the model files while the speedbar apparently calls it's data with three letter notations like SPD, ALT, and HDG.  There is ENGINENOFUEL, LOWFUEL and NOFUEL entries in the HUD message files while fueltank damage triggers the fuel leak warning.
   There could be several ways to work this with even a binded hotkey being an option if a file could be amended to add a command that calls the current fuel amount.  Several HUD messages uses a {0}% variable to call the current setting for throttle and flaps so that could be an option if I could just determine what the game would recognize as a request to input current fuel amount.   I haven't modded code for quite a few years and I am a little rusty and unfamiliar with IL2 hierarchy.
Logged

damawo

  • Modder
  • member
  • Offline Offline
  • Posts: 61
    • dama-blog
Re: Fuel remaining in HUD?
« Reply #3 on: January 18, 2016, 04:20:22 AM »

What do you mean is like these screenshots?
https://www.sas1946.com/main/index.php/topic,47697.0.html
Logged

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23978
  • Taking a timeout
    • STFU
Re: Fuel remaining in HUD?
« Reply #4 on: January 18, 2016, 07:38:58 AM »

Technically you'll need to modify some Java Code of the game, in particular it's the "com.maddox.il2.game.HUD" class that needs to be modified in order to show the remaining fuel in the so called "Speed Bar" which usually shows your Heading, Speed and Altitude (if enabled).

While it's no big deal to modifiy that class accordingly, the bigger issue is that this base game class differes with each game version and many modders use custom versions of that class for development purpose, meaning that when there's a mod that ships another modified version of this class, you can rest assured that on the day of it's release there will be hundreds of complaints that either the mod itself isn't working, or mod x, y and z are not working anymore once this mod is installed, or even the whole game collapses.

Best regards - Mike
Logged
Don't split your mentality without thinking twice.

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: Fuel remaining in HUD?
« Reply #5 on: January 18, 2016, 07:47:21 AM »

i quite like jpten's idea of a hotkey for say 'Display Fuel Status', which you can bind to a key and you can use this to display fuel.
although i'm pretty sure that will also need to affect a base class or two somewhere along the way - in which case, as Mike's mentioned, it will probably not be worth the potential problems...
Logged
.....taking fun seriously since 1968.....  8)

Uzin

  • Modder
  • member
  • Offline Offline
  • Posts: 2816
  • On lifetime holidays
Re: Fuel remaining in HUD?
« Reply #6 on: January 18, 2016, 08:08:18 AM »

What about HudCustomize mod?

https://www.sas1946.com/main/index.php/topic,15931.0.html

It works flawlessly for each of my modded  installs from 4.10 to 4.13,  it has the following possibilities:

G load                 
Flaps                 
Aileron trim           
Elevator trim           
Rudder trim             
TAS kmh                 
TAS mph                 
Vertical speed         
Angle of attack       
HUD without info       

It obviously reaches the values hidden somewhere in the code and just display them. Perhaps it would be possible to add Remaining fuel ?
 
Excuse the noob's post.
Logged

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 6790
  • Live in Japan
    • IL-2 itaki blog
Re: Fuel remaining in HUD?
« Reply #7 on: January 18, 2016, 08:23:24 AM »

What about HudCustomize mod?

https://www.sas1946.com/main/index.php/topic,15931.0.html

That HUD mod was expanded to Pablo(benitomuso)'s Bombs sight assist and HUD mod for 4.10.1m
https://www.sas1946.com/main/index.php/topic,15004.0.html

and today one part of his Visual MOD for 4.12.2m.
https://www.sas1946.com/main/index.php/topic,42495.0.html
Logged

jpten

  • member
  • Offline Offline
  • Posts: 301
Re: Fuel remaining in HUD?
« Reply #8 on: January 18, 2016, 11:09:28 AM »

Thanks to all for the info, I certainly want to stay away from a conflict inducing approach so I have been looking for something that works thru a text file edit rather than deep Java surgery.
  @Damawo, that is an acceptable display style, how was that achieved exactly? I fear that since IL2 establishes ships and objects via the technics, objects, ships, stationary...etc files, that the method may not work with planes but 'Who knows?' I would like to try and see.
  I have DL Pablo's Bomb Sight Assist and HUD mod and looked thru it's files but only found Java based methods to display the info and still leaves me wondering what the game would parse to get the current fuel amount.
   In example, the arming screen for a mission the fuel value is set by arming.fuel but I fear that value would only call from the arming screen and would always display the starting fuel % no matter how much you fly.  The code that sets the fuel gauge in a cockpit (with working fuel gauge) I feel would be a natural starting place for the data and the hotkey implementation (text file read and parsed by the sim) to display the info would offer the least bug threat.  Of course, there is the possibility that the fuel gauge data is intended to only 'move' a dial needle rather than a % reading and would not give a simple % but I need to find the syntax to know.
   As any coder who reads this may suspect, yes I was one of those evil 'big cubical' Design Managers many years ago that would envision what was wanted in a program but did not actually do the details.  To make it worse I was actually more on the Art side of the project flow chart than the Technical Programming.
Logged

damawo

  • Modder
  • member
  • Offline Offline
  • Posts: 61
    • dama-blog
Re: Fuel remaining in HUD?
« Reply #9 on: January 21, 2016, 01:05:34 AM »

I just edited HUD.class. Here is DL link.
https://www.mediafire.com/download/pzth49xt973q5z3/HUD.rar
Purpose of this mod is for initial test, so I don't know this works correctly or not during whole playing scenes.
Logged

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: Fuel remaining in HUD?
« Reply #10 on: January 21, 2016, 03:21:08 AM »

hi damawo - as expected, this will interfere with the classes that PAL_VisualMod9 uses....
i went ahead and tried it loaded first in my Mods folder - results - the fuel/kg display shows, but it stays static, in other words, the fuel weight doesn't drop, it shows the same kg/fuel after a 20 minute flight in a jet...
that's in my Modact530 install
Logged
.....taking fun seriously since 1968.....  8)

Blaubaer

  • member
  • Offline Offline
  • Posts: 514
Re: Fuel remaining in HUD?
« Reply #11 on: January 21, 2016, 07:48:00 AM »

Quote
there will be hundreds of complaints that either the mod itself isn't working, or mod x, y and z are not working anymore once this mod is installed, or even the whole game collapses.
That's bad news.
I would like to have such an easy to read fluel indicator as well.

Regards
die Heidelbeere
Logged
Pages: [1] 2   Go Up
 

Page created in 0.03 seconds with 24 queries.