- Reorganize docs/ (flatten to architecture/ and implementation/) - Remove MonitoringModule from MVP (no app detection) - Add LanguageLearningModule to MVP - Create CLAUDE.md (concise project overview) - Add language learning to README and architecture - Update all examples to use SchedulerModule instead of MonitoringModule 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
240 lines
7.9 KiB
Markdown
240 lines
7.9 KiB
Markdown
# Configuration Documentation
|
|
|
|
Ce dossier contient toute la documentation relative à la configuration du système Warfactory.
|
|
|
|
## Fichiers de Configuration
|
|
|
|
### `transport-economic-system.md`
|
|
**Points 251-290 - Configuration Parameters**
|
|
|
|
Configuration économique complète avec paramètres JSON :
|
|
|
|
#### Transport Configuration
|
|
- Coûts par mode de transport (ship/train/air/truck)
|
|
- Seuils de volume et temps de livraison
|
|
- Optimisation multi-modale
|
|
|
|
#### Storage Configuration
|
|
- Coûts de stockage (€0.02/kg/day)
|
|
- Seuils d'inventaire (urgent/normal/oversupplied)
|
|
- Capacités maximales
|
|
|
|
#### Market Configuration
|
|
- Phases économiques (6h cycles)
|
|
- Multiplicateurs de rareté
|
|
- Limites de coûts de transport
|
|
|
|
#### Infrastructure Configuration
|
|
- Coûts de construction (rail/port/airport)
|
|
- Périodes de retour sur investissement (max 15 ans)
|
|
- Déclencheurs d'investissement
|
|
|
|
#### Economic Complexity Configuration (Point 31)
|
|
**Progressive Sophistication - 5 Phases configurables :**
|
|
- **Phase 1** : Basic transport cost differences
|
|
- **Phase 2** : Order stacking and volume optimization
|
|
- **Phase 3** : Trading companies and arbitrage
|
|
- **Phase 4** : Infrastructure investment and regional development
|
|
- **Phase 5** : Complex economic simulation (Victoria 3-level)
|
|
|
|
**Configuration JSON-driven :**
|
|
```json
|
|
{
|
|
"complexity_level": "basic|intermediate|advanced|victoria3",
|
|
"enabled_modules": ["population", "market", "money", "trade", "policy"],
|
|
"simulation_frequency": "daily|hourly|realtime",
|
|
"economic_phases": {
|
|
"phase_1": { "enabled": true, "transport_costs": true },
|
|
"phase_2": { "enabled": false, "order_stacking": false },
|
|
"phase_3": { "enabled": false, "trading_companies": false },
|
|
"phase_4": { "enabled": false, "infrastructure_roi": false },
|
|
"phase_5": { "enabled": false, "victoria3_complexity": false }
|
|
}
|
|
}
|
|
```
|
|
|
|
**Victoria 3-Level Modules (Phase 5) :**
|
|
- **PopulationModule** : Demographics (Workers/Engineers/Managers classes)
|
|
- **MarketModule** : Supply/demand dynamics, price discovery
|
|
- **MoneyModule** : Currency, inflation, banking systems
|
|
- **TradeModule** : International commerce, tariffs, trade agreements
|
|
- **PolicyModule** : Government intervention, taxation, regulation
|
|
|
|
#### Mode-Based Security Configuration (Point 32)
|
|
**Sécurité adaptative selon contexte d'usage :**
|
|
|
|
**Configuration JSON-driven :**
|
|
```json
|
|
{
|
|
"security_mode": "dev|solo|multiplayer",
|
|
"dev_mode": {
|
|
"unrestricted_access": true,
|
|
"debug_tools_enabled": true,
|
|
"hot_reload_validation": false,
|
|
"modding_allowed": true
|
|
},
|
|
"solo_mode": {
|
|
"modding_allowed": true,
|
|
"local_authority": true,
|
|
"config_modification": true,
|
|
"network_validation": false
|
|
},
|
|
"multiplayer_mode": {
|
|
"server_authority": true,
|
|
"anti_cheat_active": true,
|
|
"strict_validation": true,
|
|
"zero_tolerance": true
|
|
}
|
|
}
|
|
```
|
|
|
|
**Mode Security Levels :**
|
|
- **Dev Mode (Unrestricted)** : Full access, debug tools, hot-reload sans restriction
|
|
- **Solo Mode (Modding)** : Player modifications autorisées, local authority, config freedom
|
|
- **Multiplayer Mode (Authoritative)** : Server authority strict, anti-cheat complet, validation totale
|
|
|
|
**Architecture adaptative :**
|
|
```cpp
|
|
enum SecurityMode { DEV_MODE, SOLO_MODE, MULTIPLAYER_MODE };
|
|
class SecurityManager {
|
|
void configureMode(SecurityMode mode); // Adaptive security enforcement
|
|
};
|
|
```
|
|
|
|
### `module-configuration.md`
|
|
**Configuration Système Modulaire**
|
|
|
|
Configuration des modules et systèmes de dépendances :
|
|
|
|
#### Smart Dependencies (Point 33)
|
|
**Dependency graphs avec recalculation intelligente :**
|
|
|
|
```cpp
|
|
class ConfigDependencyGraph {
|
|
// Mapping ConfigKey → ComponentID avec dépendances
|
|
std::map<ConfigKey, std::vector<ComponentID>> dependencies = {
|
|
{"materials.steel_plating.weight", {tank_mk1, tank_mk2, heavy_tank}},
|
|
{"materials.steel_plating.cost", {economy_steel, factory_line_2}},
|
|
{"weapons.cannon_75mm.damage", {tank_mk1, artillery_piece}}
|
|
};
|
|
|
|
void onConfigChange(ConfigKey key, json newValue) {
|
|
auto affected = dependencies[key];
|
|
for(auto component : affected) {
|
|
component.recalculate(key, newValue);
|
|
markForUpdate(component);
|
|
}
|
|
}
|
|
};
|
|
```
|
|
|
|
**Intelligent Propagation Flow :**
|
|
```
|
|
Config Change → Dependency Resolution → Background Recalculation → Live Update
|
|
```
|
|
|
|
**Example concret :**
|
|
- **Change** : `steel_plating.weight = 15.0` (au lieu de 10.0)
|
|
- **Affected** : `tank_mk1`, `tank_mk2`, `heavy_tank` automatiquement détectés
|
|
- **Recalculation** : Weight/performance tous tanks recalculés en background
|
|
- **Live Update** : Changes instantanés sans restart ni rebuild
|
|
|
|
#### Module Config Patterns
|
|
- A/B testing via configuration
|
|
- Hot-swapping de systèmes
|
|
- Configuration adaptable par environnement
|
|
|
|
#### Avantages Modulaires
|
|
- Config changes instantanés (vs restart)
|
|
- Testing et debugging surgical
|
|
- Déploiement microservices-like
|
|
|
|
### `error-handling.md`
|
|
**Points 291-310 - Error Handling**
|
|
|
|
Gestion complète des erreurs et fiabilité système :
|
|
|
|
#### Engine Crash/Restart
|
|
- Health check HTTP (30s intervals)
|
|
- Redis heartbeat monitoring
|
|
- Recovery automatique avec state restoration
|
|
|
|
#### Redis Failover
|
|
- Persistence avec snapshots + append-only
|
|
- Multiple instances (primary/replica)
|
|
- Message replay après restart
|
|
|
|
#### Anti-cheat & Validation
|
|
- Server authoritative design
|
|
- Anti-cheat psychologique (bugs simulés)
|
|
- Input validation V1/V2
|
|
|
|
#### Network & Module Failures
|
|
- Graceful degradation avec cache fallback
|
|
- Module isolation (pas de cascade)
|
|
- Timeout handling resilient
|
|
|
|
### `security-measures.md`
|
|
**Points 311-330 - Security Measures**
|
|
|
|
Mesures de sécurité complètes et anti-cheat avancé :
|
|
|
|
#### Server Authority
|
|
- Server contrôle simulation complète
|
|
- Zero game logic côté client
|
|
- Mode-based security (dev/solo/multiplayer)
|
|
|
|
#### Anti-cheat System
|
|
- Anti-cheat psychologique avec bugs simulés
|
|
- Design-based prevention structurelle
|
|
- Guerre psychologique contre cheaters
|
|
|
|
#### Client Prediction
|
|
- V1 Thin Client (server authoritative)
|
|
- V2 Shared Logic (prediction + validation)
|
|
- Migration progressive sans réécriture
|
|
|
|
#### Psychological Warfare
|
|
- Escalation progressive contre cheaters
|
|
- Retention joueurs légitimes
|
|
- Stratégies comportementales adaptatives
|
|
|
|
### `deployment-strategies.md`
|
|
**Points 331-350 - Deployment Strategies**
|
|
|
|
Stratégies de déploiement et migration progressive :
|
|
|
|
#### Progressive V1→V2 Migration
|
|
- Migration zero-risk avec A/B testing
|
|
- Fallback automatique vers V1
|
|
- Forward-compatible architecture
|
|
|
|
#### Hot-reload Production
|
|
- Updates sans downtime en production
|
|
- State preservation durant updates
|
|
- Rollback rapide si problème
|
|
|
|
#### A/B Testing Strategies
|
|
- Testing dynamique via configuration
|
|
- User segmentation et metrics collection
|
|
- Gradual expansion 5% → 100%
|
|
|
|
#### Risk Mitigation
|
|
- Backward compatibility préservée
|
|
- Progressive enhancement sans régression
|
|
- Mode-based deployment (dev/staging/prod)
|
|
|
|
## Intégration
|
|
|
|
Ces paramètres correspondent aux **Points 251-350** de la master integration list et sont prêts pour intégration dans les systèmes de jeu.
|
|
|
|
**Status :** ✅ **SPÉCIFIÉS ET VÉRIFIÉS**
|
|
|
|
**Localisations originales :**
|
|
- `docs/toCheck/transport-economic-system.md` → Paramètres économiques (251-290)
|
|
- `docs/toCheck/architecture-modulaire.md` → Configuration modulaire + Anti-cheat (311-330)
|
|
- `docs/global/architecture-technique.md` → Error handling (291-310) + Server authority (311-330)
|
|
- `docs/architecture-technique.md` → Client prediction (311-330) + Migration V1→V2 (331-350)
|
|
- `docs/configuration/` → A/B testing et deployment patterns (331-350)
|
|
|
|
**Points couverts :** 100+ paramètres de configuration, error handling, sécurité et déploiement détaillés |