Search Unity

Automatic character sheet maker

Discussion in 'Game Design' started by thedesertcraft0, Sep 4, 2019.

  1. thedesertcraft0

    thedesertcraft0

    Joined:
    Sep 4, 2019
    Posts:
    3
    hello everyone, i am new to programming as a whole and wanted to make an automatic d&d character sheet generator for my computer science class. i would eventually like to have a mobile app for it but id like to start with just a basic program. could anyone point me in the right direction? thanks in advance!
     
    TheKingOfTheRoad likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,323
    Can you mention what part of this project you're having difficulty with?

    Otherwise I'd assume that the project will be mostly just UI based, with your own custom scripts hooked in. I'd suggest finding a basic UI tutorial. The current UI system was added in Unity 4.6, so any tutorial from the last few years should be fine for UI.
     
    TheKingOfTheRoad and JoeStrout like this.
  3. thedesertcraft0

    thedesertcraft0

    Joined:
    Sep 4, 2019
    Posts:
    3
    well, im looking to make a program that could take information from a specific source (say, a downloaded version of the Player's handbook for D&D) write information, roll dice, things like that.

    i think the order would go like this:
    program looks and opens character sheet
    it takes a race and class
    it rolls for stats (using the standard rule of rolling 4 6-sided dice and subtracting the lowest number, repeat 6 times)
    depending on the race and class, it gives priority to the most useful stats for the build
    it fills in the character sheet with the information it has
    it looks up (if the class can have them) spells and cantrips and forms a list (optional as to not make a faulty character)
    fills in additional stuff (AC, max and current hit points, hit dice, initiative, proficiency bonus and general proficiencies in tools/weapons and whatnot as well as speed)
    adds equipment that you'd get from your race/class (with the exception of equipment you'd have to choose from two options such as having an explorer's pack or a dungeoneer's pack
    finishing touches such as name, background and alignment (giving any extra stuff that is given from the background)

    it would not fill skills, spells or equipment that falls under the criteria mentioned above, as well as languages for the fact that skills and spells, if completely random, can ruin a character. same goes for equipment such as packs, as having a dungeoneer one when you won't be going in a dungeon is just useless.
    so, would UI still be a major thing? or would i need something else?
     
  4. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    533
    Disclaimer; I know barely anything about D&D

    Taking information from the D&D Handbook PDF would be the hardest part here.
    I'd avoid attempting something like this unless you're familiar with coding AI to extract the right information...

    You'd be better off providing an XML file with all (or a subset) of the races, classes, stats, skills etc and arranging the data in a way that it shows what classes are available for the race, skills/stats available for the classes. This part is important, because the more information and structure in your source data, the less code you will need to write.

    Then your code would do something along the lines of:
    -Read the XML file
    -Pick a random race from the list of races
    -Pick a class from the available classes for that race
    -Pick n skills available for that class
    -Loop through stats and run your dice algorithm to determine the value for each stat
    -Generate a name and pick a random background
    -Populate the information into your UI elements
     
  5. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    1,562
    If the end goal is to make character sheets, wouldn't something like Microsoft Excel work a lot better than Unity?
     
  6. Socrates

    Socrates

    Joined:
    Mar 29, 2011
    Posts:
    668
    You may want to talk to your professor before even considering this project. Depending on the type of professor they are, this project could be a no-starter because WoTC have always made it clear that no one is allowed to use the D&D materials in any form of software creation. Their are custom character sheets out there, including in PDF and Excel, because those have no content in them. Creating a character generator, especially one which includes actual text from the game books or System Reference Document would be a violation of the rules that govern the SRD and WoTC's copyrights.

    Reading your initial post, the first thing that came to mind was a professor of mine from college who would have given an automatic F for using someone else's copyrighted material like this.
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,323
    The makers of D&D are notoriously litigious regarding perceived used of their IP by unauthorized 3rd parties.
     
  8. thedesertcraft0

    thedesertcraft0

    Joined:
    Sep 4, 2019
    Posts:
    3
    thanks for the info guys. i've checked with my teacher, and he said its perfectly fine as long as i use it purely for personal/educational use. he also said that as long as i cite my sources, it would be fine. we did end up agreeing that it would be better to use something other than unity, and your suggestions are appreciated and taken into account. thanks everyone!