Ok, this reminds me of a very minor niggle I've had with BGS for a while. I get constant randomly timed engine up/down sounds at idle. I've been poking about in the code, but don't see a ready way to deal with it, short of disabling the engine sounds altogether, which I don't want to do, they sound great..doctorfrog wrote:Is there a setting for idle engine or cockpit noise? I'd like to mod in a quiet background hum that is always present when in your ship, but generally noticeable when thrust is set to zero. What I have right now is a quiet, phased effect that sounds like a life support system doing its work, interspersed with very quiet scanner pings. The idea is to breathe a bit more life into those moments when your thrusters aren't on.
It's to do with the way throttle settings are handled for joysticks. With keyboards, the number of up/down settings is pretty limited, but joystick throttles, being a proportional device, are measured in tiny increments. I believe GNUstep uses +/- 32,768 distinct values.
Unfortunately, there is a certain small amount of random "jitter" present when the throttle is set to minimum or maximum. (this is also the reason "dead-zones" are needed for joysticks) Oolite itself ignores this, and the engines won't come "on" until a definite movement is applied to the throttle.
BGS, however, reacts to every tiny random jittering change in throttle value by triggering the engineUp and engineDown sounds. It's not so bad for small periods of time, such as at a refuelling station/satellite, but when loitering by a station to hitchhike through somebody else's wormhole, where you can easily be waiting an hour or so for the right one to come along, it gets to be a pain. Hitchhiking is one of my preferred tactics on certain long-jump Random Hits missions, so you can see my problem.
I don't know if it's possible in script to de-sensitise BGS to tiny throttle changes, I suspect something would have to be added to the game-engine, but if you can think of a way to do it, I'd be most grateful. As things stand, even if doctorfrog does release an "idling" sound, I'd almost never get to hear it, as my engine sounds constantly cycle up and down.
Sorry to be a pain, it really is a small irritant in a brilliant OXP, but I wouldn't be surprised if it affects at least some other joystick users too.
Edit:
Looking at the code, this seems to be the relevant routine..
Code: Select all
while(i--){
if(cond===b[i].start){
if(b[i].src===1){
b[i].init = 1;
if(c && player.ship.scriptInfo.bgs_engine) b[i].sound = player.ship.scriptInfo.bgs_engine;
}
if(c && b[i].change===1 && player.ship.scriptInfo.bgs_engineUp) b[i].sound = player.ship.scriptInfo.bgs_engineUp;
if(c && b[i].change===-1 && player.ship.scriptInfo.bgs_engineDown) b[i].sound = player.ship.scriptInfo.bgs_engineDown;
b[i].cmp = 0;
a.push(b[i]);
}
}
.change
is a flag? Is there a way to de-sensitise the check?