RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Campaign SystemCampaign LoaderCampaign ComicsCampaign DealerCampaign ExplorationCampaign Photo SafariCampaign Rewards

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionscampaign

Campaign Photo Safari

Photo safari mission system for campaign exploration. Players drive to locations, enter photo mode, and capture specific objects within camera constraints.

Photo safari mission system for campaign exploration. Players drive to locations, enter photo mode, and capture specific objects within camera constraints.


Overview

Manages photo safari missions where players must photograph target objects from correct positions. Tracks found/unfound locations, unlocks progressive hints via trigger zones, and validates photos against camera frustum and distance checks.


Public API

FunctionArgsReturnsDescription
M.missionacceptedfile-Loads photo safari JSON data and initializes mission state
M.onBeamNGTriggerdata-Processes trigger events for hints and photo locations
M.takepiccheck-booleanValidates photo from photo mode (object in frustum, camera distance)

Module State

FieldTypeDescription
M.acceptbooleanWhether a photo safari mission is active
M.photomodeOpenbooleanWhether player is in a photo-eligible trigger zone
M.targetObjstringName of the scene object to photograph

Mission Data Format

{
  "location_key": {
    "objectName": "SceneObjectName",
    "closeToPhoto": "trigger_name",
    "hints": ["Hint 1", "Hint 2", "Hint 3"]
  }
}

Photo Validation

takepiccheck() performs these checks:

  1. Already found - Skip if location already photographed
  2. Close enough - Player must be near the target trigger
  3. Camera distance - Camera must not be farther than initial entry distance
  4. Frustum check - Target object's world box must be fully contained in camera frustum
  5. Special case: on-site - Additional vehicle position check for on_site locations
-- Frustum validation
if not Engine.sceneGetCameraFrustum():isBoxOutside(sceneObject:getWorldBox())
   and Engine.sceneGetCameraFrustum():isBoxContained(sceneObject:getWorldBox()) then
  -- Photo accepted!
end

Hint System

Hints are unlocked progressively by entering specific trigger zones:

-- Predefined hint triggers
local hintTriggers = {
  'prototype_2_trigger_CD',
  'prototype_2_shady_trigger',
  'prototype_2_ranger_trigger',
  'prototype_2_stuntman_trigger',
  'prototype_2_police_trigger'
}
-- Each trigger visited unlocks the next hint level for all unfound locations

Trigger Flow

Enter hint trigger → Unlock next hint for all unfound locations
Enter photo location trigger → Set photomodeOpen, record target object
Enter closeToPhoto trigger → Enable photo validation, record camera distance
Exit photo location → Disable photomodeOpen

Integration

Called from campaign_exploration.openLocationExtraUI():

if locationInfo.subtype == 'photoMode' then
  campaign_photoSafari.missionaccepted(locationData.filepath)
end

Photo safari data is also read by campaign_exploration.getMinimapInfo() for minimap POI display.


Notes

  • Photo validation exits photo mode and shows a flash message with the result
  • simTimeAuthority.pause(false) is called after validation to resume gameplay
  • The on_site location has special handling requiring both vehicle and camera positioning
  • seen table tracks which hint triggers have been visited (prevents re-triggering)
  • Camera distance reference is set on first entry to the closeToPhoto trigger
  • Uses Engine.sceneGetCameraFrustum() for real-time frustum queries

See Also

  • Campaign Exploration - Triggers photo safari from exploration UI
  • Campaign System - Campaign orchestration

Additional Exports

  • M.cameraDistanceToObject - (undocumented)
  • M.closeToPhoto - (undocumented)
  • M.count - (undocumented)
  • M.description - (undocumented)
  • M.foundLocation - (undocumented)
  • M.location - (undocumented)
  • M.msg - (undocumented)
  • M.photoSafariData - (undocumented)
  • M.photoSafarimissions - (undocumented)
  • M.showhint - (undocumented)

Campaign Exploration

Free-roam exploration mode between campaign scenarios. Manages trigger zones, location markers, road navigation, minimap UI, vehicle spawning, and transitions between exploration and scenarios.

Campaign Rewards

Processes and distributes rewards from campaign scenarios - items, vehicles, and player choices.

On this page

OverviewPublic APIModule StateMission Data FormatPhoto ValidationHint SystemTrigger FlowIntegrationNotesSee AlsoAdditional Exports