I would suggest going to see a GI(Gastroenterologist), they specialize in the stomach, most of the times it's just a build up of gas. They usually will have you get an Ultrasound of your stomach and they can tell if there's a build up of Gas that sometimes causes pain. I kind of had the same problem and that's what they found. Or it could be something else. But you should take the first step and make an appoitment with that type of specialists. Good Luck!
but can gas cause the diahrrea and the weird stools?
Yes it's very possibles, because gas is inside your stomach. In my experience I had a back-up of gas in my stomach to where I was constipated so if you think about it if your constipated it never comes out right so it just stays in you colon and so forth eventually it may build up so much that it may press up against some organs like Kidneys, Liver etc. and cause the pain. Not saying thats what it is but it's a possibility.