serialized_xml Fuel_Capacity

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
Post Reply
kraehe
Merchant
Merchant
Posts: 34
Joined: Thu Dec 04, 2008 4:26 am

serialized_xml Fuel_Capacity

Post by kraehe »

Moin Gurus,

on save Fuel_Capacity contains the remain fuel, not the fuel capacity. WIth the result that on load, the fuel apear to be full, but fuel perceived consumptions on the HUD climbs, till a click on + or - could be seen in the HUD. By then its to late to reach anything. Basic Repair fixes the savefile. But imho this is a bug by design!

The serialised_xml save file should contain both the actual fuel load and the fuel capacity, so the HUD will show it right after load. We need a 'Refuel' in addition, to allow refueling, with a floating price based on fuel consumption.

I think the patch to go would first need to touch unit_generic.h to add a fuelcap as protected variable in Unit class. Next patch would need to go to unit_csv.cpp to add a Fuel_Load to act in the following way. Fuel_Capacity is now loaded into the fuelcap variable. The fuel variable will either be loaded by Fuel_Load or by Fuel_Capacity. So it should be possible to load the old csv definitions not containing a Fuel_Load, while save files should both have Fuel_Load and Fuel_Capacity. Last patch would be to add a 'Basic Refuel' to ship upgrades.

My questions for the coders here: Is my way right? Do I break anything else by this patch? Anyone willing to mentor my patch, so it finds it way into SVN?

ciao,Kraehe
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: serialized_xml Fuel_Capacity

Post by loki1950 »

Good find kraehe now to get the patch into svn as you may have noticed not many commits lately :o It seems that most of the code crew have real life commitments ATM both familial and academic so as i have mentioned before hopefully one will see this,if not by next Wednesday i will PM one :wink: Surprised it hasn't been noticed before but maybe not as fuel consumption was turned off in 0.4.3 but turned on for 0.5 (config file variable) that and fuel use is not that obvious in most situations.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Post Reply