The i5 8400 should run the game just fine, tho the 6 cores may be pushed a bit close to 100% with a powerful GPU tho should get vary slightly better min FPS than Ryzen. On my system with 8 cores 16 threads, the game will push my CPU close to 70 -80% with SLI forced on.
Tho this game is vary hard on the GPU as well so better make sure you got a decent GPU if you want pretty graphics.
Tho if a ryzen 6 core 12 thread CPU is cheaper, I'd probably get the Ryzen CPU, R7 1600 is still vary good CPU and gives ya more CPU headroom for the game and extra running process.
I'd definitely avoid Quad core CPU's like older i5's and Quad core i7's as a lot of people are all having issues running the game smoothly.