Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
FS25 Vehicle Sorter is a Python desktop application that allows Farming Simulator 2025 players to reorder vehicles in their savegame. The app modifies the
vehicles.xml file in the savegame folder to change the TAB-cycling order of vehicles in the game.
The project follows the modern Python src/ layout:
src/fs25_vehicle_sorter/main.py - GUI application entry point using FreeSimpleGUI. Handles all UI events, vehicle selection, and movement operations. The main event loop processes user interactions and updates the vehicle list display.
src/fs25_vehicle_sorter/vehicle_xml.py (VehiclesXml class) - Core business logic for loading/saving savegames and manipulating vehicle order. This class:
vehicles.xml file from savegame foldersvehicles_list (list of Vehicle objects) representing the current ordermove_up() and move_down() methods to reposition vehicles in the list<vehicle> elements to match the vehicles_list ordervehicles.xmlsrc/fs25_vehicle_sorter/model.py (Vehicle class) - Simple data model representing a vehicle with properties:
unique_id - FS25's hash-based vehicle identifier (e.g., "vehicle18dfe4fe5acb6b8413a82c48a4ef62db")name - Extracted from filename, with mod name if applicableoperating_time - Converted to hourslicense_plates - Character string from licensePlates elementget_attached_vehicle_ids() - Returns list of uniqueIds for attached implementsFS25 significantly changed the vehicles.xml format from FS22:
Key differences:
uniqueId strings instead<attacherJoints>/<attachedImplement> instead of separate <attachments> sectionHow it works:
<vehicle> elements in XMLattachedVehicleUniqueId pointing to other vehicles' uniqueIdThis project uses uv for Python version and dependency management. PyInstaller is configured as a dev dependency.
uv sync
uv run python main.py
uv run pyinstaller --onefile --name "FS25 Vehicle Sorter" --windowed main.py
# Check for linting issues uv run ruff check . # Auto-fix linting issues uv run ruff check --fix . # Format code uv run ruff format . # Run both fix and format uv run ruff check --fix . && uv run ruff format .
Pre-commit hooks automatically run ruff before each commit:
# Install the hooks (one-time setup) uv run pre-commit install # Manually run hooks on all files uv run pre-commit run --all-files # Skip hooks for a specific commit (not recommended) git commit --no-verify
The app detects the platform and sets default savegame locations:
~\Documents\My Games\FarmingSimulator2025~/Library/Application Support/FarmingSimulator2025<vehicle> elements in the XML file. When saving, we reorder these elements to match the vehicles_list order (src/fs25_vehicle_sorter/vehicle_xml.py:50-53).uniqueId references via attachedVehicleUniqueId attribute. These remain valid when reordering since we don't modify the uniqueId values.from .model import Vehicle) within the src/fs25_vehicle_sorter directory.