API ReferenceGE Extensionscorevehicle
Vehicle In-Place Edit
In-game vehicle part editor with keyboard-driven navigation and live part swapping.
In-game vehicle part editor with keyboard-driven navigation and live part swapping.
Overview
Extension: core_vehicle_inplaceEdit - A debug/development tool for editing vehicle parts in real-time. Uses keyboard navigation (up/down/left/right) to browse the part tree, select slots, and swap parts with instant respawn. Highlights parts with mesh alpha manipulation.
Public Functions
| Function | Description |
|---|---|
M.onUpdate(dtReal, dtSim, dtRaw) | Main update loop: renders debug UI overlay and handles animations |
M.setShowWindow(val) | Opens/closes the editor |
M.toggleShowWindow() | Toggles editor and vehicle edit mode |
M.onInput(type, value) | Handles input: up, down, left, right, select, back |
Input Controls
| Key | Action |
|---|---|
| Up/Down | Navigate slots or available parts |
| Right | Enter child part |
| Left | Go back to parent part |
| E (select) | Open slot selection / confirm part choice |
| R (back) | Cancel selection |
| G (exit) | Close editor |
How It Works
- Reads vehicle data via
core_vehicle_manager.getPlayerVehicleData() - Gets available parts from
jbeam/io.getAvailableParts() - Navigates the part tree using
slotsdefinitions - Swaps parts by modifying
config.parts[slotType]and callingvehicle:respawn() - Highlights current part hierarchy with mesh alpha (0 = hidden, 0.4 = dimmed, 1 = visible)
Usage Examples
-- Toggle the in-place editor
core_vehicle_inplaceEdit.toggleShowWindow()
-- Open the editor
core_vehicle_inplaceEdit.setShowWindow(true)Notes
- This is primarily a developer/debug tool
- Uses
pushActionMapHighestPriority("vehicleEdit")for input capture - Hides the CEF UI while active for an unobstructed view
- Part changes are applied immediately via vehicle respawn
See Also
- Vehicle Manager - Vehicle data and spawning