  We extensively study the system size dependence of nuclear collisions with a
multi-phase transport model. Previously certain key parameters for the initial
condition needed significantly different values for $pp$ and central $AA$
collisions for the model to reasonably describe the yields and transverse
momentum spectra of the bulk matter in those collision systems. Here we scale
two key parameters, the Lund string fragmentation parameter $b_L$ and the
minijet transverse momentum cutoff $p_0$, with local nuclear thickness
functions from the two colliding nuclei. This allows the model to use the
parameter values for $pp$ collisions with the local nuclear scaling to describe
the system size and centrality dependences of nuclear collisions self
consistently. In addition to providing good descriptions of $pp$ collisions
from 23.6 GeV to 13 TeV and reasonable descriptions of the centrality
dependence of charged particle yields for Au+Au collisions from $7.7A$ GeV to
$200A$ GeV and Pb+Pb collisions at LHC energies, the improved model can now
well describe the centrality dependence of the mean transverse momentum of
charged particles below $p_{\rm T} \lesssim 2$ GeV. It works similarly well for
smaller systems including $p$Pb, Cu+Cu and Xe+Xe collisions.
