When it comes to "theory" there's coupe of tricks that make it easier to digest.
First, it's not the end all and be all of music. "Theory" was devised to essentially explain why something sounds good (or bad) and provides a bit of a road map for how to go about recreating a feel. It's not a rule book as much as it is a guidebook.
As a newb musician, we're taught scales. They are the heart of all musical roles (except perhaps for drummers). The scale provides the foundation for chords and arpeggios (chord tones). These just happen to be the source for the starting point for bass lines.
When digesting improv or on the fly lines, it's common to start slow and add to what you've already figured out. The simplest bass line is one where you just play the root (the named note of a chord: E would be the root for an E major, E minor, E diminished etc) note of every chord, so that's where you start: figure out what the root of each chord is and just play that. Once you can do that, try doing something with roots and fifths (the fifth note of the scale of the root; there's that pesky reference to scales.) Once you get fifths figured out, you can start playing with adding thirds (the third note of the root's scale). Then add 7ths. If you know the Root, 3rd, 5th and 7ths, you can now play an arpeggio.
So in just the paragraph above, you understand why scales are so important; understanding them allows one to be able to construct chords and arpeggios that fit the key you're working in. A typical chord is the root (first note), third note and fifth note. Often the 7th is added. There are a bunch of variations (major, minor, diminished, etc), but if you can understand triads (R/3/5) and 7ths chords (R/3/5/7), you'll be able to get around pretty well.
Yes, this is work; understanding things usually is.
If this doesn't appeal to you and you're more of an ear player, the next best way to write bass lines, is to listen to what others do on songs of a similar style. Try to play what they are playing. Eventually, you'll start noting patterns in your fretwork, which you can then translate into ideas for other songs. IMO, the pattern realization comes faster if you're working your theory out, but it can be done without that.
Ultimately, it wouldn't be a bad thing if you get yourself a few lessons. Theory understanding can progress much quicker if you have someone to bounce questions off of when you start. Once you get the hang of things, it's pretty easy to continue study on your own.