Exporting multiple materials to a single diffuse/specular map
Shaders can be made to use several different types of masks but the types of passes available for baking are currently limited but this can be overcome with a bit of extra setup.

Cycles works well for doing this but the masks are not necessarily all going to translate over to other rendering engines perfectly calibrated.  Some fine-tuning is likely to be necessary whether you use Cycles or Blender Internal for creating masks for other renderers since everyone uses slightly different(or very different) math for their shaders.

The following is an example of how you can bake an Exponent mask(Roughness) using Cycles.

This first image shows 1 object that has 2 materials.  Each material is a Glossy node and they both have different values for Roughness.



Now you can bake these values to a texture by using Emission Nodes with the strength value set to the same Roughness used for the Glossy shaders.  This will bake a black and white mask that has the values for Roughness baked in.



The sphere on the left is using only one material now instead of 2 and uses the baked texture to control the roughness for both surfaces.  The sphere on the right is still using 2 different shaders to control both surfaces.

Here is a diagram that attempts to show the part of the shader formula which is making use of the Exponent mask that was just baked.



You can also bake what people are calling a 'metalness' mask using the same technique shown above using Emission shaders for the exponent mask values. 

Here's a turntable animation the shows several different masks in use to control only one GLSL shader for the armor.  Notice how the specular bright-spot's radius changes as the light plays across the bronze color to the plastic parts and then across the Blender Logo.  It's a specular exponent mask that controls the highlight's radius.  The shader also uses a masks to control the different paths the GLSL shader code will take since it's programmed for more than one type of effect.(sort of like a mini uber-shader)

https://vimeo.com/109779858



Extra reading: If you have a look at the following diagram for Valves DOTA2 modding documentation, you will see that there are several types of masks used to control various aspects of their shaders and since many of them are greyscale, 4 different masks can be stacked into just 1 texture.  


Here's the Title and link for the Valve PDF
DOTA 2 - Character Shader Masks Guide

http://media.steampowered.com/apps/dota2/workshop/Dota2ShaderMaskGuide.pdf