Ludeon Forums

Ludeon Forums

  • July 01, 2022, 04:43:07 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to translate damage done by body parts  (Read 1015 times)

lmgginspace

  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
How to translate damage done by body parts
« on: April 25, 2021, 10:05:03 AM »

Hi, I'm trying to translate these string that say the body part that was used to cause the injury to spanish, I'm attaching an image of an example.
It needs to say "zarpa de yorkshire terrier", instead of "yorkshire terrier zarpa".
Is there any way to do it? Thanks
Logged

nomius

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: How to translate damage done by body parts
« Reply #1 on: July 18, 2021, 07:42:04 AM »

Hi,

I have the same issue with the Romanian translation, and at least so do the French, Italian and Japanese ones.
It seems like it's not solvable as it's something hardcoded into the game. I've looked through the decompiled code and I suspect this is the problematic function (from Hediff_Injury.cs):
Code: [Select]
public override string LabelInBrackets
{
get
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(base.LabelInBrackets);
if (sourceHediffDef != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(sourceHediffDef.label);
}
else if (source != null)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(source.label);
if (sourceBodyPartGroup != null)
{
stringBuilder.Append(" ");
stringBuilder.Append(sourceBodyPartGroup.LabelShort);
}
}
HediffComp_GetsPermanent hediffComp_GetsPermanent = this.TryGetComp<HediffComp_GetsPermanent>();
if (hediffComp_GetsPermanent != null && hediffComp_GetsPermanent.IsPermanent && hediffComp_GetsPermanent.PainCategory != 0)
{
if (stringBuilder.Length != 0)
{
stringBuilder.Append(", ");
}
stringBuilder.Append(("PainCategory_" + hediffComp_GetsPermanent.PainCategory).Translate());
}
return stringBuilder.ToString();
}
}

The second if statement contains the hardcoded part. Code is from version 1.2.3005

Edit: I've created a bug report regarding this
« Last Edit: July 18, 2021, 08:23:32 AM by nomius »
Logged