EpochModTeam / Epoch

Epoch Survival Game Mode for ARMA 3
http://epochmod.com/
Other
91 stars 82 forks source link

Question re: Portable generators and DayZ style refueling #967

Closed morgoth0 closed 6 years ago

morgoth0 commented 6 years ago

With the welcome disabling of auto-refueling via variable, I have done some work on DayZ style refueling (using no DayZ code). Hoping to implement in vanilla Epoch by a pull request. Unfortunately the sound I use on my server is the generator1.wss from DayZ mod... Am I right in assuming that we would need another sound source or does someone know whether that was public domain? If it was not PD, would anyone know of a PD generator sound file we could use as the soundSource()?

As an aside, would you like the code to only zero the fuel on fuel pumps not fuel tanks? With the current implementation you cannot siphon from fuel tanks on the map because all fuel sources are emptied, which seems a little... excessive ;)

Cheers, Grahame.

vbawol commented 6 years ago

Sounds great @morgoth0. Those sounds are a part of dayz mod assets and not something we can use for A3.

If you want, try and find a new sound from here: https://freesound.org/search/?q=generator and make sure you credit the author as needed by the license. If you need help converting/editing the file to wss or ogg let me know.

morgoth0 commented 6 years ago

Thanks @vbawol Much appreciated. Will find a sound and pull some stuff tomorrow.

ravmustang commented 6 years ago

To comment on the fuel and emptying the tanks. Unfortunately the refueling process within A3 is not an action but done through the vehicle's presence to the pump, so my idea last night would not work helping this out.

We do have an option in current Epoch release to toggle the gas at stations here: https://github.com/EpochModTeam/Epoch/blob/release/Server_Install_Pack/%40epochhive/epochconfig.hpp#L59

morgoth0 commented 6 years ago

Unfortunately if AutoRefuel is off then all fuel sources will be emptied at server start. The solution I was thinking of is pretty simple, just choose the fuel pump models in the list of objects that are passed into the EPOCH_staticFuelSources array, so that the fuel tanks, etc. are unaffected by the setFuelCargo 0 commands server and client side.

There are only a limited number of fuel pump models so this is fairly easy to do. This allows siphoning, which is nice, but allows auto-refueling to be off at the same time, which is also nice.

morgoth0 commented 6 years ago

As an additional thing, there could be two arrays of fuel sources, one for pumps and one for fuel tanks. The fuel tanks should probably have their fuel cargo randomized between their max capacity and zero?

morgoth0 commented 6 years ago

Thinking that this is the perfect sound for the generator: https://freesound.org/s/349369/

Would just crop the first third or so before the sound change.