Gridbase

v1.9.0 Changelog

Complete changelog for Dime Skills v1.9.0 major refactor

Dime Skills v1.9.0 - Major Refactor

🎉 Major performance improvements and new features!

Release Date: 2025
Type: Major Refactor
Migration Required: Yes (from v1.7.x)

Overview

Version 1.9.0 is a complete architectural overhaul focusing on performance, maintainability, and developer experience. This release introduces normalized database structure, statebag synchronization, and the highly requested global XP multiplier system.

Key Highlights

  • 60-70% reduction in network events
  • 5-10x faster database queries
  • 20-30% reduction in memory usage
  • Global XP multipliers for server-wide events
  • Automated migration tools included

🆕 New Features

Global XP Multiplier System

Run server-wide XP boosts for special events:

-- Double XP weekend
exports.dime_skills:setGlobalMultiplier(2.0, 172800) -- 48 hours

-- Triple XP happy hour
exports.dime_skills:setGlobalMultiplier(3.0, 7200) -- 2 hours

-- Admin command
/setglobalxp 2.0 3600

Use Cases:

  • Weekend events
  • Holiday promotions
  • Server milestones
  • Community celebrations

Statebag Synchronization

Skills now automatically sync via player statebags:

-- Client-side access
local skills = LocalPlayer.state.skills
print(skills.driving.level)

-- No manual sync needed!
-- Server updates automatically propagate

Benefits:

  • Real-time updates
  • 60-70% less network traffic
  • Built-in FiveM optimization
  • No manual event triggers

Bulk Operations

Update multiple skills efficiently:

exports.dime_skills:bulkAddXP(source, {
    driving = 100,
    shooting = 50,
    strength = 25
})

Enhanced Admin Commands

/setglobalxp [multiplier] [duration] - Set global XP boost
/resetglobalxp - Reset to 1.0x
/checkglobalxp - View current multiplier
/setlevel [player] [skill] [level] - Set skill level
/givexp [player] [skill] [amount] - Give XP
/removexp [player] [skill] [amount] - Remove XP

Automated Migration Tools

-- Server console
migrate_skills -- Run automated migration
test_migration -- Verify data integrity (10 tests)

⚡ Performance Improvements

Network Optimization

Before: Manual TriggerClientEvent for every skill change
After: Automatic statebag synchronization with built-in batching

Result: 60-70% reduction in skill-related network events

Database Performance

Old Structure (v1.7.x):

-- JSON columns for each skill (slow)
driving JSON DEFAULT '{"level":1,"xp":0}'
shooting JSON DEFAULT '{"level":1,"xp":0}'
-- ... one column per skill

New Structure (v1.9.0):

-- Normalized with proper indexes
player_skill_data (
    citizenID VARCHAR(60),
    skill_name VARCHAR(50),
    level INT,
    xp DECIMAL(10,2),
    INDEX (citizenID, skill_name)
)

Result: 5-10x faster queries (50ms → 5-10ms average)

Memory Optimization

  • Improved caching strategies
  • Better cleanup on player disconnect
  • Optimized data structures

Result: 20-30% reduction in memory usage

Code Quality

  • Modular architecture (Database, XPCalculator, SkillManager modules)
  • Separated concerns
  • Easier to maintain and extend
  • Better error handling

🔄 API Changes

New Exports

All new exports follow consistent naming:

-- Get skills
exports.dime_skills:getSkills(source)
exports.dime_skills:getSkill(source, 'driving')

-- Modify skills
exports.dime_skills:addXP(source, 'driving', 100)
exports.dime_skills:removeXP(source, 'driving', 50)
exports.dime_skills:setLevel(source, 'driving', 15)

-- Bulk operations (NEW)
exports.dime_skills:bulkAddXP(source, {driving = 100, shooting = 50})

-- Global multipliers (NEW)
exports.dime_skills:setGlobalMultiplier(multiplier, duration)
exports.dime_skills:getGlobalMultiplier()
exports.dime_skills:resetGlobalMultiplier()

Deprecated Exports

Legacy exports still work but are deprecated. Update to new names before v2.0.0.

DeprecatedUse Instead
grabSkills()getSkills()
grabSkill()getSkill()
addEXP()addXP()
remoEXP()removeXP()

💥 Breaking Changes

1. Database Structure

Impact: Requires migration
Action: Run migrate_skills command

The database has been restructured from JSON columns to normalized tables for better performance.

2. Configuration Changes

Removed:

  • disableSafetyCheck - Safety checks always enabled now

Added:

GlobalMultipliers = {
    enabled = true,
}

3. Export Names

Impact: Rename recommended
Compatibility: Legacy names still work (deprecated)

Update your code to use standardized export names.

4. Sync Mechanism

Impact: Manual sync events no longer needed
Action: Remove manual TriggerClientEvent('dime_skills:sendPlayerSkills') calls

Statebags now handle synchronization automatically.


📦 Migration Guide

IMPORTANT: Backup your database before migrating!

Quick Migration

  1. Backup database
mysqldump -u root -p your_database > backup.sql
  1. Update resource files

    • Replace old files with v1.9.0
  2. Start server

    • Resource will detect old structure
  3. Run migration

migrate_skills
  1. Verify
test_migration

Full Migration Guide →


📊 Comparison Table

Featurev1.7.xv1.9.0Improvement
Network EventsBaselineOptimized-60-70%
DB Query Speed~50ms~5-10ms5-10x faster
Memory UsageBaselineOptimized-20-30%
Global MultipliersNEW
Statebag SyncNEW
Bulk OperationsNEW
Migration ToolsNEW
Database StructureJSON columnsNormalizedMuch better

🛠️ Technical Details


🎯 Use Cases

Weekend Event Script

CreateThread(function()
    while true do
        local day = os.date('*t').wday
        
        if day == 6 and os.date('%H') == '18' then
            -- Friday 6PM - start double XP
            exports.dime_skills:setGlobalMultiplier(2.0, 172800)
            print('[Weekend Event] Double XP started!')
        elseif day == 1 and os.date('%H') == '06' then
            -- Monday 6AM - end double XP
            exports.dime_skills:resetGlobalMultiplier()
            print('[Weekend Event] Double XP ended!')
        end
        
        Wait(3600000) -- Check every hour
    end
end)

Skill Requirement Check

RegisterNetEvent('crafting:attemptAdvanced', function()
    local skills = exports.dime_skills:getSkills(source)
    
    if skills.crafting.level >= 15 then
        -- Allow crafting
    else
        -- Show requirement message
    end
end)

📝 Changelog Summary

Added

  • ✨ Global XP multiplier system
  • ✨ Statebag-based synchronization
  • ✨ Normalized database structure
  • ✨ Bulk operations (bulkAddXP)
  • ✨ Migration automation tools
  • ✨ Enhanced admin commands
  • ✨ Performance monitoring

Changed

  • 🔄 Database structure (normalized)
  • 🔄 Export names (standardized)
  • 🔄 Sync mechanism (statebags)
  • 🔄 Code architecture (modular)
  • 🔄 Configuration structure

Removed

  • disableSafetyCheck config option
  • ❌ Manual sync requirements
  • ❌ Redundant code

Fixed

  • 🐛 Export naming inconsistencies
  • 🐛 Memory leaks in caching
  • 🐛 Race conditions in XP calculations
  • 🐛 Database performance bottlenecks

📚 Resources


🎉 What's Next?

Looking ahead to future versions:

  • v1.9.1 - Bug fixes and minor improvements
  • v2.0.0 - Remove deprecated exports, new features
  • More skill types
  • Advanced leaderboards
  • Enhanced analytics

💬 Feedback

We'd love to hear your thoughts on v1.9.0!


Thank you for using Dime Skills! 🎮