I am not a lawyer, so take what I am about to say with the knowledge that it is a laymen's understanding and not actual legal advice.
Something that has already been created by someone else falls under their copyright and their product identity. In order to use it in any form, you really need their written permission, at the least, and most likely, you'd have to negotiate a contract for the right to use it in an official publication. Many authors don't mind fan-based works, but you could never get to take it to publication without violating copyright and intellectual property statutes, even with credit given.
Your safest bet is to take your creative process, let it be inspired by the material in question, make some changes that still logically give you the desired flavor and results, and rename the end product. Some would call this "filing off the serial numbers," but in the end, you come up with something that is yours (even if heavily influenced) to do with as you wish.
I am not sure of the degree of change required to make it legally unique and not a violation of copyright and product identity. I've heard some people say 20%, and some say 50%. I guess the best way to tell is if people look at your finished product and say "Hey, this is kinda like the XXX from book YYY, isn't it?" instead of "Isn't this just the XXX from book YYY?" (i.e. They can tell it's uniquely yours, even if inspired by another source, and not just a carbon copy of the original source.)
If you're really serious about it, though, for something more than just your own gaming sessions, you might consider talking to a lawyer.
My two little credits, anyway,
Flynn