The propagation of nonlinear waves in warm dusty plasmas with variable dust charge, two-temperature ions, and nonthermal electrons is studied. By using the reductive perturbation theory, the Kadomtsev-Petviashivili (KP) equation is derived. The energy of the soliton has been calculated. By using standard normal modes analysis a linear dispersion relation has been obtained. The effects of variable dust charge on the energy of the soliton and the angular frequency of the linear wave are also discussed. It is shown that the amplitude of solitary waves of the KP equation diverges at the critical values of plasma parameters. We derive solitons of a modified KP equation with finite amplitude in this situation.