# How I can define a discrete probability distribution with parameters?

I have this function that works similar to a probability generating function

$$g(x):=\left(\frac{c}{D} x^{-1}+\frac{D-t-c}D+\frac{t-d}{D} x+\frac{d}D x^2\right)^M$$

with $g(1)=1$. This is not a generating function in the common sense but from $g$ we can define the following PMF

$$f(k):=\begin{cases}[x^k]g(x),& k>0\\\sum_{k=-M}^0 [x^k]g(x),& k=0\end{cases}$$

and it CDF in a similar manner. I want to use the built-in function ProbabilityDistribution (if this is possible) to define $f$ as a PDF for the discrete random variable $K$ that take values in $\{0,\ldots,2M\}$ and depend on parameters $D,t,c,d$ and $M$ where

$$D,M\in\Bbb N_{>0},\quad 0\le d,c<D\quad\text{and}\quad 1\le t<D$$

But in the Wolfram language documentation center there is no information about if ProbabilityDistribution can be used to define distributions that depends on parameters or how to do it.

Some help will be appreciated, thank you.

P.S.: the notation $[x^k]p$ means "the $k$-th coefficient of the series $p$".