TimPasquini / BladesInTheDarkGenerators

A couple of simple generators I built for Blades in the Dark using the tables in the back of the book.
MIT License
15 stars 6 forks source link

Implement textual support / rich interactivity #2

Open D-Vaillant opened 2 years ago

D-Vaillant commented 2 years ago

Just a placeholder feature request for looking into improving the user interface. I'm tinkering with https://github.com/willmcgugan/textual but this breaks Windows support; lemme know if that's a hard requirement.

TimPasquini commented 2 years ago

I only have windows so I'd appreciate it still working there ;) I don't mind having a separate branch for it though. It says textual will eventually add windows support so it can always be merged once that happens.

Since all the individual generators are importable, it might be better to just ignore the master generator and build a textual interface that interacts directly with the individual generators. That is how I ended up building my BitD discord bot out of this program. If it was just an alternative interface they can easily be offered side-by-side allowing the user to select whichever interface they want.

If having the print_person (demon/ghost/etc) functions actually printing the outputs is a barrier to that, I can pretty easily make them into something like return_person and move all the printing to the doskvolMasterGenerator and the if "__main__" sections of the individual files.

D-Vaillant commented 2 years ago

I’ll look into alternatives to textual then, no point in reducing functionality.

Refactoring so that the functions don’t have the side effect of printing is a great idea; I’d also add one that only takes optional arguments and combines build and print so you can run it and just get a random output.

On Oct 24, 2021, at 12:31, Tim Pasquini @.***> wrote:

 I only have windows so I'd appreciate it still working there ;) I don't mind having a separate branch for it though. It says textual will eventually add windows support so it can always be merged once that happens.

Since all the individual generators are importable, it might be better to just ignore the master generator and build a textual interface that interacts directly with the individual generators. That is how I ended up building my BitD discord bot out of this program. If it was just an alternative interface they can easily be offered side-by-side allowing the user to select whichever interface they want.

If having the print_person (demon/ghost/etc) functions actually printing the outputs is a barrier to that, I can pretty easily make them into something like return_person and move all the printing to the doskvolMasterGenerator and the if "main" sections of the individual files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

TimPasquini commented 2 years ago

PR #3 has implemented discussed changes on print functions and making arguments optional. Leaving issue open since it's for the interface as a whole. Thanks for the contribution!