mirror of
https://github.com/open-goal/jak-project
synced 2026-06-24 17:53:18 -04:00
Add Speedrun Category Extensions (#2195)
This commit is contained in:
@@ -1641,6 +1641,12 @@
|
||||
(speedrun-il-cave #x151c)
|
||||
(speedrun-il-lavatube #x151d)
|
||||
(speedrun-il-citadel #x151e)
|
||||
(speedrun-new-cat-ext #x151f)
|
||||
(speedrun-new-game-plus #x1520)
|
||||
(speedrun-hub1-100 #x1521)
|
||||
(speedrun-hub2-100 #x1522)
|
||||
(speedrun-hub3-100 #x1523)
|
||||
(speedrun-all-cutscenes #x1524)
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
|
||||
@@ -15796,6 +15802,7 @@
|
||||
(checkpoint-select)
|
||||
(speedrun-options)
|
||||
(speedrun-il-options)
|
||||
(speedrun-cat-ext-options)
|
||||
|
||||
;; the last one!
|
||||
(max)
|
||||
|
||||
@@ -423,6 +423,20 @@
|
||||
(#x151e "GOL AND MAIA'S CITADEL IL"
|
||||
"GOL AND MAIA'S CITADEL IL")
|
||||
|
||||
(#x151f "NEW CATEGORY EXTENSION RUN"
|
||||
"NEW CATEGORY EXTENSION RUN")
|
||||
|
||||
(#x1520 "NG+"
|
||||
"NG+")
|
||||
(#x1521 "HUB 1 100%"
|
||||
"HUB 1 100%")
|
||||
(#x1522 "HUB 2 100%"
|
||||
"HUB 2 100%")
|
||||
(#x1523 "HUB 3 100%"
|
||||
"HUB 3 100%")
|
||||
(#x1524 "ALL CUTSCENES"
|
||||
"ALL CUTSCENES")
|
||||
|
||||
;; -----------------
|
||||
;; test (DO NOT TRANSLATE)
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
(checkpoint-select)
|
||||
(speedrun-options)
|
||||
(speedrun-il-options)
|
||||
(speedrun-cat-ext-options)
|
||||
|
||||
;; the last one!
|
||||
(max)
|
||||
|
||||
@@ -847,6 +847,7 @@
|
||||
(= v1-2 (progress-screen monitor))
|
||||
(= v1-2 (progress-screen speedrun-options))
|
||||
(= v1-2 (progress-screen speedrun-il-options))
|
||||
(= v1-2 (progress-screen speedrun-cat-ext-options))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -790,6 +790,13 @@
|
||||
(speedrun-il-cave #x151c)
|
||||
(speedrun-il-lavatube #x151d)
|
||||
(speedrun-il-citadel #x151e)
|
||||
(speedrun-new-cat-ext #x151f)
|
||||
(speedrun-new-game-plus #x1520)
|
||||
(speedrun-hub1-100 #x1521)
|
||||
(speedrun-hub2-100 #x1522)
|
||||
(speedrun-hub3-100 #x1523)
|
||||
(speedrun-all-cutscenes #x1524)
|
||||
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
|
||||
(defenum speedrun-category
|
||||
:type uint32
|
||||
;; Main Categories
|
||||
@@ -31,10 +30,14 @@
|
||||
(il-lavatube 114) ;; Lava Tube IL
|
||||
(il-citadel 115) ;; Gol and Maia's Citadel IL
|
||||
|
||||
;; Extension Categories (TBD)
|
||||
;; Category Extensions
|
||||
(new-game-plus 116) ;; NG+
|
||||
(hub1-100 117) ;; Hub 1 100% (same as full game)
|
||||
(hub2-100 118) ;; Hub 2 100% (all of Hub 1 completed)
|
||||
(hub3-100 119) ;; Hub 3 100% (all of Hub 1+2 completed)
|
||||
(all-cutscenes 120) ;; All Cutscenes
|
||||
)
|
||||
|
||||
|
||||
(deftype speedrun-info-jak1 (structure)
|
||||
(
|
||||
(category speedrun-category)
|
||||
|
||||
@@ -3,6 +3,120 @@
|
||||
|
||||
(define *speedrun-info* (new 'static 'speedrun-info-jak1 :should-display? #t :needs-post-blackout-setup? #f))
|
||||
|
||||
(define *hub1-cell-list* (new 'static 'boxed-array :type game-task
|
||||
(game-task training-gimmie)
|
||||
(game-task training-door)
|
||||
(game-task training-climb)
|
||||
(game-task training-buzzer)
|
||||
(game-task village1-mayor-money)
|
||||
(game-task village1-uncle-money)
|
||||
(game-task village1-yakow)
|
||||
(game-task village1-oracle-money1)
|
||||
(game-task village1-oracle-money2)
|
||||
(game-task village1-buzzer)
|
||||
(game-task beach-ecorocks)
|
||||
(game-task beach-flutflut)
|
||||
(game-task beach-pelican)
|
||||
(game-task beach-seagull)
|
||||
(game-task beach-cannon)
|
||||
(game-task beach-gimmie)
|
||||
(game-task beach-sentinel)
|
||||
(game-task beach-buzzer)
|
||||
(game-task jungle-lurkerm)
|
||||
(game-task jungle-tower)
|
||||
(game-task jungle-eggtop)
|
||||
(game-task jungle-plant)
|
||||
(game-task jungle-fishgame)
|
||||
(game-task jungle-canyon-end)
|
||||
(game-task jungle-temple-door)
|
||||
(game-task jungle-buzzer)
|
||||
(game-task misty-muse)
|
||||
(game-task misty-boat)
|
||||
(game-task misty-cannon)
|
||||
(game-task misty-warehouse)
|
||||
(game-task misty-bike)
|
||||
(game-task misty-bike-jump)
|
||||
(game-task misty-eco-challenge)
|
||||
(game-task misty-buzzer)
|
||||
(game-task firecanyon-end)
|
||||
(game-task firecanyon-buzzer)
|
||||
))
|
||||
|
||||
(define *hub2-cell-list* (new 'static 'boxed-array :type game-task
|
||||
(game-task village2-gambler-money)
|
||||
(game-task village2-geologist-money)
|
||||
(game-task village2-warrior-money)
|
||||
(game-task village2-oracle-money1)
|
||||
(game-task village2-oracle-money2)
|
||||
(game-task village2-buzzer)
|
||||
(game-task sunken-room)
|
||||
(game-task sunken-pipe)
|
||||
(game-task sunken-slide)
|
||||
(game-task sunken-sharks)
|
||||
(game-task sunken-platforms)
|
||||
(game-task sunken-top-of-helix)
|
||||
(game-task sunken-spinning-room)
|
||||
(game-task sunken-buzzer)
|
||||
(game-task swamp-flutflut)
|
||||
(game-task swamp-billy)
|
||||
(game-task swamp-battle)
|
||||
(game-task swamp-tether-4)
|
||||
(game-task swamp-tether-1)
|
||||
(game-task swamp-tether-2)
|
||||
(game-task swamp-tether-3)
|
||||
(game-task swamp-buzzer)
|
||||
(game-task rolling-moles)
|
||||
(game-task rolling-robbers)
|
||||
(game-task rolling-race)
|
||||
(game-task rolling-lake)
|
||||
(game-task rolling-plants)
|
||||
(game-task rolling-ring-chase-1)
|
||||
(game-task rolling-ring-chase-2)
|
||||
(game-task rolling-buzzer)
|
||||
(game-task ogre-boss)
|
||||
(game-task ogre-end)
|
||||
(game-task ogre-secret)
|
||||
(game-task ogre-buzzer)
|
||||
))
|
||||
|
||||
(define *hub3-cell-list* (new 'static 'boxed-array :type game-task
|
||||
(game-task village3-miner-money1)
|
||||
(game-task village3-miner-money2)
|
||||
(game-task village3-miner-money3)
|
||||
(game-task village3-miner-money4)
|
||||
(game-task village3-oracle-money1)
|
||||
(game-task village3-oracle-money2)
|
||||
(game-task village3-extra1)
|
||||
(game-task village3-buzzer)
|
||||
(game-task snow-eggtop)
|
||||
(game-task snow-ram)
|
||||
(game-task snow-bumpers)
|
||||
(game-task snow-cage)
|
||||
(game-task snow-fort)
|
||||
(game-task snow-ball)
|
||||
(game-task snow-bunnies)
|
||||
(game-task snow-buzzer)
|
||||
(game-task cave-gnawers)
|
||||
(game-task cave-dark-crystals)
|
||||
(game-task cave-dark-climb)
|
||||
(game-task cave-robot-climb)
|
||||
(game-task cave-swing-poles)
|
||||
(game-task cave-spider-tunnel)
|
||||
(game-task cave-platforms)
|
||||
(game-task cave-buzzer)
|
||||
(game-task lavatube-end)
|
||||
(game-task lavatube-buzzer)
|
||||
))
|
||||
|
||||
;; unused
|
||||
;; (define *citadel-cell-list* (new 'static 'boxed-array :type game-task
|
||||
;; (game-task citadel-sage-blue)
|
||||
;; (game-task citadel-sage-red)
|
||||
;; (game-task citadel-sage-yellow)
|
||||
;; (game-task citadel-sage-green)
|
||||
;; (game-task citadel-buzzer)
|
||||
;; ))
|
||||
|
||||
(defun is-speedrun-category? ((category symbol))
|
||||
(and (-> *pc-settings* speedrunner-mode?)
|
||||
(name= category (enum->string speedrun-category (-> *speedrun-info* category)))
|
||||
@@ -12,7 +126,7 @@
|
||||
(defun start-speedrun ((category speedrun-category))
|
||||
;; randomize game id so the autosplitter knows to restart
|
||||
(update-autosplit-jak1-new-game)
|
||||
;; disable hints
|
||||
;; disable hints (turned back on later for all-cutscenes category)
|
||||
(set! (-> *setting-control* default play-hints) #f)
|
||||
;; turn on speedrun verification display and flip flag for setting up speedrun after initialize!
|
||||
(set! (-> *speedrun-info* should-display?) #t)
|
||||
@@ -23,11 +137,11 @@
|
||||
)
|
||||
(case (-> *speedrun-info* category)
|
||||
(((speedrun-category full-game))
|
||||
;; spawn at the warp gate checkpoint
|
||||
;; spawn at the geyser warp gate checkpoint
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "game-start")
|
||||
)
|
||||
(((speedrun-category il-training))
|
||||
;; spawn at the warp gate checkpoint
|
||||
;; spawn at the geyser warp gate checkpoint
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "game-start")
|
||||
)
|
||||
(((speedrun-category il-village1))
|
||||
@@ -90,6 +204,33 @@
|
||||
;; spawn outside first citadel door
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "citadel-entrance")
|
||||
)
|
||||
(((speedrun-category new-game-plus))
|
||||
;; spawn at the geyser warp gate checkpoint
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "game-start")
|
||||
)
|
||||
(((speedrun-category hub1-100))
|
||||
;; spawn at the geyser warp gate checkpoint
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "game-start")
|
||||
)
|
||||
(((speedrun-category hub2-100))
|
||||
;; spawn at rock village start
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "village2-start")
|
||||
)
|
||||
(((speedrun-category hub3-100))
|
||||
;; spawn at start of volcanic crater
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "village3-start")
|
||||
)
|
||||
(((speedrun-category all-cutscenes))
|
||||
;; turn play hints back on
|
||||
(set! (-> *setting-control* default play-hints) #t)
|
||||
;; don't allow cutscene skips
|
||||
(set! (-> *pc-settings* skip-movies?) #f)
|
||||
;; spawn at the geyser warp gate checkpoint
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
|
||||
)
|
||||
(else
|
||||
(format 0 "start-speedrun: unrecognized category ~S~%" (enum->string speedrun-category (-> *speedrun-info* category)))
|
||||
)
|
||||
)
|
||||
;; ensure `force actors` is not enabled
|
||||
(set! (-> *pc-settings* force-actors?) #f)
|
||||
@@ -208,6 +349,64 @@
|
||||
(close-specific-task! (game-task village4-button) (task-status need-reward-speech))
|
||||
(mark-text-as-seen *game-info* (game-text-id citadel-level-name))
|
||||
)
|
||||
(((speedrun-category new-game-plus))
|
||||
;; skip intro cutscene
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
;; unlock hub1 cells
|
||||
(dotimes (idx (length *hub1-cell-list*))
|
||||
(close-specific-task! (-> *hub1-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub1-cell-list* idx)))
|
||||
)
|
||||
;; unlock hub2 cells
|
||||
(dotimes (idx (length *hub2-cell-list*))
|
||||
(close-specific-task! (-> *hub2-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub2-cell-list* idx)))
|
||||
)
|
||||
;; unlock hub3 cells
|
||||
(dotimes (idx (length *hub3-cell-list*))
|
||||
(close-specific-task! (-> *hub3-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub3-cell-list* idx)))
|
||||
)
|
||||
)
|
||||
(((speedrun-category hub1-100))
|
||||
;; skip intro cutscene
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
)
|
||||
(((speedrun-category hub2-100))
|
||||
;; skip intro cutscene
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
;; unlock hub1 cells
|
||||
(dotimes (idx (length *hub1-cell-list*))
|
||||
(close-specific-task! (-> *hub1-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub1-cell-list* idx)))
|
||||
)
|
||||
;; give all orbs from hub1
|
||||
(set! (-> *game-info* money-total) 600.0) ;; 50+50+150+150+150+50
|
||||
(set! (-> *game-info* money) 180.0) ;; 50+50+150+150+150+50 - (90+90+120+120)
|
||||
)
|
||||
(((speedrun-category hub3-100))
|
||||
;; skip intro cutscene
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
;; unlock hub1 cells
|
||||
(dotimes (idx (length *hub1-cell-list*))
|
||||
(close-specific-task! (-> *hub1-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub1-cell-list* idx)))
|
||||
)
|
||||
;; unlock hub2 cells
|
||||
(dotimes (idx (length *hub2-cell-list*))
|
||||
(close-specific-task! (-> *hub2-cell-list* idx) (task-status need-resolution))
|
||||
(send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> *hub2-cell-list* idx)))
|
||||
)
|
||||
;; give all orbs from hub1+2
|
||||
(set! (-> *game-info* money-total) 1300.0) ;; 50+50+150+150+150+50 + 50+200+200+200+50
|
||||
(set! (-> *game-info* money) 370.0) ;; 50+50+150+150+150+50 - (90+90+120+120) + 50+200+200+200+50 - (90+90+90+120+120)
|
||||
)
|
||||
(((speedrun-category all-cutscenes))
|
||||
;; no post-blackout actions needed
|
||||
)
|
||||
(else
|
||||
(format 0 "setup-speedrun-post-blackout: unrecognized category ~S~%" (enum->string speedrun-category (-> *speedrun-info* category)))
|
||||
)
|
||||
)
|
||||
;; reset speedrun display (gets hidden on first collectable pickup)
|
||||
(set! (-> *speedrun-info* should-display?) #t)
|
||||
@@ -249,7 +448,7 @@
|
||||
(not (paused?))
|
||||
(-> *speedrun-info* should-display?))
|
||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf))
|
||||
(bucket-id debug-no-zbuf))
|
||||
(bucket-id subtitle))
|
||||
(draw-string-xy (string-format "Speedrunner Mode ~%OpenGOAL Version: ~S ~%Category: ~S ~%Cutscene Skips ~A"
|
||||
*pc-settings-built-sha*
|
||||
(enum->string speedrun-category (-> *speedrun-info* category))
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-reset-current-run) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-new-full-game) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id speedrun-new-individual-level) :scale #t :param3 (game-option-menu speedrun-il-options))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id speedrun-new-cat-ext) :scale #t :param3 (game-option-menu speedrun-cat-ext-options))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
@@ -267,6 +268,18 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define *speedrun-cat-ext-options*
|
||||
(new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-new-full-game) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-new-game-plus) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-hub1-100) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-hub2-100) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-hub3-100) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id speedrun-all-cutscenes) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *secrets-title* (new 'static 'boxed-array :type game-option
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id music-player) :scale #t :param3 (game-option-menu music-player))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id cheats) :scale #t :param3 (game-option-menu cheats))
|
||||
@@ -783,6 +796,7 @@
|
||||
(set! (-> *options-remap* (progress-screen monitor)) *temp-options*)
|
||||
(set! (-> *options-remap* (progress-screen speedrun-options)) *speedrun-options*)
|
||||
(set! (-> *options-remap* (progress-screen speedrun-il-options)) *speedrun-il-options*)
|
||||
(set! (-> *options-remap* (progress-screen speedrun-cat-ext-options)) *speedrun-cat-ext-options*)
|
||||
|
||||
|
||||
;; set default params
|
||||
@@ -1375,6 +1389,21 @@
|
||||
(((game-text-id speedrun-il-citadel))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category il-citadel))
|
||||
)
|
||||
(((game-text-id speedrun-new-game-plus))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category new-game-plus))
|
||||
)
|
||||
(((game-text-id speedrun-hub1-100))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category hub1-100))
|
||||
)
|
||||
(((game-text-id speedrun-hub2-100))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category hub2-100))
|
||||
)
|
||||
(((game-text-id speedrun-hub3-100))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category hub3-100))
|
||||
)
|
||||
(((game-text-id speedrun-all-cutscenes))
|
||||
(progress-fast-save-and-start-speedrun (speedrun-category all-cutscenes))
|
||||
)
|
||||
)
|
||||
(commit-to-file *pc-settings*)
|
||||
;; other behaviors are hardcoded elsewhere because screw you.
|
||||
@@ -2497,7 +2526,7 @@
|
||||
(draw-notice-screen self)
|
||||
(draw-options self 155 25 0.65)
|
||||
)
|
||||
(((progress-screen camera-options) (progress-screen checkpoint-select) (progress-screen speedrun-il-options))
|
||||
(((progress-screen camera-options) (progress-screen checkpoint-select) (progress-screen speedrun-il-options) (progress-screen speedrun-cat-ext-options))
|
||||
;; camera options lines are a bit too big
|
||||
(hide-progress-icons)
|
||||
(draw-options self 115 25 0.65)
|
||||
|
||||
Reference in New Issue
Block a user