Please don't take this as bashing, most of the encounters i have with LEOs are very positive. i am just stating a fact. my intent is to let the OP know that it is the job of LEOs to charge someone with something. they can and will use everything you say against you. and they have took a lot of training to do this. i have always been amazed at how "give me your ID" is considered asking in LEO speak
tricks are to engage you in a contact, usually using the the ID as an excuse, knowing that most people would not know their right ( under the 4th amendment). surrounding you so that you might bump into one of them, cussing you so you'll respond negatively, lie to you, even acting friendly to get you to say something off guard
know the laws where you are, learn the responses that are on this site and others, keep your cool. i always like to add be friendly, fair, but firm.
BTW, anything i say can be Horse droppings and not worth a hill of beans