Preheat oven to 325 degrees F. Melt chocolate and margarine in a heavy pan. Add butter flavoring and nuts. Stir until blended. In a large bowl, combine sugar, flour, eggs, and vanilla. Mix until well blended. Do not beat. Add chocolate mixture and stir until blended thoroughly. Spoon batter into muffin pans lined with paper baking cups. Fill each cup half full. Bake in preheated oven for 35 minutes or until done. Yields 24 cupcakes.