first, do all this in PKHeX.
Next, PID, Natures, IVs are linked in Gen 3. Without fail.
Break the link by changing it to something different and you'll get PID Mismatch.
Next, PIDIVs generated has to be Method 1, not any other method.
Why don't you show us what PID you're trying to get?