Like Radu said, don't overthink it. Some of the greatest riff masters know little to no theory. Mark Morton from Lamb of God constantly mentions he knows like 3 scales, a couple of licks, and a couple of simple chord progressions. The rest is using his ear to find what sounds cool to him. Lamb of God has some kickass riffs. As far as I know Billie Joe Armstrong from Green Day knows about as much theory as a kid who just picked up the recorder. He just uses his ear to find something that sounds cool. I know that what's worked for me is thinking about what types of patterns sound good from riffs/songs I've learned in the past and using my ear to come up with something from there. You've got this! Don't overthink it. Just use what knowledge you do have both theory and the knowledge of what worked/sounds kickass from your favorite guitarists repertoire and go from there.