[Scientist Names] Unknown ShortPrefabName: npc_underwaterdweller
Unknown ShortPrefabName: npc_underwaterdweller
Hello all outhere,
2 Questions.
is 500 the limit of names thid plugin can hold ?
2nd, got this in my console.
[Scientist Names] Unknown ShortPrefabName: npc_underwaterdweller
is this normal or bad ?
Thx for help
I've seen a few threads about the error mentioned in the title. Here's an easy way to fix that issue.
In ScientistNames.cs, find this chunk of code (currently on line 160):
string GetAbbrevation(BasePlayer basePlayer)
{
if (!configData.UseTitle) return string.Empty;
else if (basePlayer.ShortPrefabName.Contains("bandit")) return configData.BanditTitle;
else if (basePlayer.ShortPrefabName.Contains("scientist")) return configData.ScientistTitle;
else if (basePlayer.ShortPrefabName.Contains("tunneldweller")) return configData.TunnelDwellerTitle;
else if (basePlayer.ShortPrefabName.Contains("murderer")) return configData.MurdererTitle;
else if (basePlayer.ShortPrefabName.Contains("scarecrow")) return configData.ScarecrowTitle;
else
{
Log($"Unknown ShortPrefabName: {basePlayer.ShortPrefabName}", console: true, logType: LogType.WARNING);
return string.Empty;
}
}
Update this chunk of `else if` statements to look like this (note the two lines I've added before the final `else` satement:
string GetAbbrevation(BasePlayer basePlayer)
{
if (!configData.UseTitle) return string.Empty;
else if (basePlayer.ShortPrefabName.Contains("bandit")) return configData.BanditTitle;
else if (basePlayer.ShortPrefabName.Contains("scientist")) return configData.ScientistTitle;
else if (basePlayer.ShortPrefabName.Contains("tunneldweller")) return configData.TunnelDwellerTitle;
else if (basePlayer.ShortPrefabName.Contains("murderer")) return configData.MurdererTitle;
else if (basePlayer.ShortPrefabName.Contains("scarecrow")) return configData.ScarecrowTitle;
// HACK: also rename Underwater Labs NPCs
else if (basePlayer.ShortPrefabName.Contains("underwaterdweller")) return configData.TunnelDwellerTitle;
else
{
Log($"Unknown ShortPrefabName: {basePlayer.ShortPrefabName}", console: true, logType: LogType.WARNING);
return string.Empty;
}
}
This should fix the issue! The plugin will now use the same settings for Underwater Labs NPCs as it does for Tunnel Dweller NPCs.
RalphORama
I've seen a few threads about the error mentioned in the title. Here's an easy way to fix that issue.
In ScientistNames.cs, find this chunk of code (currently on line 160):string GetAbbrevation(BasePlayer basePlayer) { if (!configData.UseTitle) return string.Empty; else if (basePlayer.ShortPrefabName.Contains("bandit")) return configData.BanditTitle; else if (basePlayer.ShortPrefabName.Contains("scientist")) return configData.ScientistTitle; else if (basePlayer.ShortPrefabName.Contains("tunneldweller")) return configData.TunnelDwellerTitle; else if (basePlayer.ShortPrefabName.Contains("murderer")) return configData.MurdererTitle; else if (basePlayer.ShortPrefabName.Contains("scarecrow")) return configData.ScarecrowTitle; else { Log($"Unknown ShortPrefabName: {basePlayer.ShortPrefabName}", console: true, logType: LogType.WARNING); return string.Empty; } }Update this chunk of `else if` statements to look like this (note the two lines I've added before the final `else` satement:
string GetAbbrevation(BasePlayer basePlayer) { if (!configData.UseTitle) return string.Empty; else if (basePlayer.ShortPrefabName.Contains("bandit")) return configData.BanditTitle; else if (basePlayer.ShortPrefabName.Contains("scientist")) return configData.ScientistTitle; else if (basePlayer.ShortPrefabName.Contains("tunneldweller")) return configData.TunnelDwellerTitle; else if (basePlayer.ShortPrefabName.Contains("murderer")) return configData.MurdererTitle; else if (basePlayer.ShortPrefabName.Contains("scarecrow")) return configData.ScarecrowTitle; // HACK: also rename Underwater Labs NPCs else if (basePlayer.ShortPrefabName.Contains("underwaterdweller")) return configData.TunnelDwellerTitle; else { Log($"Unknown ShortPrefabName: {basePlayer.ShortPrefabName}", console: true, logType: LogType.WARNING); return string.Empty; } }This should fix the issue! The plugin will now use the same settings for Underwater Labs NPCs as it does for Tunnel Dweller NPCs.
Thx, will try it later.