What is the general rule for fan games?

Kingdom Hearts is probably the worst IP to make a fangame of along these lines because ALL of Disney's signature/iconic characters and ALL of Squaresoft's signature/iconic characters are in there.

I agree with everyone saying "BEWARE THE MOUSE" that being said, having your fan game grow to a level of visibility that you get hit with a DMCA is kind of a win condition of its own, because you now have a fan base you can direct to your original project(s), assuming of course that you're planning on having those. And also, yes, by default your fan game is very invisible and would have to succeed pretty hard for Disney lawyers to even know it exists. Like if you were just to distribute it within the RM community and not make a tremendous effort to "market" it'd be very unlikely that anyone that would care about it would know about it.

(and if you want hosting for something with rips there's always good old RMN)

As a creator that has in the past received and enjoyed his fair share of fan works, gratefully receiving a steady stream of fanart and fanfiction for several years by fans of one of MY IPs, I find the hostility and ingratitude that game companies have towards their fans in this regard repugnant...but then again I find most corporations and their actions repugnant in general!
What you forgot though is the consequences of a C and D and how they can damage you so badly you might not be able to make more games. DMCA isn't always the end of the story, its just the end of what we hear. You can face fines and legal fees too on top of that.
@TheGentlemanLoser Hey, at least Sega actually embraces fan created content. SAGE (Sonic Amateur Games Expo) has been a thing for a long time.
Also the fact you could risk getting your thread locked here like so many of the pokemon threads here due to the use of the pokemon essentials which was C&D back in 2018. While i like fangames myself and there are exceptions with certain franchises it's usually better to not do so.

Your best bet on this is make something original inspired by the games. It's possible you can end up with something very interesting.

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-general-rule-for-fan-games.134001/