Sorry for the title, I ment to put a "to".
What do if your opening gets ruined from unexpected moves?

For example, the french defense gets messed up if your oponent takes your pawn at e4. So you either take it with your pawn or with your queen which kinda screws up the opening. What do good chess players do to account for alterations in their openings?
Also I find the french defense the easiest opening out there as it usually works out, but there are some openings on youtube that are nearly impossible to implement because one move from your opponent can ruin it all.
Memorizing openings is bad. If you get out of book that is where you start using opening principles. Your example by the way is the French defense exchange variation. If you play the french you have to know something about that.

Yeah, see the thing is you kind of have to earn the right to play standard openings by showing you know how to punish players who don't play the "proper" response. Until you can do that you're pretty much stuck with making the best of whatever your opponent throws at you. The higher the rating the better the chance that your opponent will "follow the book".

Yeah it can be annoying facing certain sidelines not getting the kind of positions you were looking for. When you're out of book that's when you start composing a plan using imbalances, then finding and calculating candidate moves.

I think that you should keep your level of "book" knowledge near the one of your opponents. Otherwise it's very likely that such unexpected moves will occur - even if you know the "right" way to play in a position, when your opponent doesn't, the game is bound to go out of book. From then on any further book variations knowledge is more or less unnecessary. I've noticed similar things happen im some of my games, when I've tried to experiment with some less popular opening and my opponent would almost always play out of book.
I also think that the right way to continue in such positions is to know how to exploit suboptimal responses from the opponent. In a way, it's even more important than knowing the "optimal" play lines in great depth.

Looking at your recent games it is you who made the out of book moves.
In 2 of these games the moves were 1e4 2 e6 2Nf3
This is a standard response to the French defence at lower levels. This is a suitable set of moves to get to 2 lesser known variations (the Wing gambit and the Two Knights variation). However, White is not playing for these. Instead White is just replying to e6 with the classical opening moves they know. At this point you correctly replied 2d5. This is a standard French defence move to most of White's second moves. Now White usually exchanges pawns. This is done because they think that this will lead to a more open game and they also do not want to have their pawns on e5 and d4 as is common in a lot of French defence variations. However, this is not particularly out of book because if you now reply with exd5 then you arrive at French Exchange 4Nf3 variation (a well known and often played variation). At this point you should have taken with the pawn, instead you took with the Queen. This isn't a particularly good move as you lose a tempo (you even returned the Queen to its original square) and allow White to develop at the same time by playing Nc3.
You also made this mistake/out of book move a couple of times when White played the Exchange variation in the more classial manner i.e. 1 e4 e6 2d4 2dx5 3exd5.
As stated above, the Exchange variation (you will normally get there via 2Nf3) is something you are going to see a lot at the lower levels and hence you should learn a bit about it.
In another game your opponent played the 4Bg5 variation of the Classical variation. This is a long established opening variation. Black's 3 main replies at this point are dxe5 (Burn variation), Bb4 (McCutcheon variation) and Be7. At this point you played h6.
Hence, I would suggest you learn the first few moves to the main variations and the principles behind them. Wikipedia has a good general introduction to the French defence. There is a also a good overview of the French defence at: http://www.youtube.com/watch?v=DeaRrjTGMRE

Try www.365chess.com Opening Explorer.

Thanks for the feedback everyone. And I dont know how I came across as not chill or a brainiac Zborg.

Generally, it is upset that I am exposed to this situation when I have learnt an openning then want to try it. However, these kind of situations tought me more than the games from the book. When I get away from the game, I am trying to play with general priciples.

I’m not a very strong player but used to be a lot better. My problem is playing against weaker players who don’t necessarily know openings, they tend to make weird moves and I end up changing my strategy to account for those moves. Takes me right out of wack and I end up screwing up and losing games. It’s bad for the confidence.
Sometimes I try openings that get ruined because my opponent does an unexepected move. This leads to an uncomfortable game because Im not usually used to the type of opening.