[SOLVED] PlayerRace_GetString

Where does this function get its strings from?


I need to know what is contained in them.

I am looking at data:scripts/scar/restrict.lua specifically.

Probably from the new prop file in the new race folder.

Okay, thanks.

And to add more information :

This line

PlayerRace_GetString(Universe_CurrentPlayer(), “cfg_music”, “”)

Will go check in the folder race of the player race Universe_CurrentPlayer(), and in this case, check String_Properties tab and found cfg_music.

I used PlayerRace_GetString on

local path = PlayerRace_GetString(…)
And i save the path to this file for this player.

In the same way, :


But this is for Number_Properties tab :wink:

[Check this post : Campaign - Log Error Race ]

And don’t forget : Don’t add String on Number tab, and don’t add Number (or just add “0”) in String tab. :smiley:

1 Like

Oops I was one folder level too deep.

scripts > races > racename.lua

I believe that’s the file where it gets the info from.

1 Like

UGH! For far too long I have been getting notifications for every single topic in the Mods and Modding category… “PlayerRace_GetString”, “Restricting access to ship class after research”, and other key phrases such as “Windows 10” and “Collision Avoidance”… all things that I have NO KNOWLEDGE of and frankly hurt my poor little brain just reading them. No hard feelings of course to anyone asking these important questions. I just can’t help pining for the simpler days when I would only get notifications on topics I had posted in, or even opened.

Coincidentally I apologize that I am of no help with basically any questions related to the actual process of modding.

1 Like

How do I retrieve the string with the player’s race’s name? E.g. “hiigaran” (lower case).

The “Player_GetRace” function no longer seems useful.

I’ve tried this, but it hasn’t worked:

local sRace = strlower(PlayerRace_GetString(playerIndex, "Symbolic_Name", ""))


Never mind. Pascal linked to the answer:

I know it has been a year since you said this, but did you know you can control those preferences in your profile?

1 Like

I learned something to that effect, yes. I thought there were some odd shenanigans going on at the time of the post, but heck, it was probably all me.