GetLabelText seems to be capping long label texts

I’ve discovered that GetLabelText seems to be capping long label texts.

Here’s an example:
In the game file update/update.rpf/x64/data/lang/american_rel.rpf/global.gxt2 there’s label 0x1261E5B9 which contains a text with a length of 1925 (this seems to be the longest English string, at least in that file):

The media circus that followed Leonora’s death […] Who knows how bright her future could have been if that pretty face hadn’t been severed from her perfect body…

Reading a long label like this (use GetLabelText('collision_7yvqzp3') to read this one) only returns the beginning of the label up to a length of around 1010 characters.

Shorter strings work fine.


Technical data:
FiveM client version: b2189
Server version (probably irrelevant in this case): 3874

I’ve attached a resource to easily replicate the issue:
longLabelBug.zip (1.9 KB)

This is what it outputs for me:

{
  labelKey: 'collision_7yvqzp3',
  expectedLength: 1925,
  actualLength: 1017,
  expectedText: `The media circus that followed Leonora's death portrayed her as a lascivious harlot who preyed on men and dressed in a way that was "asking to be killed", but this is neither consistent with the facts nor with the masturbatory image I like to keep of her.<br><br>Leonora Johnson was born on August 29th 1952 in the Midwest. Her father Harold worked as a plucker in the local chicken farm, her mother Eileen as a slopper at the local dairy farm, so it's safe to assume that her expectations for life were set fairly low � a sloppy plucker, or some other rural thing. A sickly child, she suffered chest problems for many years, mostly as a result of the heavy smoking so in vogue at the time. Leonora was a quiet, unremarkable student whom one of her teachers described as "the kind of early physical developer and late mental developer that got a lot of attention from older boys and certain faculty members".<br><br>At the encouragement of her uncle � or possibly to get away from him � Leonora left school at 15 and hitched her way to Los Santos with dreams of becoming a movie star or model. After working as a waitress for a few months, it didn't take long for Leonora's childlike naiveté and stunning good looks to catch the eye of wolfish entertainment industry types, and she soon became a common face on the Vinewood party circuit and the casting couch circuit.<br><br>By the early 1970s, she was getting regular work in print ads, television commercials and minor movie roles. After a scene-stealing turn as a wise-cracking disabled prostitute in the 1973 film 'Rum Runner', the Los Santos Shepherd described her as "a pretty face to watch without perhaps much spark in the eyes" and shortly before her death she was allegedly a frontrunner for a leading female role in 'The Many Wives of Alfredo Smith'. Who knows how bright her future could have been if that pretty face hadn't been severed from her perfect body...`,
  actualText: `The media circus that followed Leonora's death portrayed her as a lascivious harlot who preyed on men and dressed in a way that was "asking to be killed", but this is neither consistent with the facts nor with the masturbatory image I like to keep of her.<br><br>Leonora Johnson was born on August 29th 1952 in the Midwest. Her father Harold worked as a plucker in the local chicken farm, her mother Eileen as a slopper at the local dairy farm, so it's safe to assume that her expectations for life were set fairly low � a sloppy plucker, or some other rural thing. A sickly child, she suffered chest problems for many years, mostly as a result of the heavy smoking so in vogue at the time. Leonora was a quiet, unremarkable student whom one of her teachers described as "the kind of early physical developer and late mental developer that got a lot of attention from older boys and certain faculty members".<br><br>At the encouragement of her uncle � or possibly to get away from him � Leonora left school at 15 and `,
  bugged: true
}

Does this also replicate in, say, SHV for baseline GTA V?

I have no experience with ScriptHookV (had to google the abbreviation) nor do I have it set up.
Someone please test this.

This is how R* implemented the native. It copies (literal strncpy) any string retrieved from rage::g_TextDatabaseStore to a static buffer of size 1024 and returns that.

The actual name to _GET_LABEL_TEXT still hasn’t been discovered. I don’t think the names to any of the string/text related natives have been discovered, e.g., 0x34A396EE, 0x0183A66C, 0xFA6373BB, and 0x95C4B5AD.

That sounds like that can’t be resolved anytime soon then.

I mean I guess that’s ok, all these long texts are Singleplayer / GTA Online specific stuff and labels people would want to get the translation for would probably be way shorter anyways.

At least we can note this down as a known limitation until someone figures out how to load that stuff :slightly_smiling_face:

That’s might be a bit anachronistic and ignoring the CTextFile wrapper named TheText, which in V is still authoritative as it didn’t move to #ldb files or fwText yet.