This guide explains how to use the test modes for the battle scene to quickly create test characters and enemies for development and testing purposes.
Two test mode scripts have been created to help with battle scene testing:
Add to Battle Scene:
1. Open your BattleScene
2. Create an empty GameObject named "BattleTestMode"
3. Add the BattleTestMode component to it
4. Configure the settings in the inspector
Configuration Options:
Enable Test Mode: Master switch to enable/disable test modeTest Player Count: Number of player characters (1-4)Test Enemy Count: Number of enemy characters (1-6)Available Weapons: Array of weapon types to randomly assignPlayer Names: Array of names for test playersEnemy Names: Array of names for test enemiesAutomatic Activation:
Right-click on the BattleTestMode component to access these commands:
Add to Battle Scene:
1. Open your BattleScene
2. Create an empty GameObject named "EnhancedBattleTestMode"
3. Add the EnhancedBattleTestMode component to it
4. Configure the settings in the inspector
Configuration Options:
Enable Enhanced Test Mode: Master switchTest Player Count: Number of players (1-4)Test Enemy Count: Number of enemies (1-6)Test Terrain: Terrain type for the battleTest Weather: Weather conditionsTest Time Of Day: Time in 24-hour formatBase Player Health: Starting HP for playersBase Enemy Health: Starting HP for enemiesBase Armor Class: Base AC valueTest Weapons: Array of WeaponItem assets to useWeaponItem Setup (Optional but Recommended):
1. Create WeaponItem assets in Project window:
Right-click → Create → RPG → Items → Weapon
2. Configure the weapon stats and behavior
3. Assign them to the Test Weapons array
4. Test characters will randomly get these weapons
Right-click on the EnhancedBattleTestMode component:
For Simple Testing: Use BattleTestMode when you just need basic characters for testing placement, movement, or basic combat mechanics.
For Full Testing: Use EnhancedBattleTestMode when you need realistic character stats, equipment, and battle context for testing the complete combat system.
Don't Use Both: Only use one test mode at a time to avoid conflicts.
Both test modes integrate seamlessly with the existing battle setup:
1. Add EnhancedBattleTestMode to scene
2. Set Test Player Count = 1, Test Enemy Count = 1
3. Right-click component → "Create Simple Test Battle"
4. Press Play to test 1v1 combat
1. Create several WeaponItem assets with different stats
2. Add them to the Test Weapons array in EnhancedBattleTestMode
3. Right-click component → "Create Enhanced Test Data"
4. Characters will spawn with random weapons from your array
1. Add BattleTestMode to scene
2. Right-click component → "Create Large Test Battle"
3. Press Play to test 4v6 battle performance
1. Add EnhancedBattleTestMode to scene
2. Set Test Terrain = Mountains, Test Weather = Storm, Time = 22
3. Create Enhanced Test Data
4. Test how different environments affect combat
Both test modes provide extensive debug logging:
Enable Show Debug Logs in the inspector to see all test mode activity.
Enable Test Mode is checkedplayerPrefab and enemyPrefab assigned in BattleSetupYou can extend the test modes to create specific character builds:
// In EnhancedBattleTestMode.CreateTestPlayerData()
if (playerName == "TestMage")
{
playerData.wisdom = 18; // High wisdom for mage
playerData.equippedWeapon = "Staff";
}
Create different test scenarios by modifying the context:
[ContextMenu("Create Night Ambush Test")]
public void CreateNightAmbushTest()
{
testTerrain = TerrainType.Forest;
testWeather = Weather.Clear;
testTimeOfDay = 2f; // 2 AM
testPlayerCount = 2;
testEnemyCount = 4;
CreateEnhancedTestData();
}
This system makes it easy to test any battle scenario quickly without going through the full character creation and travel system.