fix(factions): use the real 'Goblin' prefab id, not the display name 'Fuling'

FactionHostilityPatch's NeraForestaMobs set and FactionMerchantCatalog's
Shops dictionary both keyed the base Goblin by its in-game display name,
"Fuling", instead of its actual prefab id. Confirmed against the game's own
asset paths (Assets/Characters/Goblin/, TrophyGoblin.prefab) rather than
assumption - "Fuling" appears nowhere as a real prefab, only as flavor text
(kept as-is on the shop's own DisplayName, which is just UI label text).

Neither peace nor merchant status ever actually applied to a plain Goblin
for any Black Forest race (Trenta, Trol, Furling) as a result - only the
GoblinBrute/GoblinShaman entries, which already used their real ids, worked.

Confirmed a related but separate bug while investigating, left alone per
request: AswidRace.cs's mobToTrophyMap also keys off "Fuling" and feeds it
into a live prefab lookup for food nutrition tuning - same wrong-id pattern,
milder failure mode (falls back to generic values rather than breaking
anything). Not fixed here.
This commit is contained in:
kanym 2026-08-07 11:32:13 +02:00
commit 9287bd060d
4 changed files with 7 additions and 6 deletions

View file

@ -20,7 +20,7 @@ namespace RacesOfValheim
private static readonly HashSet<string> NeraForestaMobs = new HashSet<string>
{
"Greydwarf", "Greydwarf_Elite", "Greydwarf_Shaman",
"Fuling", "GoblinBrute", "GoblinShaman",
"Goblin", "GoblinBrute", "GoblinShaman", // "Goblin" is the real prefab id - "Fuling" is only the in-game display name
"Troll",
};

View file

@ -72,7 +72,7 @@ namespace RacesOfValheim
new CatalogEntry("DeerHide", 2),
new CatalogEntry("DeerMeat", 2),
new CatalogEntry("LeatherScraps", 5),
new CatalogEntry("BoarMeat", 5),
new CatalogEntry("RawMeat", 5), // was "BoarMeat" - not a real prefab id, never appeared
new CatalogEntry("NeckTail", 5),
new CatalogEntry("TrophyNeck", 20),
new CatalogEntry("TrophyDeer", 20),
@ -94,7 +94,7 @@ namespace RacesOfValheim
new CatalogEntry("LoxPelt", 2),
new CatalogEntry("Flax", 5),
new CatalogEntry("Barley", 5),
new CatalogEntry("Cloudberries", 5),
new CatalogEntry("Cloudberry", 5), // was "Cloudberries" - not a real prefab id, never appeared
new CatalogEntry("Tar", 5), // Growth, folded in here: Growth lives in Plains, same biome as Lox/Ocean
new CatalogEntry("Tuna", 50),
new CatalogEntry("CoralCod", 70),
@ -240,7 +240,7 @@ namespace RacesOfValheim
{ "Troll", TrollShop },
{ "Fuling", FulingShop },
{ "Goblin", FulingShop }, // "Goblin" is the real prefab id - "Fuling" is only the in-game display name
{ "GoblinBrute", FulingShop },
{ "GoblinShaman", FulingShop },

View file

@ -62,8 +62,8 @@ namespace RacesOfValheim
if (otherChar != null)
{
string name = otherChar.gameObject.name.Replace("(Clone)", "").ToLower();
if (name == "goblin" ||
name == "goblinbrute" ||
if (name == "goblin" ||
name == "goblinbrute" ||
name == "goblinshaman" ||
name == "lox" ||
name == "deathsquito" ||