Expert guidance for developing and maintaining FS25 Vehicle Sorter, a Python desktop app that reorders vehicles in Farming Simulator 2025 savegames by modifying vehicles.xml files.
This skill provides expert guidance for working with the FS25 Vehicle Sorter codebase, a Python desktop application that allows Farming Simulator 2025 players to reorder vehicles in their savegame files.
Provides comprehensive context about the FS25 Vehicle Sorter project architecture, FS25's unique vehicle format (hash-based uniqueIds instead of numeric IDs), development workflows using uv package manager, and critical implementation details for maintaining the vehicle reordering logic.
```
main.py # Root entry point
src/fs25_vehicle_sorter/
├── main.py # GUI event loop and user interactions
├── vehicle_xml.py # VehiclesXml class - core business logic
└── model.py # Vehicle data model
pyproject.toml # Project config with dependency groups
```
**1. main.py (Application Entry)**
**2. vehicle_xml.py (VehiclesXml class)**
**3. model.py (Vehicle class)**
1. TAB cycling order = order of `<vehicle>` elements in XML
2. To reorder: rearrange XML elements to match desired order
3. Attachment references use `attachedVehicleUniqueId` pointing to `uniqueId`
4. References remain valid after reordering (no updates needed)
```bash
uv sync
```
```bash
uv run python main.py
```
```bash
uv run pyinstaller --onefile --name "FS25 Vehicle Sorter" --windowed main.py
```
```bash
uv run ruff check .
uv run ruff check --fix .
uv run ruff format .
uv run ruff check --fix . && uv run ruff format .
```
```bash
uv run pre-commit install
uv run pre-commit run --all-files
git commit --no-verify
```
When saving, reorder `<vehicle>` XML elements to match the vehicles_list order. This is THE mechanism that changes TAB order in-game.
**Always** create timestamped backup before saving vehicles.xml to prevent data loss.
**Always** reload the savegame after saving to refresh in-memory state and prevent stale data issues.
Use relative imports within src/fs25_vehicle_sorter:
```python
from .model import Vehicle
from .vehicle_xml import VehiclesXml
```
The application detects platform and sets default savegame paths:
When working with this codebase:
1. **Always use uv commands** - Never suggest pip or other package managers
2. **Respect the src/ layout** - Use relative imports, maintain package structure
3. **Understand FS25 format** - No numeric IDs, hash-based uniqueIds only
4. **Preserve XML element order** - This is critical for vehicle TAB order
5. **Never skip backups** - Timestamped backups must happen before saves
6. **Always reload after save** - Refresh in-memory state to prevent bugs
7. **Use ruff for quality** - Run `ruff check --fix . && ruff format .` before commits
8. **Test with real savegames** - FS25 format is unforgiving of XML structure errors
When making changes:
When debugging issues:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/fs25-vehicle-sorter-development-guide/raw