Skip to main content
A comprehensive script for managing wild horses in RedM, allowing server owners to control which horse breeds spawn in specific regions and customize wild horse behavior.
This script provides advanced control over wild horse spawning, including breed-specific management, regional spawning, and automatic horse replacement systems.

Features

Horse Spawn Management

Control which horse breeds spawn in different regions of the map with district-based configuration.

Horse Blacklisting

Prevent specific horse models from spawning as wild horses to maintain server balance.

Horse Replacement

Automatically replace specific horse models with others when they spawn.

Framework Support

Compatible with VORP Core and RSG Core by default, with custom framework support available.

Debug Tools

Includes debugging commands to help troubleshoot spawning issues and monitor performance.

Performance Optimized

Efficient handling of horse spawning to minimize server impact and maintain smooth gameplay.

Installation

1

Download

Get the latest release from our Tebex Store and download it from your Keymaster
2

Extract

Extract the spooni_wildHorseManager folder to your server’s resources directory
3

Configure

Add ensure spooni_wildHorseManager to your server.cfg
4

Customize

Configure the config.lua file to your preferences (see Configuration section below)

Configuration

The script is highly configurable through the config.lua file. Here are the main configuration options:

Blacklisting Horses

Prevent specific horse models from spawning as wild horses:
-- Prevent specific horse models from spawning as wild horses
Config.blackListHorses = {
    "a_c_horse_morgan_bayroan",
    "a_c_horse_arabian_white",
    -- Add more horse models as needed
}

Replacing Horse Models

Automatically replace specific horse models with others when they spawn:
-- Replace specific horse models with others when they spawn
Config.replaceHorse = {
    ['a_c_horse_tennesseewalker_blackrabicano'] = 'a_c_horse_mustang_grullodun',
    ['a_c_horse_arabian_white'] = 'a_c_horse_morgan_bayroan',
    -- Add more replacements as needed
}

Defining Horse Groups

Group horses by breed for easier management:
-- Group horses by breed for easier management
Config.horseGroups = {
    mustang = {
        'a_c_horse_mustang_goldendun',
        'a_c_horse_mustang_grullodun',
        'a_c_horse_mustang_silverbay',
        -- Add more horses to the group
    },
    thoroughbred = {
        'a_c_horse_thoroughbred_silverbay',
        'a_c_horse_thoroughbred_bloodbay',
        -- Add more horses to the group
    },
    -- Add more groups as needed
}

Configuring Spawn Districts

Define which horse groups spawn in which regions:
-- Define which horse groups spawn in which regions
Config.Districts = {
    ['Great Plains'] = {
        groups = {'mustang', 'thoroughbred'},
        -- Additional district-specific settings can be added here
    },
    ['Heartlands'] = {
        groups = {'thoroughbred', 'morgan'},
        -- Additional district-specific settings
    },
    -- Add more districts as needed
}
District names should match the actual region names in your RedM server. You can use the debug commands to help identify the correct district names.

Debugging

Enable debug mode in the config to access debugging features:
Config.debug = true

Available Debug Commands

Shows information about ped slots that might be blocking horse spawns. This is useful for troubleshooting when horses aren’t spawning in expected locations.
Toggles display of scenario points for horse spawning. This visual debug tool helps you see where horses are configured to spawn and verify your district configurations.
Debug mode should only be enabled when troubleshooting. Disable it in production to maintain optimal performance.

Framework Integration

The script includes built-in support for multiple frameworks:

Performance Considerations

The script is optimized for performance, but here are some tips to ensure smooth operation:
  • Limit Horse Groups: Don’t create too many horse groups as this can impact spawn calculations
  • Reasonable Blacklists: Keep blacklists focused on problematic horses rather than excluding large numbers
  • District Optimization: Configure districts based on actual player activity areas
  • Debug Mode: Remember to disable debug mode in production

Troubleshooting

  • District name: Check if the district name matches exactly (case-sensitive)
  • Horse models: Verify horse model names are correct
  • Spawn points: Use /findHorse debug command to see spawn points
  • Blacklist: Check if horses are blacklisted
  • Debug mode: Disable debug mode in production
  • Horse groups: Reduce the number of horse groups
  • Group size: Limit the number of horses per group
  • Error logs: Check server console for error messages
  • Framework detection: Ensure your framework is properly detected
  • Custom setup: Check frameworkBridge.lua for custom framework setup
  • Event verification: Verify framework events are working correctly

Support

If you encounter issues or need assistance:
I