- The "never force a retry" condition is now `!G_GametypeUsesLives()`
- In GT_SPECIAL *and* GT_VERSUS, check for K_IsPlayerLosing before retry, instead of bespoke check
- Solved by leveraging M_GetFirstLevelInList alongside existing M_CountLevelsInList calls
- Also optimises the above calls in the M_CupLocked case, since that's no longer being directly used otherwise
- Replacement for LF2_VISITNEEDED, which was itself a Kart-specific inversion of LF2_NOVISITNEEDED
- Prevents selection in time attack before you've beaten the level in another context (GP, or MP if applicable)
- Should be used for Sealed Stars (and Adventure Example) exclusively IMO, but usable for others too
Related adjustments:
- Allow a map to have a `TypeOfLevel` of 0 without error
- Change the Condition String for UC_MAPVISITED to "Finish a round on X" (previously "Beat X")
Will make long-term management of this menu easier, and pushes aside some inconsistencies between graphics
May be reverted in part or full if it doesn't work for particular assets
Multiplayer map select now uses the value of `menugametype` accessible just above it on the menu, instead of having to select from a hardcoded set of options
- Add "Gametype" toggle option to pause menu for admins
- A/Confirm button on any gametype other than current to do random map in new gametype
- C/Extra button to return to current gametype
- A/Confirm button on current gametype does a funny noise and nothing else right now, idk what to do
- `randomlevel` supports the same `-gametype` parameter as `map`
- Both `randomlevel` and `map`'s `-gametype` parameter prohibits `GTR_FORBIDMP` mask gametype changes in netgames
- `randomlevel` properly sets encore based on `cv_kartencore`'s value (and permitting `GTR_ENCORE`)
- Split out `menugametype` change functions
- `yellowmap` now remaps all intermediary shades of grey to match funny pause menu remaps
- Introduce `menugametype`
- Controlled by IT_KEYHANDLER/M_HandleMenuGametype
- Excludes gametypes that do not support multiplayer by default
- GTR_CAPSULES and GTR_BOSS for now, but also user-specifiable GTR_NOMP
- Remove gametype_cons_t and G_UpdateGametypeSelections, an obstacle in the way of infinitely allocatable custom gametypes
- Should support custom gametypes, but haven't been thoroughly testing those
- Custom gametypes must now be unique by name
- Custom gametypes now have a maximum name length of 31
* `ATTACKING_` constants have been changed to be flags
- `ATTACKING_TIME` contains time data for all gametypes
- `ATTACKING_LAPS` contains laps data for `GTR_CIRCUIT` on maps with more than 1 lap
* `demoflags` now contains raw `ATTACKING_` flags
* Best time/best lap demo files will now be saved properly again (broken since `new-menus`)
* Ghosts will now be loaded properly again (broken since `unlockables-undefeatable`)
Requested by Charyb.
- LE_PINCHPHASE (-2 or 65534) for busting open the Catcher
- LE_BOSSDEAD (-4 or 65532) for grabbing the emerald
Would like to use args for UDMF compatibility but there is no spawnpoint for the Catcher so it's hardcoded for now
If you smuggle an SPB to after the death of the UFO Catcher, spawn a single, free-on-straightways manta ring before it blows up.
Testing shows that you can get hit by the SPB's explosion only if you use the free manta ring just before a sneaker panel... but also Sal thinks it's cool and I think it adds depth
* Standardises conditions under which the UFO Catcher can be "targeted" (Jawz, SPB, tether)
* Makes SPBs explode a little ahead of driving distance if UFO Catcher is no longer targetable
- Clear console prints immediately after menu clear (fixes the prints on the black screen before loading level from menu)
- Last kart standing, not last hedgehog standing 🥹
* Both GT_SPECIAL and GT_VERSUS.
* Access controlled by SECRET_SPECIALATTACK. (You're blue now.)
Related changes to precipitate:
* Cups that only have one map in them get selected immediately, rather than off-the-cuff.
* Done by seperating out a new function M_LevelSelected from M_LevelSelectHandler
* Maps that only have one lap in them don't have a visible lap timestamp sticker.
* Fix a cup with *no* valid maps for the current ruleset being hypothetically selectable
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
- Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
- GTR_ROLLINGSTART
* Initial instathrust, as before
* Forced MAXPLMOVE forward
* Disable finish line beam
* "Super transformation" sound
- Reference to the previous entry in the series' Perfect Startboost mechanic
- GTR_SPECIALSTART
* Instant white fade
* No titlecard (overridden by Boss intro)
* Starting warp sound
- Match slidein time with no traditional titlecard to the end of the playsim intro fade
- Remove G_IsSpecialStage
* No longer has gametype-specific highlight
* Shows Grand Prix and Capsules instead of gametype name if relevant
* Operates on a heirarchy for important information
* Shows grand prix round on left if in GP (resolves#360)
* Shows capsules remaining on right if in BTC
* Attempts to draw timelimit and pointlimit on both left and right
* Number of laps remaining/gamespeed is least priority for left and right sides
- Now you select based on whether you want to rank by
- Time always (Race, Special)
- Score always (might be useful for custom gametypes..?)
- Time in 1P, Score otherwise (Battle, Versus)
- No longer has gametype-specific text colours on the intermission
- Also cleans up a case where invalid music could play for winning a custom gametype without GTR_CIRCUIT *or* GTR_BUMPERS
* The existing structs are now exclusively for handling extra data.
* `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
* `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
* These are turned on when the gametype extra data is successfully initialised, not on map start.
* `K_InitBossHealthBar(...)` for `bossinfo.valid`
* `K_InitSpecialStage(void)` for `specialstageinfo.valid`
* `K_CanChangeRules(...)` no longer checks these
* No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
* Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
Controlled three things: Vintage SRB2 cutscenes, a certain type of reset on map commands, and whether to go to ceremony/evaluation/credits. All three should be controlled by grandprixinfo.gp instead, since that persists cross-gametype.
- Only show lap count and gamespeed on rankings if GTR_CIRCUIT
- Adjust offsets for speedometer/accessability icons with GTR_BUMPERS|GTR_SPHERES
- Only show Karma on Bumpers hud with GTR_KARMA
- Permit battle fullscreen without GTR_KARMA
- Make the Break The Capsules roulette show up with GTR_CAPSULES, not absence of GTR_CIRCUIT
- Don't push Break The Capsules roulette to the item list twice
- Make the special mode switching of int_battle happen for all instances of int_battle, not just GT_BATTLE
- New array of pointers to structures in memory (currently mixing static for base-game and Callocated for custom)
- Centralises a metric-ton of previously seperately handled properties into one struct
- Gametype_Names[]
- Gametype_ConstantNames[]
- gametypetol[]
- timelimits[]
- pointlimits[]
- gametypedefaultrules[]
- Don't attempt to guess custom gametype in Replay Hut (requires more work to make custom gametypes behave across the entire experience)
- I_Error if invalid gametype set
- gametyperules is deprecated since it will never be modified seperately from gametype (temporarily a #define, don't wanna bloat this commit too much)
New:
- GTR_POWERSTONES
- Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
- Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
- A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
- Drafting/tether has increased strength/effective distance
- Spindashing is stronger
- Invincibility chaining has less effect
- Grow has a lower total duration
- Flame shield is more uncontrollable
Extra functionality
- GTR_CAPSULES
- Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
- When not present, Flame Shield has perma-full meter
- When not present, overrides gamespeed with KARTSPEED_EASY
- Presence of Best Lap sticker in Time Attack menu
- Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
- Handles the switch between a gametype recording/displaying Times and Scores in a few places
- Handles displaying "WANTED" players on the minimap
Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes
Removals
- GTR_LIVES
- GTR_SPECIALBOTS
- Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
- WANTED as it existed is functionally dead
- Handle mismatched gametypes for client and server on voting screen
- I_Error when running out of gametypes
- Reduce gametype freeslots slightly to avoid colliding with VOTEMODIFIER_ENCORE