Dialogue engine work is a surprisingly enormous pain in the ass. It's also largely unnecessary, because unless you're shaking things up in a big way, it's already been done.
One thing programmers learn pretty early on is that reinventing the wheel is a waste of time, unless you're doing it purely as an academic exercise. If there exists a good library out there that does what you want, use it. And if there doesn't, then you're not reinventing the wheel, you're writing a library.
Dialogue engine work is a surprisingly enormous pain in the ass. It's also largely unnecessary, because unless you're shaking things up in a big way, it's already been done.
One thing programmers learn pretty early on is that reinventing the wheel is a waste of time, unless you're doing it purely as an academic exercise. If there exists a good library out there that does what you want, use it. And if there doesn't, then you're not reinventing the wheel, you're writing a library.
Not to mention those libraries, if well established, have been vetted and tested far more than anything you'll write yourself