How To Add a New Custom Horse

How to add custom horses into RedM

Step 1 - MetaPed Base Definition

We work with default resource folder, where you have to update fxmanifest.lua like this:

--fxmanifest.lua

fx_version "cerulean"
game "rdr3"

rdr3_warning "I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships."

file 'metapeds.ymt' # <--- Add this
data_file 'PED_METADATA_FILE' 'metapeds.ymt' # <--- And this

Then create new file metapeds.ymt in the same folder with fxmanifest.lua and paste there next content. Our new horse name is A_C_Horse_AmericanPaint_Overo_02:

metapeds.ymt
<CPedModelInfo__InitDataList>
  <InitDatas itemType="CPedModelInfo__InitData">
  <Item>
   <Name>A_C_Horse_AmericanPaint_Overo_02</Name>
   <LocoArchetypes>
    <Item>qbrbnwza_0x84adaa9b</Item>
    <Item>gqwazacc_0xf120e07b</Item>
   </LocoArchetypes>
   <FragName>META_Base_Horse_01</FragName>
   <ClipDictionaryName>kaijyfca_0x7c3d01e8</ClipDictionaryName>
   <BlendShapeFileName>null</BlendShapeFileName>
   <ExpressionSetName>ngjxywoa_0xa793a6fe</ExpressionSetName>
   <Pedtype>animal</Pedtype>
   <MovementClipSet>batxynoa_0x0a436673</MovementClipSet>
   <fdhdosga_0xd282b498>default</fdhdosga_0xd282b498>
   <FullBodyDamageClipSet>cduofona_0xfdc5862e</FullBodyDamageClipSet>
   <AdditiveDamageClipSet>jezrqhaa_0xf4e562e1</AdditiveDamageClipSet>
   <ajulutca_0xf656e7cc>lemajjfa_0xeea838e6</ajulutca_0xf656e7cc>
   <mosasnka_0x33ee71a3>amb_creature_mammal@world_horse_injured_on_ground@death</mosasnka_0x33ee71a3>
   <puyzvqga_0x7b02f627>clip_set_id_invalid</puyzvqga_0x7b02f627>
   <GestureSettingsName>horse</GestureSettingsName>
   <FacialClipsetGroupName>agocgfca_0xb6f66776</FacialClipsetGroupName>
   <DefaultVisemeClipSet>anim_group_visemes_m_lo</DefaultVisemeClipSet>
   <SidestepClipSet>wgqmmaga_0xbcb78f61</SidestepClipSet>
   <PoseMatcherName>Horse</PoseMatcherName>
   <GetupSetHash>nmbs_horse_getups</GetupSetHash>
   <ScenarioCapabilities />
   <CreatureMetadataName>yzvjmeea_0xe6bf2427</CreatureMetadataName>
   <qcrlzvka_0x3207fdf6>default</qcrlzvka_0x3207fdf6>
   <DecisionMakerName>puyaaala_0xc87f6a22</DecisionMakerName>
   <kwpxjyqa_0xc4e3a8e3>horse</kwpxjyqa_0xc4e3a8e3>
   <MotionTaskDataSetName>horse</MotionTaskDataSetName>
   <DefaultTaskDataSetName>animal</DefaultTaskDataSetName>
   <PedCapsuleName>horse</PedCapsuleName>
   <PedLayoutName>xclvljma_0x692611fa</PedLayoutName>
   <PedComponentSetName>horse</PedComponentSetName>
   <PedIKSettingsName>ggoxhlsa_0x32681820</PedIKSettingsName>
   <TaskDataName>horse</TaskDataName>
   <ClimbParamsName>horse</ClimbParamsName>
   <nuubccla_0x0ce51a59>standard_ped</nuubccla_0x0ce51a59>
   <AmbulanceShouldRespondTo value="False" />
   <CanRideBikeWithNoHelmet value="False" />
   <CanSpawnInCar value="True" />
   <bOnlyBulkyItemVariations value="False" />
   <RelationshipGroup>htclfqla_0x9ba3f8c6</RelationshipGroup>
   <NavCapabilitiesName>horse</NavCapabilitiesName>
   <SpeedDataName>default</SpeedDataName>
   <PerceptionInfo>nreyahqa_0x1cae576e</PerceptionInfo>
   <DefaultBrawlingStyle>uzkwanca_0xf6b775f3</DefaultBrawlingStyle>
   <DefaultUnarmedWeapon>weapon_horse</DefaultUnarmedWeapon>
   <DefaultMeleeProgram>xvkhspsa_0x4fc75164</DefaultMeleeProgram>
   <DefaultCombatDirector>lfjindga_0x7507fc63</DefaultCombatDirector>
   <StatName>uyspfrka_0xf6db2e94</StatName>
   <SpeciesName>kfvniicb_0xb905d604</SpeciesName>
   <DiscoverableName>qfhktqda_0x8427080c</DiscoverableName>
   <UndiscoveredName>eafibcfa_0x4cfe1ff3</UndiscoveredName>
   <vhzqgnba_0x9e63e6ed>ruhuymea_0x4a59c18f</vhzqgnba_0x9e63e6ed>
   <ScavengerLayout>horse</ScavengerLayout>
   <Personality>drcvzhaa_0x39cd1b26</Personality>
   <AmbientResponseProfile>standard_ped</AmbientResponseProfile>
   <DefaultWeaponLoadout>loadout_horse</DefaultWeaponLoadout>
   <koorpvda_0x936a1503 />
   <WeaponAnimationsGroup />
   <HealthConfigHash>traswcna_0x7e2af3c5</HealthConfigHash>
   <elhtqona_0x895861da>kbwqduqb_0x3d018c4a</elhtqona_0x895861da>
   <xhvibkra_0xb2fe2edf />
   <CombatInfo>qydrxgba_0xb44afaae</CombatInfo>
   <qpnkkvea_0x3cf2af47>horse</qpnkkvea_0x3cf2af47>
   <VfxInfoName>eoqpwika_0x1789a1fe</VfxInfoName>
   <AmbientClipsForFlee />
   <GenericSkinningSize>XLarge</GenericSkinningSize>
   <usjpufaa_0x43d57fd3 value="False" />
   <Drivers />
   <QualityProbability />
   <Radio1>RADIO_GENRE_OFF</Radio1>
   <Radio2>RADIO_GENRE_OFF</Radio2>
   <MinActivationImpulse value="110" />
   <Stubble value="0" />
   <kcdwdkxa_0x0ab020bb value="0" />
   <FurEffect value="0" />
   <HDDist value="10" />
   <dnqiqydc_0xc5691df9 value="-1" />
   <gkuzagra_0xc6af94a8 value="0" />
   <ntqafoba_0x5b0be8dc value="False" />
   <PedSize>PS_EXTRA_LARGE</PedSize>
   <Scale value="1" />
   <CutsceneScale value="1" />
   <ScaleRandomOffset value="0" />
   <KilledPerceptionRangeModifer value="-1" />
   <Sexiness />
   <tiqffsfa_0x7f0093da />
   <AgeGroup>AGE_ADULT</AgeGroup>
   <mmgrbpma_0x6899d915>ibcedirb_0x22d02028</mmgrbpma_0x6899d915>
   <MaxPassengersInCar value="0" />
   <ExternallyDrivenDOFs>BREATHING</ExternallyDrivenDOFs>
   <PedVoiceGroup>szzfriaa_0x087d1fc0</PedVoiceGroup>
   <AnimalAudioObject>animal_params_horse</AnimalAudioObject>
   <ninvcmlb_0x8c9ccceb />
   <ncuqpzia_0x7c337da0>zcizpmqa_0xa54bbb71</ncuqpzia_0x7c337da0>
   <BreathingSettingsName>horse</BreathingSettingsName>
   <AbilityType>SAT_NONE</AbilityType>
   <SecondaryAbilityType>SAT_NONE</SecondaryAbilityType>
   <SuperlodType>ucgznnla_0xa26058ae</SuperlodType>
   <ScenarioPopStreamingSlot>SCENARIO_POP_STREAMING_NORMAL</ScenarioPopStreamingSlot>
   <DefaultSpawningPreference>DSP_NORMAL</DefaultSpawningPreference>
   <SpawnRange>SR_Default</SpawnRange>
   <TrackPed value="True" />
   <TrackerPathWidth value="1" />
   <lodDistances>25 50 100</lodDistances>
   <zutiasba_0xf45d226f value="1" />
   <AttributeSet>mblcifca_0x7ba0c856</AttributeSet>
   <chskwqha_0xc6d90bc4 />
   <zrxuobaa_0x120c7ac8 value="0" />
   <scorgaqa_0x187e18e5 value="50" />
   <pbwlkcaa_0x15fd61aa value="50" />
   <vslhbdca_0x2fc486f7 value="1" />
   <xsmxfeaa_0xcffe931e value="False" />
   <wdzndzba_0xa5229965 value="False" />
  </Item>
  </InitDatas>
</CPedModelInfo__InitDataList>

Step 2 - MetaPed Outfit Preset

Create stream folder inside your resource and paste there next file.

a_c_horse_americanpaint_overo_02.ymt

a_c_horse_americanpaint_overo_02.ymt (33.3 KB)

File should be named same as your horse name, in our case it’s a_c_horse_americanpaint_overo_02.ymt

At this step you can start the resource and spawn horse by hash a_c_horse_americanpaint_overo_02.

Step 3 (Optional) - Modify Textures (Albedo)

If we wont to change the horse as we like we can set a different albedo for horse parts like head, body, hairs etc. To achieve that modify a_c_horse_americanpaint_overo_02.ymt file. For example:

I’ve changed <albedo> tag values for head and body (line 49 and line 60):

  • p_c_horse_01_head_000_c0_895_ab → mp_horse_01_head_000_c0_835_ab
  • p_c_horse_01_hand_000_c0_895_ab → mp_horse_01_hand_000_c0_835_ab

Note

You can find all possible values by researching in-game file assets_albedo.ymt with the help of CodeX.

As the result we have horse with different textures:

Step 4 (Optional) - Modify Horse Colour (Tint)

You also can modify texture colours (horse he tint) inside a_c_horse_americanpaint_overo_02.ymt (lines 53-55):

I’ve used yellow colour (70) for horse head.

I also set colour for horse body (lines 64-66):

As the result we have:

image

How to find other colour numbers

You can fine other colour numbers by opening palette file (f.e. in GIMP) horse_color_palette.xcf (48.6 KB) (source: Horse Color Palette at Red Dead Redemption 2 Nexus - Mods and community)

Summary

We’ve added a new horse with name A_C_Horse_AmericanPaint_Overo_02. We also tried different horse texture and colour. You can download final resource from here.

References

Ped Modification and MetaData Overview - Outfits, Assets, Expressions, Shop Items, Overlays, etc.

Afterword

There are couple known issues/bugs which remains unsolved (:

Maybe there are more issues than that - if so please report it in this topic or if you know how to solve these issues share with us.

5 Likes

amazing stuff!

I would highly recommend using SetMetaPedTag. You can set any assets and pallette/tint values. None of the outlined issues will occur going that route and it allows you to have changes in real time without having to create presets in metadata files streamed.

2 Likes

Yes, the SetMetaPedTag method you mentioned is still the only one that doesn’t have any problems so far.

I attach a sample script:

-- client.lua

function GetLastMount(ped)
    return Citizen.InvokeNative(0x4C8B59171957BCF7, ped)
end

function SetMetaPedTag(ped, drawable, albedo, normal, material, palette, tint0, tint1, tint2)
    Citizen.InvokeNative(0xBC6DF00D7A4A6819, ped, drawable, albedo, normal, material, palette, tint0, tint1, tint2)
end

function IsPedReadyToRender(ped)
    return Citizen.InvokeNative(0xA0BC8FAED8CFEB3C, ped)
end

function UpdatePedVariation(ped)
    Citizen.InvokeNative(0xAAB86462966168CE, ped, true)
    Citizen.InvokeNative(0xCC8CA3E88256E58F, ped, false, true, true, true, false)
end

function GetMetaPedAssetGuids(ped, index)
    return Citizen.InvokeNative(0xA9C28516A6DC9D56, ped, index)
end

function SetPedAsSaddleHorseForPlayer(player, mount)
    Citizen.InvokeNative(0xD2CB0FB0FDCB473D, player, mount)
end

function BlipAddForEntity(blipHash, entity)
    return Citizen.InvokeNative(0x23F74C2FDA6E7C61, blipHash, entity)
end

RegisterCommand('yellowhorse', function(source, args)
    local model = `a_c_horse_americanpaint_overo`
    
    RequestModel(model)
    while not HasModelLoaded(model) do
        Wait(0)
    end

    local coords = GetEntityCoords(PlayerPedId())
    local currentMount = CreatePed(model, coords.x, coords.y, coords.z, 0, true, true, true, true)
    SetModelAsNoLongerNeeded(model)
    SetPedOutfitPreset(currentMount, 0, 0)
    SetPedAsSaddleHorseForPlayer(PlayerId(), currentMount)
    SetPedConfigFlag(currentMount, 297, true) -- Enable leading
    SetPedConfigFlag(currentMount, 312, true) -- Won't flee when shooting
    SetPedConfigFlag(currentMount, 442, true) -- Remove Flee prompt
    BlipAddForEntity(-1230993421, currentMount)

    while not IsPedReadyToRender(currentMount) do
        Wait(0)
    end

    -- head
    local tint0, tint1, tint2 = 70, 70, 70
    local drawable = `p_c_horse_01_head_000`
    local albedo = `p_c_horse_01_head_000_c0_895_ab`
    local normal = `p_c_horse_01_head_000_c0_000_nm`
    local material = `p_c_horse_01_head_000_c0_000_m`
    local palette = `metaped_tint_horse`
    SetMetaPedTag(currentMount, drawable, albedo, normal, material, palette, tint0, tint1, tint2)
    UpdatePedVariation(currentMount)

    -- body
    local tint0, tint1, tint2 = 70, 70, 70
    local drawable = `p_c_horse_01_hand_000`
    local albedo = `mp_horse_01_hand_000_c0_835_ab`
    local normal = `p_c_horse_01_hand_000_c0_000_nm`
    local material = `p_c_horse_01_hand_000_c0_000_m`
    local palette = `metaped_tint_horse`
    SetMetaPedTag(currentMount, drawable, albedo, normal, material, palette, tint0, tint1, tint2)
    UpdatePedVariation(currentMount)
end)

Type command /yellowhorse. Script creates a_c_horse_americanpaint_overo with yellow head and body colours.

image

However, as you can see that it does not create a new horse hash with pre-defined albedo and tint values. Instead, you have to work with an existing horse hash and write a script for that purpose to change the albedo/tint in runtime. Hopefully, in the future, we will be able to add new horse hashes with presets without any problems.

Police Horse when?!

bro can I get this? my friends seem love it.

There should be a config for each *.ymt. If i change the colour of the normal Overo it works fine. No bad lags and no invisible reins

@draobrehtom where do you got the data from A_C_Horse_AmericanPaint_Overo?

metadata.ymt

a_c_horse_americanpaint_overo.ymt

@draobrehtom so that isn’t a file on Server?
Is it a local File on Client in the Main Game?

Yes, I got the data from the in-game files.

Can you provide the whole part from Overo?
Till this part:
<zrxuobaa_0x120c7ac8 value=“0” />
<scorgaqa_0x187e18e5 value=“50” />
<pbwlkcaa_0x15fd61aa value=“50” />
<vslhbdca_0x2fc486f7 value=“1” />
<xsmxfeaa_0xcffe931e value=“False” />
<wdzndzba_0xa5229965 value=“False” />

That would be awesom

No. You can do it on your own with the help of CodeX. More details how to get it on CodeWalker discord.

After you have CodeX, you’ll need to editCodeX.Settings.ini by setting the following (more details about why you should do this is here):

Hashing.Jenkins.LowerCaseCollisions True

This is great, but where is assets_albedo.ymt located, you’re saying ingame, but where/how exactly? Cause I’m way too confused. Or do I need to get that info with CodeX?

You can find assets_albedo.ymt with the help of CodeX. For example:

Any luck on fixing the reins or legs yet?