Published: December 12, 2019
223
5.2k
17.6k

We released patch 1.2 of #TheOuterWorlds today, and it includes a fix for the dreaded "the game thinks my companions are dead" bug, which I believe I spent more time investigating than I have for any other individual bug in my career (1/18)

The gist of the bug was that, for some players, a companion quest would be marked as Failed in the quest log, with the reasoning that the companion was dead -- despite the fact that the companion was very much alive and well (2/18)

This was perplexing because (outside of SuperNova mode) companions *can't* die (3/18)

There were one or two cases before launch where this issue seemed to happen, but no one in QA ever managed to reproduce it and despite our best efforts we couldn't learn anything concrete about it (4/18)

One reason it was so hard to pin down is that it was impossible to tell when the bug actually happened -- all of the cases we had were essentially "hey something bad happened in the last ten hours and now my quest is broken" (5/18)

Investigating it involved figuring out the location of every script and line of code that could possibly make the game think that a companion was dead (6/18)

The only logical culprit was a bit of scripting that runs when a companion's health reaches zero: if they're in the party, it waits for combat to end and revives them; otherwise it marks them as dead "for real" (7/18)

The only place in the game when a companion is present but *not* in the active party is when the player is on their ship The problem is, when companions are on the ship, they are undamageable (8/18)

Eventually we figured out that "undamageable" does not mean "invulnerable" -- they can't take damage from attacks but can still get hurt from other things One of those things: falling a great distance (9/18)

The problem with *that* is that there are no spots in the player's ship that are high enough to result in a lethal fall So now we had to figure out how companions were mysteriously ending up way above the level (10/18)

I looked into tons of theories, including "maybe their height data is preserved when fast travelling from other maps" and "maybe a physics interaction between two companions causes one to rapidly accelerate upwards" (11/18)

My personal fav was "what if a companion is standing *right* where a cow spawns in during a random event and they're launched into space" Was genuinely bummed when that theory didn't pan out (12/18)

By this time, the game had come out, and all hopes of this being a weird fluke only a couple devs would ever see were dashed, as players all over the place started reporting their companion quests failing (13/18)

Eventually, an offhand comment in one user's review mentioned seeing a weird bug where a companion was "climbing nothing", and this comment led me to figuring the whole thing out (14/18)

On the dev side of things, the system for NPCs interacting with the environment is called "furniture" Sometimes this is literal furniture, like sitting in a chair, but it covers everything from using a terminal to leaning on a wall (15/18)

Somewhere deep in the complex beast that is the furniture system, we had code that disabled all NPCs from starting new furniture interactions if the player was in a conversation (16/18)

The problem was that using a ladder is considered *two* different furniture interactions: one for getting on the ladder and starting to climb, and one to stop climbing and get off (17/18)

So, if someone started climbing a ladder and the player entered a conversation before they stopped, they wouldn't be able to exit the ladder, and, well…. (18/18)

@_taylorswope @keightdee I clearly have but the most rudimentary understanding of coding so I ask this in all honesty just to learn because I’m curious: Why would making them completely invulnerable (instead of undamageable) not patch the problem easier than figuring out what was killing them?

@KendySharles @keightdee that was our fallback, but -without actually knowing the cause, we couldn’t be sure that’d fix it -whatever the cause of the problem is might be causing OTHER problems, so we should find it -games near ship are fragile and it’s best to not make changes you don’t 100% understand

@_taylorswope So they are in fact alive? Thanks for all the hard work you guys do.

@Rustolla76 that’s a question for the philosophers (but yeah, they can still be added to the party and this patch should restore the proper quests when you load it up)

@_taylorswope great bug hunting story, thanks for writing it up!

@_taylorswope this is just about the best shit ever. thanks for sharing

@_taylorswope This is the kind of bug you never forget. Years from now you’ll be working on a totally different game and you’ll overhear somebody mention “furniture” and you’ll walk over to be like “hey guys, are we going to be putting ladders in this game?”

@_taylorswope Have had a few of these in my time as well - by the time the symptom pops up the cause is already long gone. Glad you figured it out!

@_taylorswope this is so cool, thanks for the insight!

@_taylorswope That read like a breathless thriller novel - I really enjoyed that 🙂 I can only imagine your reaction the moment you figured it out.

@_taylorswope You’ll ship some new game and immediately after it goes out your stomach will sink, and you’ll shout across the office “did anybody try starting a conversation while a party member is climbing a ladder?!”

@_taylorswope Great details provided!

@_taylorswope Thank you for explaining bugs. I love seeing bug reports where we can all just laugh at how weird and complex game coding is and that wacky things can come out it.

@_taylorswope As someone in QA I thoroughly enjoyed this trip! congrats on finding and fixing the issue!!

@_taylorswope My favorite part of this thread, besides the "how we found the bug" bit at the end, is the really fancy way you said "maybe two ran into each other and one of them went flying"

@_taylorswope @keightdee I have tried to narrow down bugs like this and they are equal parts crazy fun and extremely frustrating. It's a miracle games ship at all! Excellent sleuthing! :D 💜🖤💜

@_taylorswope Or a ladder is chaos!

@_taylorswope Thanks for the deep dive on this bug. Really awesome to understand the amount of efffort involved in resolving bugs like this.

Share this thread

Read on Twitter

View original thread

Navigate thread

1/36