We build rock-physics templates (RPTs) for reservoir rocks based on seismic quality factors. In these templates, the effects of partial saturation, porosity, and permeability on the seismic properties are described by generalizing the Johnson mesoscopic-loss model to a distribution of gas-patch sizes in brine- and oil-saturated rocks. This model addresses the wave-induced fluid flow attenuation mechanism, by which part of the energy of the fast P-wave is converted into the slow P (Biot) diffusive mode. We consider patch sizes, whose probability density function is defined by a normal (Gaussian) distribution. The complex bulk modulus of the composite medium is obtained with the Voigt-Reuss-Hill average, and we show that the results are close to those obtained with the Hashin-Shtrikman average. The templates represent the seismic dissipation factor (reciprocal of seismic quality factor) as a function of the P-wave velocity, acoustic impedance, and (P to S velocity ratio), for isolines of saturation, porosity, and permeability. They differentiate between oil and brine on the basis of the quality factor, with the gas-brine case showing more dissipation than the gas-oil case. We obtain sensitivity maps of the seismic properties to gas saturation and porosity for brine and oil. Unlike the gas-brine case, which shows higher sensitivity of attenuation to gas saturation, the gas-oil case shows higher sensitivity to porosity, and higher acoustic impedance and sensitivity values versus saturation. The RPTs can be used for a robust sensitivity analysis, which provides insights on seismic attributes for hydrocarbon detection and reservoir delineation. The templates are also relevant for studies related to -storage monitoring.