-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiclassing #25
Comments
In theory I would like to implement multiclassing, but it would challenge a lot of assumptions made throughout the code. The code treats "level" and "class" as if they are separate (albeit linked) concepts, but with multiclassing we would have to store class features for each level gained (e.g., at level 6 a character can gain the class features for a level 1 class) rather than assuming the class features based on the level. Hit dice also need to be stored per level in a similar fashion. Spellcasting stat needs to be stored per spell instead of per character (since you can use Int for one spell and Cha for another spell). For me, it's a question of what API gets exposed to the user, and the API is poorly documented at the moment. I'm working on multi-page documentation (#24) which I'd like to finish first. I will take a stab at this, and it will definitely happen someday, but it may take me a while to get to it. How do you think leveling up should work with multiclassing?from dnd_character.character import Character
from dnd_character.classes import CLASSES
char = Character(classs=CLASSES['ranger'], level=2) This character would be a level 2 Ranger, and I'm not sure how they would gain a level of Rogue (for example (it's a popular multiclass, I think)). I can think of some weird designs like this: # continued from above snippet
char.multiclassing[3] = CLASSES['rogue']
char.level = 3 So then I do appreciate pull requests, but it's a major change and probably wouldn't be worthwhile for you to spend so much time on it. The API needs to be decided first, either way. |
Another design could be treating the class as an attribute of the character which itself owns the level. E.g., |
Amazing library. Just reading the source code is teaching me a lot about Python I didn't know.
I haven't had a full deep dive into the actual workings of the code, but unless I'm missing something, multiclassing isn't currently possible. Is this something you're thinking about? If not, I might be able to have a go at implementing such a feature through a pull request, but I can plainly see you're much better at it than me, so if it is something that interests you, might be worth implementing.
I ask cause I wanna build a program that tries literally every possible character and ranks them based on certain metrics, and so I wanna be able to try every possible multiclass as well. I realise it's quite a complex ask, though, so no sweat if you don't have time for such a massive addition.
The text was updated successfully, but these errors were encountered: