This guide explains how to test the Malf AI Camera Microphones upgrade functionality without requiring multiple clients.
- Admin privileges (you need at least AdminFlags.Admin for OSay command)
- A working station with surveillance cameras
- A Malf AI with the Camera Microphones upgrade purchased and enabled
- Use admin commands to become a Malf AI or spawn one
- Purchase the "Camera Microphones" upgrade from the Malf AI store (costs 3 CPU)
- Toggle the upgrade ON using the action button
- As the AI, move your camera view near a surveillance camera
- Make sure you're within 5 tiles of the camera (this is configurable in MalfAiCameraMicrophonesComponent.RadiusTiles)
The OSay admin command can force any entity to speak IC chat, which will trigger the camera microphones system.
Command syntax:
osay <entity_uid> <chat_type> <message>
Chat types available:
- Say (normal speech)
- Whisper (reduced range)
- Shout (increased range)
Example usage:
- Find an entity near a camera (use entity spawn or find existing entities)
- Get the entity's UID (you can see this in entity examine or admin tools)
- Run:
osay 1234 Say "Testing camera microphones" - The AI should receive this message if:
- The speaking entity is within voice range of a camera with microphones
- The AI eye is within 5 tiles of that same camera
- The Camera Microphones upgrade is enabled
- Go into ghost/observer mode
- Possess an entity near a surveillance camera
- Speak normally using the say command
- Switch back to AI to see if you received the message
Expected behavior:
- When conditions are met, the AI should see IC chat messages in their chat log
- The range shown should be the distance from speaker to camera (not speaker to AI)
- Messages should appear as normal IC chat, not in a separate camera interface
Troubleshooting:
- Ensure cameras have both SurveillanceCameraMicrophoneComponent and ActiveListenerComponent
- Verify the camera is Active (cameras can be disabled)
- Check that the AI eye is close enough to the camera (default: 5 tiles)
- Confirm the speaker is within voice range of the camera
- Make sure the upgrade is toggled ON
- Range Testing: Test with speakers at different distances from cameras
- Multiple Cameras: Test with multiple microphone-enabled cameras
- Cross-Z-Level: Test if it works across different floors/levels
- Different Chat Types: Test whispers (shorter range) and shouts (longer range)
- Camera States: Test with active/inactive cameras
The camera microphones system processes these conditions:
- Message must have VoiceRange > 0 (IC chat only)
- AI must have MalfAiCameraMicrophonesComponent with EnabledEffective = true
- AI must have a valid RemoteEntity (eye)
- At least one camera must satisfy both:
- Speaker within voice range of camera
- AI eye within RadiusTiles of same camera
- No microphone cameras: Not all cameras have microphones by default
- Upgrade not enabled: Make sure to toggle the upgrade after purchasing
- Wrong chat type: OOC messages won't trigger the system
- Camera inactive: Cameras can be disabled/powered off
This testing method allows full verification of the camera microphones functionality using only admin commands and single-client testing.