๐Ÿ“šHate Quests

Introduction

Hate Missions is a comprehensive quest system for FiveM servers that enables server owners to create immersive, multi-stage missions for players. This system includes NPCs, dialogue trees, quest tracking, rewards, and various mission types to enhance player engagement and create meaningful gameplay experiences.

Features

Dynamic Quest System

  • Multiple Quest Types: Support for collection, delivery, location-based, and combat quests

  • Multi-Stage Missions: Create complex mission flows with dependencies between objectives

  • Quest Tracking: Real-time mission progress tracking with visual UI

  • Cooldown System: Prevent quest farming with customizable cooldown timers

Rich NPC Interaction

  • Interactive NPCs: Place quest givers throughout your map with customizable appearances

  • Dynamic Dialogue: Contextual dialogue system with multiple response options

  • NPC Camera System: Immersive dialogue camera that focuses on the NPC during conversations

  • NPC Animation: NPCs use talking animations during dialogue to enhance immersion

User Interface

  • Quest Tracker: Persistent UI element showing active quest progress

  • Mission Notifications: Visual notifications for quest updates

  • Dialogue Interface: Clean, responsive dialogue interface with avatar support

  • Rewards Display: Clear visualization of quest rewards

Combat & Objectives

  • Enemy Spawning: Dynamic enemy spawn system based on quest requirements

  • Various Enemy Types: Configure different enemy models for different quest themes

  • Location Objectives: Missions requiring players to visit specific locations

  • Collection & Delivery: Item-based quest objectives with inventory integration

Framework Integration

  • Multi-Framework Support: Compatible with ESX and QBCore frameworks

  • Database Storage: Persistent quest progress using MySQL

Admin Features

  • Quest Management: Admin commands for quest manipulation

  • Quest Statistics: Track completion rates and average completion times

  • Player Quest Tracking: Monitor player progression through quests

Configuration Guide

Basic Setup

The main configuration file (config.lua) allows you to customize all aspects of the quest system:

Config = {}

-- Framework Selection: 'esx' or 'qbcore'
Config.Framework = 'esx' -- Change to 'qbcore' to use QBCore framework

System Settings

Customize the system behavior with these settings:

Config.Settings = {
    inventoryCheckInterval = 15000, -- Check inventory every 15 seconds
    questProgressSaveInterval = 30000, -- Save quest progress every 30 seconds
    maxActiveQuests = 5, -- Maximum number of active quests per player
    enableDebugMessages = true, -- Enable debug messages in console
    updateDebounceTime = 3000, -- Minimum time between updates (3 seconds)
    showLocationMarkers = true, -- Show markers for location objectives
    enemySpawnDistance = 50.0, -- Distance at which enemies spawn for kill objectives
    showEnemyBlips = true, -- Show blips for enemies on mini-map
    showEnemyMarkers = true -- Show markers above enemies
}

Configuring NPCs

You can add quest NPCs by adding entries to the Config.QuestNPCs table:

Config.QuestNPCs = {
    {
        id = "npc_id", -- Unique identifier
        name = "NPC Name", -- Display name
        title = "NPC Title", -- Role or title
        model = "ped_model", -- FiveM ped model name
        coords = vector4(x, y, z, heading), -- NPC position
        avatar = "๐Ÿฅ", -- Emoji or image for UI
        status = "Available", -- NPC status
        blip = { -- Minimap blip settings
            sprite = 280,
            color = 2,
            scale = 0.8,
            label = "Quest NPC"
        }
    }
}

Enemy Configuration

Configure different enemy types with Config.EnemyModels:

Config.EnemyModels = {
    -- Default gang members
    default = {
        "g_m_y_mexgang_01", 
        "g_m_y_mexgoon_01"
    },
    
    -- Military/Security enemies
    military = {
        "s_m_y_blackops_01",
        "s_m_y_blackops_02"
    }
    
    -- Add your custom enemy groups here
}

Creating Quests

Add quests to Config.Quests with this structure:

{
    id = "unique_quest_id", -- Unique identifier
    name = "Quest Name", -- Display name
    description = "Quest description shown to players", -- Description
    giver = "npc_id", -- NPC that gives this quest
    level_required = 1, -- Player level required
    prerequisites = {}, -- Previous quests required
    enemy_models = "default", -- Enemy model set to use
    objectives = {
        {
            id = "objective_id", -- Unique per quest
            type = "item_collect", -- Objective type
            description = "Collect 5 bandages", -- Player-facing description
            item = "bandage", -- Item to collect
            target = 5, -- Amount needed
            progress = 0, -- Starting progress
            completed = false -- Initial completion state
        },
        -- More objectives...
    },
    rewards = {
        money = 5000, -- Cash reward
        items = {
            {
                name = "medkit",
                amount = 1
            }
        },
        xp = 100 -- XP reward
    },
    cooldown = 1800 -- Seconds before quest can be repeated
}

Objective Types

The system supports several objective types:

Type
Description
Required Parameters

item_collect

Collect specified items

item, target

kill

Kill enemies

amount, radius (optional), coords (optional)

location

Visit a location

coords, radius

delivery

Deliver items to location

coords, radius, items or unlock_after

Reward System

Configure rewards for quest completion:

rewards = {
    money = 5000, -- Cash reward
    items = { -- Item rewards
        {
            name = "medkit",
            amount = 1
        }
    },
    xp = 100 -- XP reward
}

Installation Instructions

  1. Place the hate-missions folder in your server's resources directory

  2. Add ensure hate-missions to your server.cfg file

  3. Import the SQL schema if using database features

  4. Configure config.lua to match your server's needs

  5. Restart your server

Commands [OPTIONAL]

Player Commands

  • /questui - Toggle the quest interface

  • /questcheck - Check quest-related inventory items

  • /questitem [item] - Check what quests use a specific item

Admin Commands

  • /questlist - List all available quests

  • /questloot [item] [amount] - Spawn quest items for testing

  • /quest_reset [player_id] [quest_id] - Reset quest progress

  • /quest_complete [player_id] [quest_id] - Force complete a quest

Developer Information

Extending Functionality

Developer can extend the system by:

  • Creating custom reward handlers in the framework integration section

  • Adding new NPC dialog options in the dialog generation function

Troubleshooting

Common Issues

  • NPCs not spawning: Check coordinates and model names

  • Quests not starting: Verify prerequisites and level requirements

  • Enemies not spawning: Check enemy model names and spawn distance

  • Progress not saving: Verify database connection and schema

Debug Mode

Enable debug mode in the config to see detailed logs:

Config.Settings = {
    enableDebugMessages = true,
    -- other settings
}

Credits & Support

Developed by Hate Development Visit our Discord: discord.gg/hatedevelopment


ยฉ 2024 Hate Development. All Rights Reserved.