Character Creator Heritage Update

Hello!

Today we discovered how to use the SetPedHeadBlendData native correctly with female heads.

In the heritage window shown below, parents on both genders are indexed from 0+(int) and up.
604383a4506bb92688af8b093a107c5b

We including many others thought that in the native SetPedHeadBlendData shapeFirstID and shapeSecondID had the same index span. But apparantly not and has never had. To get the right image from window to match the head model on the mothers side you have to add the amount of “fathers” onto the women’s head.

Here is an example from our internal code.

SetPedHeadBlendData(Player.Ped(), 21 + HeritageMomTrueIndex, HeritageDadTrueIndex, 0, 21 + HeritageMomTrueIndex, HeritageDadTrueIndex, 0, ScriptData.HeritageResemblenceSet, ScriptData.HeritageSkinToneSet, 0.0, false)

You can read more about names and id’s on All GTAO Face IDs + PED::SET_PED_HEAD_BLEND_DATA explained - Documentation - GTAForums.

:warning: You have to remember that if you are writing code in Lua table/array indexes start at 1, wherever c/c++/c# start at 0 (and most languages basically). So to get the “true” index you have to do - 1 on the value in Lua.

1 Like