If you just look at bass reference sites you should pick that kinda stuff up.
www.activebass.com has tons of lessons mostly bad but some good.
I'll try and help a bit. Heres a scale (learn your major and minor scales first) So here's a scale
1 2 3 4 5 6 7 8 (the numbers represent the note in the scale 3= third note in scale)
A major chord is made up of 1, 3, and 5 of a major scale. For example C Major (C D E F G A B C) is C E and G. If you guitarist or keyboard player was play a C major chord of any type and you played some form of C E and G. It would probably sound pretty good.
A minor chord is the same thing 1 3 and 5. If you would look at the shapes the major triad (thats what these are called btw) and a minor triad look similar besides that the third fret is one half step lower.
The other notes of the scale can be used in a bass line as well. 1 and 5 are the most powerful notes of the chord. The other notes want to 'pull' as some would say to 1 and 5 or pull to notes that in turn will want to pull to 1 and 5. 3 is a chord tone however if you play 1 and then 3 and let it hang on three.. it sounds like it wants to go somewhere and if you use your ear you should be able to figure these things out..
Work with that first. Then you'll need to figure out how to make chord progressions. I hope I helped you if you couldnt find a book.