Need help - upgrading an existing pc to run UE4?

So I’m trying to buy a semi-decent desktop pc that can run UE4 to mess around with some simple stuff, nothing too crazy. I’d like to spend no more than $900 total if possible, but it seems like if I go the build-your-own route then I’ll max that out and still be lacking a monitor, keyboard, OS, etc. I really know very little about the hardware involved or where to even start looking, but I wondered if it was reasonable to buy a less expensive all-in-one desktop and then buy better replacements for parts that needed it. All I’ve looked at so far is wal-mart’s hp bundles (The only place in town with computers); for example, the HP Pavilion 22-a113w is only $450, but only has 4GB RAM so I’d need to get it up to 8 or preferably 16GB, and the CPU is a 2.9 GHz Intel Pentium G3260T, but only 2 cores when I think I need 4? Not to mention a decent graphics card, but I still have at most another $450 for those if that’s doable. There’s also the Pavilion 570-p013wb for $550, with 8 GB RAM and an Intel i3 7100 CPU, but unlike the first one it doesn’t have a touch screen, which I would really like to have if possible (as well as a second monitor in the near future). I don’t know what the motherboards look like on these or if that’s important, and the same goes for the PSU, but I don’t want to drop $500 only to have to replace everything… I know this is a lot, but if anyone with some experience could help me out or point me in the right direction, it would be incredibly appreciated.
Thanks ^v^

HP Pavilion 22-a113w -

HP Pavilion 570-p013wb -