We enjoyed Cody for three nights. It is a touristy place, but hey - we're tourists, and we had a warm welcome everywhere. And the museums are world class, some of the best I've seen anywhere.
The trolley tour was fun, and picks up at Ponderosa CG where you can buy tickets, for an overview of the town and its history. We took the tour in the afternoon and got off at Buffalo Bill's Irma Hotel in town for the free Wild West shoot out program they put on each early evening. It was an easy, pleasant walk back to the campground. The museums are located between the CG and the Irma in town, so it's easy to get around, lots of parking.
North of Cody, the Heart Mountain Interpretive Center tells the story of the Japanese internment center there during WW II, well worth a visit. Another very well planned and executed museum.
We also visited the dam west of Cody on the way to Yellowstone. The drive from Cody to the NP is quite scenic, great rock formations. (But I would not base there either - too far to do several times round trip.)