I literally changed a byte in the .ips file in a hex editor.
For example, I changed:
50 41 54 43 48 32 E2 B8
00 04 00 F0 20 E3 45 4F
46 (Ultra Moon)
to
50 41 54 43 48 32 E2 B4
00 04 00 F0 20 E3 45 4F
46 (Ultra Sun)
I read that Ultra Sun is literally a -4 byte difference to Ultra Moon and...