# Vehicle / Ship Data Reference

Condensed reference for querying ships and vehicles from 5e.tools `vehicles.json`.

## File Location
`/home/thesage/5etools/data/vehicles.json`

## Top-Level Structure
```json
{
  "vehicle": [
    { "name": "Sailing Ship", "source": "GoS", ... },
    ...
  ]
}
```

## Key Ship Types (Ghosts of Saltmarsh)
| Name | Size | Hull HP | DT | Crew | Cargo | Source Page |
|------|------|---------|----|------|-------|-------------|
| Keelboat | G (60x20 ft) | 100 | 10 | 3 | 0.5 tons | GoS p.188 |
| Longship | G (70x20 ft) | 300 | 15 | 40 | 10 tons | GoS p.190 |
| Sailing Ship | G (100x20 ft) | 300 | 15 | 30 | 100 tons | GoS p.192 |
| Warship | G (100x20 ft) | 500 | 20 | 40 | 200 tons | GoS p.194 |
| Galley | G (130x20 ft) | 500 | 20 | 80 | 150 tons | GoS p.187 |

## Vehicle Fields (Different from Monsters)
Unlike monsters, vehicles use these top-level keys:

- `vehicleType`: Always `"SHIP"` for water vessels
- `size`: `"G"` (Gargantuan)
- `dimensions`: `["130 ft.", "20 ft."]` — length and beam
- `terrain`: `["sea"]`
- `capCrew`, `capPassenger`, `capCargo`: Capacity numbers
- `pace`: Overland pace in mph
- `str`, `dex`, `con`, `int`, `wis`, `cha`: Object ability scores
- `hull`: `{ "ac": 15, "hp": 500, "dt": 20 }` — Damage Threshold
- `control`: Array of helm components `{ name, ac, hp, entries[] }`
- `movement`: Array of propulsion `{ name, ac, hp, hpNote, speed[] }`
- `weapon`: Array of mounted weapons `{ name, count?, ac, hp, entries[] }`
- `actionThresholds`: Dict mapping crew minimum to action count `{ "0": 0, "1": 3, "2": 20, "3": 40 }`
- `action`: Array of text / list objects describing available actions

## Quick Lookup Script
```python
import json

data = json.load(open('/home/thesage/5etools/data/vehicles.json'))
for v in data.get('vehicle', []):
    if v.get('name') == 'Sailing Ship':
        print(f"Hull: AC {v['hull']['ac']}, HP {v['hull']['hp']}, DT {v['hull']['dt']}")
        print(f"Speed: {v['movement'][0]['speed'][0]['entries'][0]}")
        for w in v.get('weapon', []):
            print(f"Weapon: {w['name']} (AC {w['ac']}, HP {w['hp']})")
```

## Why the Query Script Fails on Vehicles
The `query.py` script does a fuzzy substring match across ALL data files. "Sailing Ship" matches "Jiangshi" because the script's search logic is broad. Always use direct JSON access for exact vehicle lookups.
