-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
One solution would be to have the selections be subject to a random seed -- each NPC would have a seed and you'd set the RNG to that seed before grabbing whatever info you wanted about them. Seems like Tracery used to have this functionality but it's not documented anymore and may have been removed. If you're good with JavaScript, it wouldn't be hard to implement this yourself, and if you'd rather not mess around in someone else's wackadoo codebase, it wouldn't be hard to implement Tracery's basic functionality yourself. This is just basic string manipulation -- using a third-party library only complicates matters.
Then there's also this deep dive involving semantics and all kinds of fun stuff: https://github.com/dhowe/RiTa