charlatan | Create fake data in R | Data Visualization library
kandi X-RAY | charlatan Summary
kandi X-RAY | charlatan Summary
[] charlatan makes fake data, inspired from and borrowing some code from Python’s faker (
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of charlatan
charlatan Key Features
charlatan Examples and Code Snippets
Community Discussions
Trending Discussions on charlatan
QUESTION
I've been trying to teach myself a little bit about coding and thought a cool project would be to make a DND 5E Character Generator in Python 3.5 for personal use. I've built a simple one so far that'll give you a Class, Gender, Race, and Background. But I really want to flesh it out a ton more over time. Eventually I'd like to have it do everything involved in character creation and type it into a PDF character sheet. But I'm not nearly that far yet. I've managed to hack together something resembling real code that works thus far, now I want to add in Stat Rolling and that's where I need help 'cause I'm flying by the seat of my pants and don't really know what I'm doing.
So the way I like to roll stats for characters is to roll 4d6 and drop the lowest die, then add the three remaining numbers together to get a stat number. Then I do that 7 times and drop the lowest number to have a total of 6 stat numbers available to assign to the different stats. I'm not sure how to drop the lowest number and add the remainders together, also not 100% sure how to handle assigning the stats.
For now I'm thinking they should probably be assigned automatically at first and then later on I could code in the option to change stuff at the end after presenting the user with a "finished" character. Likewise if I make an automatic version first I could go back later and add the option to do an automatic or guided character creation, and make a guided version that prompts the user to choose each setting as they go along. Anyways, for now I just really need help with how to add the stats up and assign them correctly so any advice you'd have to offer would be greatly appreciated! Here's my code so far:
...ANSWER
Answered 2018-Oct-04 at 08:50A set is not the right choice here; you do need all of the dice.
A function like this should do:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install charlatan
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page