Project Zomboid

Project Zomboid

Drive Cars Mod (SP & 2P Splitscreen version)
Jew_Santa 16 Jul, 2017 @ 12:37pm
gas usage 'All In Zomboid Map Pack'+Cars
I think cars need to use much less gas with huge map of mod 'All In Zomboid Map Pack'. Maybe like 15-20% of what is now. Especialy for "limited loot spawn-long run-visit all-build your own disnayland" setup.


So I we have this line 73-106(editing this brings some effects but hard to cailbrate,because gas meter shows usage too rarely)

function getGasMultiple(CarType)

if(CarType == "Firetruck") then
return 1.3;
elseif(CarType == "Tank") then
return 2.4;
elseif(CarType == "MArmor") then
return 1.2;
elseif(CarType == "MTruck") then
return 1.2;
elseif(CarType == "MJeep") then
return 1.1;
elseif(CarType == "WhiteCar") then
return 0.80;
elseif(CarType == "Beetle") then
return 0.80;
elseif(CarType == "SportsCar") then
return 1.2;
elseif(CarType == "Pickup") then
return 1.1;
elseif(CarType == "Van") then
return 1.1;
elseif(CarType == "Ambulance") then
return 1.2;
elseif(CarType == "Hummer") then
return 1.1;
elseif(CarType == "PCar") then
return 1.2;
elseif(CarType == "Plane") then
return 1.2;
else
return 1.0;
end



And this line 241(editing seems not bring any effect,wonder whye):
GasUsageMultiple = 1.0;

Anything else in code affecting usage? Does line 241 should stay at 1.0, edit only 73-106 section?
Is there a way to force gas meter show updates more frequently?

Edit:
Line 1396 base Gas Usage Multiple affected by weight of cargo formula, number 1000 probably must to increased alot to match changes in line 73-103 section. Lets try 3000 instead of 1000. Van originaly has 1.1. If I reduce it to 0.20 then 0.20 * 1(Basic Value from line 241)=0.20 gas usage. Value under 500kg load 500/3000=0.16. 0.16+1=1.16. Gas usage of Van under 500kg load 0.2*1.16=0.232. Not sure what is max cappacity of Van, Thing needs adjusting so under failry heavy load car burns up to 15-20% more gas imho.


GasUsageMultiple = GasUsageMultiple + (Gcar:getItemContainer():getContentsWeight()/1000);
Last edited by Jew_Santa; 16 Jul, 2017 @ 3:18pm
< >
Showing 1-3 of 3 comments
ddraigcymraeg  [developer] 28 Jul, 2017 @ 5:13pm 
Just saw this discussion. There is a setting called 'GasGuzzling' that I added to the top of DriveCars.lua which you can change that will achieve what you are trying to do. It was deliberately added since the default value is too eats gas too much. I should probably set the default value to be 15-20% of what it is now, but instead I kept it the same as the original drive cars mod.
Jew_Santa 29 Jul, 2017 @ 7:45am 
I think I achieved lower gas consumption doing this:

function getGasMultiple(CarType)

if(CarType == "Firetruck") then
return 0.25;
elseif(CarType == "Tank") then
return 0.50;
elseif(CarType == "MArmor") then
return 0.20;
elseif(CarType == "MTruck") then
return 0.20;
elseif(CarType == "MJeep") then
return 0.15;
elseif(CarType == "WhiteCar") then
return 0.10;
elseif(CarType == "Beetle") then
return 0.10;
elseif(CarType == "SportsCar") then
return 0.20;
elseif(CarType == "Pickup") then
return 0.15;
elseif(CarType == "Van") then
return 0.15;
elseif(CarType == "Ambulance") then
return 0.18;
elseif(CarType == "Hummer") then
return 0.18;
elseif(CarType == "PCar") then
return 0.15;
elseif(CarType == "Plane") then
return 0.20;
else
return 0.15;
end
end
----------------------------------------
Line 241 Unchnaged GasUsageMultiple = 1.0;


Now would be nice to have gas meter update more frequently. Every 1%. NowI ride for long,long time and meter shows nothing. Then it finally shows like 5% drop.

Can't find that 'GasGuzzling' thing in DriveCars.lua. Does it make meter readings update more frequently or change gas usage of all cars?
ddraigcymraeg  [developer] 29 Jul, 2017 @ 9:42am 
Odd, just checked my steam version and it is there in DriveCars.lua. I just uploaded it here: http://www.filedropper.com/drivecarscoop
Last edited by ddraigcymraeg; 29 Jul, 2017 @ 9:42am
< >
Showing 1-3 of 3 comments
Per page: 1530 50