Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Enclave death slides #115

Closed
burner1024 opened this issue Feb 15, 2023 · 1 comment
Closed

Restore Enclave death slides #115

burner1024 opened this issue Feb 15, 2023 · 1 comment
Assignees

Comments

@burner1024
Copy link
Member

As discovered by NovaRain, there are some death slides that never play.

Found an interesting engine bug: the game picks incorrect death endings under certain conditions (low chance), and by fixing it triggers another bug (more like an oversight): the enclave related death endings ( nar_dth7/8/9 in enddeath.txt) are never actually available to the player.

Because the player doesn't really "know" the location of Enclave (i.e. area 16 never shows on the world map).

I think they can be "enabled" by calling mark_on_map(AREA_THE_ENCLAVE) in map_enter in encfite script, and unmark_on_map(AREA_THE_ENCLAVE) in map_exit, so when the player dies on the oil rig maps those death endings can be shown.

@burner1024 burner1024 self-assigned this Feb 15, 2023
@NovaRain
Copy link

I just tested the mark/unmark macros, and the availability of death endings does change:

I use some hacks to dump the death end info list from memory when the player is dead. The last 0/1 value indicates whether the ending is available.

* default (even on the oil rig) or calling unmark_on_map(AREA_THE_ENCLAVE)

DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_4, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_5, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_6, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_dth1, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_dth2, 1
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth3, 1
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth4, 1
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth5, 1
DeathEndInfo dump: -1, 0, 22, -1, 0, 40, nar_dth6, 1
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth7, 0
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth8, 0
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth9, 0
DeathEndInfo dump: 491, 1, 3, -1, 150, 0, nar_mo1, 0
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd1, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd3, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd4, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd5, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd6, 1

* calling mark_on_map(AREA_THE_ENCLAVE)

DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_4, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_5, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_6, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_dth1, 1
DeathEndInfo dump: -1, 0, -1, -1, 0, 20, nar_dth2, 1
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth3, 0
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth4, 0
DeathEndInfo dump: -1, 0, -1, 16, 0, 40, nar_dth5, 0
DeathEndInfo dump: -1, 0, 22, -1, 0, 40, nar_dth6, 1
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth7, 1
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth8, 1
DeathEndInfo dump: -1, 0, 16, -1, 0, 40, nar_dth9, 1
DeathEndInfo dump: 491, 1, 3, -1, 150, 0, nar_mo1, 0
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd1, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd3, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd4, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd5, 1
DeathEndInfo dump: -1, 0, -1, -1, 10, 1, nar_jdd6, 1

So I think we can enable them when the player is on the oil rig like this:

procedure map_enter_p_proc begin
   if (global_var(GVAR_LOAD_MAP_INDEX) == 12) then begin
      override_map_start_hex( 24502, 0, 0 );
   end

   Enclave_Lighting;
   set_global_var(GVAR_LOAD_MAP_INDEX,0);
   mark_on_map(AREA_THE_ENCLAVE) // player cannot see the world map while on the oil rig so it's fine
end

procedure map_exit_p_proc begin
   if (global_var(GVAR_ENCLAVE_FRANK_DEAD) == 1) then begin
      set_global_var(GVAR_ENCLAVE_FRANK_DEAD, 2);
      set_global_var(GVAR_ENCLAVE_COUNTDOWN, 0);
      unmark_on_map(AREA_THE_ENCLAVE) // no unreachable "Enclave" location circle on the world map
      gfade_out(600);
      game_time_advance(ONE_GAME_DAY); //added by killap
      set_global_var(GVAR_ARROYO_RETURN_GECK,1);
      play_gmovie(DERRICK_MOVIE);
      endgame_slideshow;
   end
end

burner1024 added a commit that referenced this issue Aug 4, 2023
burner1024 added a commit to BGforgeNet/Fallout2_Restoration_Project that referenced this issue Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants