Devs please expose Race in ThrallInfo or clear up how to extract race from a thrall for me please

I’m working on a mod to allow players to select which dance their thralls should play. The first part of this is adding racial dances as the default. I’m in the BP_ThrallEntertainerComponent and I have the ThrallInfo object but no clear way to extract the race component. However it looks like you’ve exposed isFemale which will be helpful.

So right now I’m using the SpawnTableId to grab the row from the SpawnDataTable. From there I can dump the RaceTemplate, but I don’t know what to do with that template. I don’t see any Kismet/Blueprint object that takes in a RaceTemplate or casts a RaceTemplate to something useable. All I want is to get the Race enum value out so I can use that handy switch on race you included with the kit.

Any help is appreciated!

Also, a modding section in the forums would be fantastic.

Ok I spoke too soon. Turns out I had to break the RaceTemplate struct to get the RaceTemplate. Then I used that as the key to hit the RaceTemplateDataTable and extract the RaceTemplateRow. With that row I could use the Break object to extract the RaceEnum value as an array. Finally, I selected the race I wanted by grabbing the item at the 0 index of that array.

That seems like an awful lot of work to grab the race from a thrall. The thing that struck me as odd, is that this isn’t something you do anywhere else in the code, but I guess I can’t recall a place in the game where knowing the race would be important aside from the template which has the visual elements and the display name.

Anyways, its less pressing now that I’ve solved it, but if you have time after the bugs, it would be nice if you promoted that info to the thrallData object.

This topic was automatically closed after 7 days. New replies are no longer allowed.