#1
Hi, I have played guitar for almost 2 years. I've learned most from tabs, playing songs of my favorite bands and stuff like that..

I have been on the net and tried to learn some theory. I wrote down some scales, like the blues, major, minor, pentatonic... and I read some tutorials about a lot of stuff but....
the reason i wanted to learn it was because when im sitting and trying to come up with rifs/songs i hit a dead end u know... not much comes out, very rarely....
it feels like im sitting there just playing random on some strings u know.. oh btw yes i know the notes on the fretboard/strings etc.

If you look at bands like Metallica, Pantera, Iron Maiden, Slayer, Megadeth etc...
What do they need to know, before making those songs?
Not how they full off the solos, I want to know more like riffs/rhythms n stuff like that, but also some melodies for sure.

I would appreciate if someone could write some stuff I could practice and put into my "songwriting" process when I'm messin' around.. And maybe give some examples from places where these mentioned bands used "balbal" in riff xxxx for example.
I know that dimebag used the blues scale for cowboys riff for example :p

riffs etc, u write it from scales?

how to use scales effectively in songwriting (not solos)?
what is chord progressions and stuff like that?
what do i.e. James Hetfield need to know as the rhythm/composer in Metallica?

I'm really frustrated since I never get any good answers >.<
I deeply appreciate comments by anyone who think they might help me!

Thanks and Bye!
#2
I'm no expert so I'll refer you to a really helpful section of the site (From 'lessons' and 'columns'):

http://www.ultimate-guitar.com/columns/the_guide_to/the_ultimate_guide_to_guitar_chapter_ii_3_chords_-_basic_chord_progressions.html

http://www.ultimate-guitar.com/columns/music_theory/how_to_write_rock.html

If these aren't helpful then take a look yourself through these sections, once you learn some more theory it becomes clearer and easier. It takes patience and it's not easy to sit and read theory, but it definitely pays off.