In a 1999 the Chime(noise maker) is in the GEM(generic electronic module) which is located behind center console to the left of the radio
Video of location is here:
www.youtube.com/watch?v=R5YbRR6rdkI
The chime is soldered to the GEM circuit board, some models did have a separate chime module, but I think the 1999 had it in the GEM
If there is no noise coming from it at all then you may need to replace the whole GEM
If there is a faint noise, with doors open or lights on then you may be able to just change the chime, depends on your comfort level with soldering
The GEM runs all body electrics, when you turn something on you are really just sending a signal to the GEM and it activates the relay for that selection, so headlight switch doesn't turn on the head lights, it tells GEM you would like the head lights on and GEM activates the head light relay.
GEM also turns on the dome light when door is opened, switch in the door is connected to GEM, when door is opened GEM activates dome light
When you turn on the wipers, wiper switch sends that message to GEM and GEM activates wiper relay
So if there are any other odd things happening with body electrics then GEM would be failing which is why chime no longer works
In a 1999 Ranger you should also have a Battery Saver Relay, which is also controlled by the GEM
When you have keys out and doors closed the GEM starts a 20minute timer, can be up to 30minutes, if doors are not opened(or unlocked with keyless entry) then GEM will open the Battery Saver Relay, which cuts power to all lights in the truck, so no dome light or headlights, or even glove box light could be on after that.
So you should not have had a dead battery in the morning
This could be a sign the GEM is/has failed