Jump to content

[General] - Skeleton Examine: Certain Causes of Death Decay After First Examine


rezecib

Recommended Posts

Bug Submission:

Category: General
Issue Title: Skeleton Examine: Certain Causes of Death Decay After First Examine
Issue Description:

Due to the line 25 of data/DLC0002/scripts/prefabs/skeleton.lua:

inst.cause = STRINGS.NAMES[string.upper(inst.cause)] or STRINGS.NAMES.SHENANIGANS

If you die from causes of death whose strings don't match their prefabs, the first time you examine the message will come out correctly, but the second time it's replaced with "shenanigans".

Example cases:

inst.cause is originally "red_cap". After the first examine, it becomes "Red Cap". The second examination makes it "Shenanigans" because STRINGS.NAMES["RED CAP"] is nil.

inst.cause is originally "monstermeat". After the first examine, it becomes "Monster Meat". The second examination makes it "Shenanigans" because STRINGS.NAMES["MONSTER MEAT"] is nil.

This could be fixed by changing that line (25) to:

local cause = STRINGS.NAMES[string.upper(inst.cause)] or STRINGS.NAMES.SHENANIGANS

and then updating line 33 to:

desc = string.gsub(desc, "XXXXX", cause, 1)

(replacing inst.cause with cause)

 

Steps to Reproduce:

c_give('red_cap',40) or c_give('monstermeat',40)

Eat the bad food and die.

c_spawn('amulet'), revive.

Examine the skeleton twice.

 

Edit: formatting, added line number and file

Good catch, thanks @rezecib!

 

The scenario that caused me to realize this was actually pretty funny. I like to leave my mod test servers open for a little variety, but after a bunch of people not reading the description and such, I set up a little puzzle at the entrance: a ring of basalt, surrounded by meat effigies, with a fridge full of red caps inside. They could kill themselves with the red caps and then pass the basalt and revive with the effigies, but I noticed that many of the skeletons were reading "shenanigans", but some still read "red cap".

  • Developer

The scenario that caused me to realize this was actually pretty funny. I like to leave my mod test servers open for a little variety, but after a bunch of people not reading the description and such, I set up a little puzzle at the entrance: a ring of basalt, surrounded by meat effigies, with a fridge full of red caps inside. They could kill themselves with the red caps and then pass the basalt and revive with the effigies, but I noticed that many of the skeletons were reading "shenanigans", but some still read "red cap".

 

Oh man, that's amazing! Psyched to hear that people are experimenting and finding other weird things to do in the game :D

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...