Save NPC memory at the start. Then generate the items through dialog. Load the saved memory to wipe them back to default. It can be done without a cheat engine.