sounds like the battery died because the alternator wasn't charging it and it drained to the point where it went bad, the rough idle is probably caused by a combination of that and the cam position sensor
the cam position sensor is actually a pretty simple sensor, only thing that can really go wrong with it is the wiring, try wiggling it to see if you can find a break, sometimes the break will feel softer than the rest of the wire
after you fix that, if it still idles rough you might want to change the plugs again, our engines don't like those Bosch Platinums for some reason
valve cover gaskets not a tough job
no such thing as a 318ti Panther Edition, post some pics of it so we can laugh at the guy who put that stuff on there