Fallout 2 vehicle bug

Discussion in 'Fallout General Modding' started by Lexx, Aug 4, 2019.

  1. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Making a new thread, because it's not related to any specific mod.

    Anyone ever noticed that if you ...

    1. Use the car
    2. Enter a location entry point via the Town/World button (this is important)
    3. Exit the map (to the worldmap) without car ...

    ... You now spawn with the car on the worldmap?
    If you now get into an encounter, the car might / might not get deleted as well.

    This only happens if you use the Town/World buttons. If you enter a location via clicking the green triangle, everything will be fine.

    Never noticed this ever before, but then again I'm pretty much never using the Town/World button.
    • [Rad] [Rad] x 2
  2. gustarballs1983

    gustarballs1983 Where'd That 6th Toe Come From?

    Oct 28, 2009
    I confirm this.. something similar happened to me while Playing Fo:Nevada (Standard version) I went back to 'The Pond' *without* the car since i was low on car fuel back then, and when i entered the car was with me. Since I was low on fuel I left the car in 'The Pond' and lost the car for good this way. The car vanished from both 'The Pond' and from the earlier location where i left it in the first place, Had to revert to an earlier save.
  3. Darek

    Darek is currently unavailable

    Jan 7, 2008
    Weird, I've never seen this, but then I don't use town/world button button either.
    It looks like entering that way gets treated the same as a random encounter (and probably forced encounter too).
    If you save the game and look at save.dat in a hex editor, you will find that 0x23 in Function 19 gets set to 01. On the Save.dat wiki page it would be in the unknown section just before "Number of the map the car is on."(Should be area number from city.txt the car is at).
    I believe that means that you came with the car and that you will therefore automatically leave with the car. Basically a safeguard against losing the car out in the desert, which is a bit ironic in this case.

    The reason it works for random encounters but not static locations I believe, is that the random encounter map scripts reset Gvar 633 CAR_PLACED_TILE to 0 on map exit, while normal map scripts do not (because normally the engine handles that).
    If Gvar 633 is not 0 the map you arrive to will fail to update to it's placement tile and instead use the one from the map you last came from, which will often lead to the car failing to be be placed.

    Usually the car is only seemingly lost though, with the save editor you can set the car to be at the map you left from (before it disappeared), and it should show up again (as long as the Gvar 633 value is still correct for that location).
  4. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Can we fix this somehow effectively?
  5. Darek

    Darek is currently unavailable

    Jan 7, 2008
    I would assume adding a map exit procedure where you reset gvar 633 on every map the car can get placed (same way the random encounter map scripts do), would solve the problem.
    Or wait, that would only work when you leave to the world map, but if you leave to another map, you probably lose the car instead.
    Maybe possible to script something with sfall. Would obviously be better if a real fix can be added to it instead.
    Last edited: Aug 5, 2019
  6. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Setting it to 0 you mean? Because I tried that a few hours ago on a map for test, but saw no difference.
  7. Darek

    Darek is currently unavailable

    Jan 7, 2008
    Yeah that is what I meant. I only tested setting that global to 0 with the save editor, and that seemed to work. Granted I didn't try that many times.

    The forced enclave patrol map outside of Gecko (RP) caused a missing car on whatever map you entered after it, until we reset gvar 633 to 0 in the map exit procedure of the map script.

    So strange it didn't work, but maybe something is different (hardcoded perhaps), when dealing with city maps?

    I'll test it more tonight.
  8. Darek

    Darek is currently unavailable

    Jan 7, 2008
    @Lexx, setting gvar 633 to 0 in map script on map exit does work insofar as the car won't get lost, but it doesn't stop you from automatically taking the car with you when leaving. It's like the game engine invokes "METARULE_GIVE_CAR_TO_PARTY 31" or something. Don't think there is any way to manually undo a metarule, so can't really test that.