Have any of you tried this before? I’m wanting to toy around with using ClassLoader to let players load in custom dialogue trees for our game. I’m aware that you could use XML and similar solutions to do it, but I’m just experimenting with all avenues to see which one I think works the best for us specifically.
Anyway, so what I’m looking to do is actually pass in classes from the game (the textbox manager) and let the player call commands on it to make nested dialogue trees.
I.E.
textBoxRenderer.newTextBox(skyler, "Hello [[PLAYER]]!");
textBoxRenderer.newTextBoxOptionDeck(new TextBoxOptionDeck(
"Mornin’",
"Good morning beautiful.",
"Oh... It’s you."
){
snip
});
I’m interested to hear anyone’s stories on if they’ve tried this and how it went for them. One question I also have in particular is if you can actually limit what packages the class that’s loaded in is allowed to reference.