There are no separate settings for when it is plugged in or not.
You can go into Settings >> General >> Auto-Lock and change it to never. Just be sure to change it back later.
If I'm doing something that involves a lot of staring (and not touching) I'll sometimes set it to the full 15 minutes. This is usually enough to keep me from having to unlock it over and over, and the impact on the batter isn't all that bad if I forget to change it back later.
A few apps will override the screen lock; showing slideshows in Photos, never locks during a movie, and most of the alarm clock apps. If you are playing with a specific app it wouldn't hurt to check it's settings to see if there is an options. Probably not, but worth looking.