I have not read the whole thread, so this might have been covered already, but:
Using rules from a RPG in your game should not be a problem, since rules are not patentable on most jurisdictions. The expression of the rules (ie wording, tables) is copyrighteable, but that does not apply to a videogame unless you put fragments of the RPG manual in your documentation or game.
However, trademarks are an issue. Tradekarking is different than copyrighting. Many iconic DnD monsters are registered trademarks and you cannot use their names. I think Beholders and Mind Flayers are, for example. You might get away by having them in your game (risky!) if you don't call them that, but you can't have a moster named Beholder in your game.
Finally, Dungeons and Dragons is a trademark, so you cannot say that your game is a DnD derivative, or include DnD in the title or promotional material. There are many workaraounds (Rogelike based on the most popular OGL of all times!) but you have to be careful.