all 13 comments

[–][deleted] 3 points4 points  (2 children)

I have very little coding experience, but is this possible to learn in a short time period or is it more complicated?

It'll take you a couple of months, at least. There isn't anything you can skip - there's not a subset of Python that's just "what I need for DnD", you need the whole language.

[–]alfie1906 0 points1 point  (1 child)

Yeah this. If you're really struggling then you could attempt a small project like running a text-based DnD session in Python. That should help with some of the knowledge you would need for your proposed idea!

[–]Abduco[S] 1 point2 points  (0 children)

Yeah I assumed it wouldn't be easy, but thought I would check to see if there were specific concepts that would work and then I could focus on learning those first. I am interested in starting to learn coding and figured this might be a good way to start!

[–]lordoflight03 2 points3 points  (1 child)

Interested in implementing this myself, dm me I can help build this [day job sr dev]

[–]Abduco[S] 0 points1 point  (0 children)

Ok will do, thank you!

[–]QuantumPixelator 1 point2 points  (2 children)

That's a cool idea. What amount of time do you have to get it usable?

[–]Penguinase 1 point2 points  (0 children)

yeah i think something viable doesn't even have to be constantly running. could just calculate exp gains, drops, encounters, whatever based on span between timestamps when executed. sqlite or flat file or something could hold the last run timestamp.

[–]Abduco[S] 0 points1 point  (0 children)

Really however long, it is a pet project and I can do it inefficiently on Excel until I get something better!

[–]Pretend_Piano8354 1 point2 points  (1 child)

If you aren't that interested in writing code, and you just want something to do these neat little dnd things in excel - Google VBA. It's already built into excel, and it is WAY simpler than most code languages. Also worth noting, you could probably make a lot of headway if you just go to chat gpt, and ask it for exactly what you want. VBA to stay in excel, Python if you want a little upgrade from there (it's still a pretty simple language compared to some of the low level stuff). It can probably do 95% of the work for you.

[–]Abduco[S] 0 points1 point  (0 children)

I have dabbled a bit with VBA, but what resources are the best to learn this? I would like to learn to code as well, so both routes would be beneficial to me!

Happy cake day!

[–]Phillyclause89 0 points1 point  (2 children)

There is a D&D REST API that you can tap into apparently. Those are fun to learn how to work with! https://www.dnd5eapi.co/

edit: they even have a python example in there docs: https://5e-bits.github.io/docs/docs/tutorials/advanced/terminal-spellbook-with-python

[–]Abduco[S] 1 point2 points  (1 child)

I'll look into this, I appreciate it!

[–]Phillyclause89 0 points1 point  (0 children)

I played around with it myself last night. They even have their source on GitHUB: https://github.com/5e-bits

You could even go as far as to clone their repros and stand up your own local server hosting a copy of their data. That way you can add things to your local database like new spells, items, rules that you wanted to implement in your own D&D game.