Build a Fishing Module
A complete walkthrough of building a fishing minigame from scratch. Covers module scaffolding, services, inventory integration, NUI feedback, and testing.
INFO
This is the same module introduced in Your First Module, expanded with more depth.
What You'll Build
/fishcommand that players use near fishing spots- 60% catch chance, with weighted fish types
- Fish added to player inventory via
IInventory - Notification on catch/miss via
INotifications - Fishing log stored in the database
- Unit tests for the catch logic
View the full source code on GitHub →
Steps
- Scaffold the module
- Edit manifest.lua
- Add config
- Create the migration
- Write the service
- Add client feedback
- Write tests
Extensions
After completing this tutorial, try:
- Add a fishing rod item requirement
- Add a cast animation using
TaskPlayAnim - Show a progress bar during the cast wait
- Add a leaderboard command
- Sell fish to an NPC using
IEconomy