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
- 01
Define stat rolling
~1.5hWrite a function that rolls stats (e.g. 4d6 drop lowest) for strength, dexterity, etc.
- 02
Define classes and backgrounds
~1.5hCreate tables listing character classes and backgrounds with associated bonuses.
- 03
Implement random selection
~1.5hWrite weighted random selection functions for class and background choice.
- 04
Generate the character sheet
~1.5hCombine rolled stats and choices into a formatted printed character sheet.
- 05
Add save-to-file option
~1hLet the user save generated characters to a text file for later reference.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack