LuabeginnercliAI generated

Dice-Rolling RPG Character Generator Script

Build a script that randomly generates tabletop RPG characters, rolling stats, picking a class and background, and printing a formatted character sheet. Learners practice functions, tables, and Lua's math.random for weighted random choices.

Estimate
~7h
Steps
5
Completed by
0
Proposed by
codeseed.app

Lua standard library

Project roadmap

  1. 01

    Define stat rolling

    ~1.5h

    Write a function that rolls stats (e.g. 4d6 drop lowest) for strength, dexterity, etc.

  2. 02

    Define classes and backgrounds

    ~1.5h

    Create tables listing character classes and backgrounds with associated bonuses.

  3. 03

    Implement random selection

    ~1.5h

    Write weighted random selection functions for class and background choice.

  4. 04

    Generate the character sheet

    ~1.5h

    Combine rolled stats and choices into a formatted printed character sheet.

  5. 05

    Add save-to-file option

    ~1h

    Let the user save generated characters to a text file for later reference.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~7h · 5 steps

Tech stack

Lua standard library