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 3600Use 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 propagateBenefits:
- 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 XPAutomated 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 skillNew 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.
| Deprecated | Use 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
- Backup database
mysqldump -u root -p your_database > backup.sql-
Update resource files
- Replace old files with v1.9.0
-
Start server
- Resource will detect old structure
-
Run migration
migrate_skills- Verify
test_migration📊 Comparison Table
| Feature | v1.7.x | v1.9.0 | Improvement |
|---|---|---|---|
| Network Events | Baseline | Optimized | -60-70% |
| DB Query Speed | ~50ms | ~5-10ms | 5-10x faster |
| Memory Usage | Baseline | Optimized | -20-30% |
| Global Multipliers | ❌ | ✅ | NEW |
| Statebag Sync | ❌ | ✅ | NEW |
| Bulk Operations | ❌ | ✅ | NEW |
| Migration Tools | ❌ | ✅ | NEW |
| Database Structure | JSON columns | Normalized | Much 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
- ❌
disableSafetyCheckconfig option - ❌ Manual sync requirements
- ❌ Redundant code
Fixed
- 🐛 Export naming inconsistencies
- 🐛 Memory leaks in caching
- 🐛 Race conditions in XP calculations
- 🐛 Database performance bottlenecks
📚 Resources
Migration Guide
Step-by-step upgrade instructions
Global Multipliers Guide
Learn to use XP multipliers
Performance Details
Technical performance improvements
Updated API Reference
New exports and functions
🎉 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! 🎮