Commit graph

362 commits

Author SHA1 Message Date
toaster
76735183c6 m_cond.c: more consistent capitalisation in descriptions
- Cup -> CUP (prior art: ZONE)
- medals -> Medals
2024-03-19 19:30:16 +00:00
toaster
90ac08fb0a Don't force newline for OR in Challenge descriptions 2024-03-19 19:30:16 +00:00
toaster
78266e2dad Rename "Lost And Found" to "Lost & Found", as intended
We have the & symbol in the Cup font now, so doing it JUST before it's too late
2024-03-19 19:30:16 +00:00
toaster
d2ddeb65f2 M_UpdateNextPrisonEggPickup: Stop trying to be so pre-optimised and just do the job plainly
Should resolve the crash which for some reason doesn't have an issue to reference here

Also, for `debugprisoncd On`:
- Extensive debug logging
- Disable the "if all achieved, still force a pre-existing CD" behaviour
    - The list is empty if you've achieved every Prison CD and then restart the game, so it wasn't consistent at always making something. Without that kind of reliability I think it's more important for it to just be a fastforward
2024-03-18 14:11:33 +00:00
toaster
6e46f97847 As promised, Encore (alt)music
- `EncoreMusic` on mapheader
    - Supports up to 3 alt musics, as with every other type
- Do not vape/nightcoreify if provided
- To avoid complicating the Alt Music logic too much, uses "side B" of the same Prison Egg CD
    - That is to say, if there are 2 encore tracks and 3 normal tracks, the second Encore track will only play if you've gotten the CD associated with the second normal track

I haven't actually tested it *with* any Encore music, but I've triplechecked literally everywhere to make sure it didn't break standard play
2024-03-10 21:18:15 +00:00
Oni
6bfa697d7d Merge branch 'cd-extra-vfx' into 'master'
Extra effects for Prison Egg CD

See merge request KartKrew/Kart!2017
2024-03-06 01:53:49 +00:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
James R
f60309983a Add debugprisoncd cheat (DEVELOP only)
- Always drops a CD from Prison Eggs
2024-03-05 03:24:15 -08:00
James R
5fbb32442b Fix Alternate Title Screen unlockable not saving preference
- Remove CV_NOSHOWHELP, so the config file can load
- Do not stealth set the cvar, so it is not dependent on
  order of operations of config loading and challenge
  loading
2024-03-03 22:20:12 -08:00
toaster
e8523b69f0 Sealed Star re-ordering (resolves #606)
- If emerald not yet collected on that cup, pick the first uncollected emerald, then get the cup's CUPCACHE_SPECIAL with that ID to pick the stage
- Already collected emeralds retain their swappage across gamedata saves
- Returns to normal order if you get all 7 OR Special Mode is unlocked (chao key? debug? password in modded games? sky's the limit)
- Pops up a Message from the Stars telling you the gems have been returned to their natural place
- Add-ons will always use their dedicated sealed star, since it's unordered material

If it weren't so last minute I could have a better solution for GP Backups, but right now what I've gone for is it always trusts whatever G_GPCupIntoRoundQueue does AS LONG AS THE COURSE ISN'T THE ONE YOU'RE RELOADING INTO. If it IS, then it checks to see if it's exactly what's been saved, and complains (with the generic error message, unfortunately) if it isn't.
2024-03-03 00:24:31 +00:00
Eidolon
20cb01fb94 (demo v9) Demo save unlocks and mapmusrng
Fixes KartKrew/Kart#1093
2024-03-01 17:27:41 -06:00
James R
96543a537a Unlocks: add IsGear condition, restrict IsDifficulty to GP
- IsDifficulty is a GP difficulty requirement
- IsGear is a gear game speed requirement
2024-02-27 06:19:47 -08:00
toaster
7e217b74f5 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into separate-spb-attack-records
# Conflicts:
#	src/g_game.c
2024-02-23 00:57:40 +00:00
James R
cc240600e9 M_CheckCondition: fix UCRP_PODIUMCUP GP grade
- PodiumCup grade condition was completely broken and
  checked against the cup ID instead of the grade letter
2024-02-17 16:39:07 -08:00
James R
05d8d83dcc Refactor recorddata_t and separate into recordtimes_t 2024-01-27 04:13:01 -08:00
Oni
df5c866573 Merge branch 'map-access-flingerdinger' into 'master'
Stronger Course progression restriction

Closes #832, #859, and #839

See merge request KartKrew/Kart!1795
2024-01-09 08:11:12 +00:00
toaster
7916a6e1cb UC_UNLOCKPERCENT: Only evaluate when not in-game
- M_MapLocked uses netgame state, so too easy to get Test Run early (resolves #859)
- Major iteration of unlockable structs and related, so may also confer a performance benefit
2024-01-07 14:03:06 +00:00
toaster
83366b6507 More universal Course restriction based on progression
All courses are restricted in Match Race/Time Attack/Online if not visited in GP UNLESS:
- It is the first Race Course of a Cup
- Course has "NoVisitNeeded = True`
    - The Controls Tutorial and Test Run are the only two stages that will need this

The above replaces:
- A lot of restricted courses having to be marked with `FinishNeeded = True`
    - Hidden Palace
    - Sealed Stars 1-14
        - Once Special Mode is unlocked, it will now be possible to practice Sealed Stars before rematching them in GP
- Almost all Tutorial-specific behaviour, since it was heinously hacky

HOWEVER, `FinishNeeded = True` was left in specifically for future releases, and I reserve the right to use it on Adventure Example again before launch.
2024-01-07 13:57:05 +00:00
toaster
e9b7ed8101 Intentfully permit gaps between Emblem IDs
Introduces ET_NONE, to match SECRET_NONE for Challenges
2024-01-05 20:50:54 +00:00
toaster
6feb8370f6 AUTOMEDAL_MAX for range checks
Comments have also been updated to acknowledge the AUTOMEDAL_ constants
2024-01-05 12:03:18 +00:00
Eidolon
7521e42e62 Add automedal time configs and calculation 2024-01-03 12:24:33 -06:00
toaster
a15f6280d7 UCRP_TRACKHAZARD fixes
- describe as "course hazard", not "track hazard", to match updated player-facing lingo
- Add rudimentary handling to allow achievement in Prison Break, Versus
2023-12-27 15:16:03 +00:00
toaster
49e48c267a Use thin font for Challenge descriptions 2023-12-26 17:02:11 +00:00
toaster
b88372c85d PodiumCup challenge description: Correctly use extrainfo1 instead of requirement for Grade 2023-12-24 16:31:03 +00:00
toaster
9fc49acec6 M_PrecacheLevelLocks: Better diagnostic information 2023-12-23 22:59:42 +00:00
toaster
64922460ac Handle Podium unlocks during mapload, not when finishing the ceremony
Solves mid-podium crashes not granting second page material
2023-12-23 22:12:00 +00:00
toaster
a4c91f66ec Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into tutorial-pass 2023-12-17 12:09:06 +00:00
Eidolon
88ee385ee3 Enforce C11 standard compliance, -Werror=vla 2023-12-14 21:53:18 -06:00
SteelT
6eb31a4ced Fix m_cond.c compiler error 2023-12-14 19:12:18 -05:00
toaster
11fcb0b9ae Goner Setup: Cook 3 - Add "Outro"
One last guaranteed visit to the setup, to get a sendoff before the game truly begins.
(The "survey program" joke is now themed softlock prevention.)
2023-12-07 23:36:02 +00:00
toaster
e91115a8fa Goner Setup: Cook 2
- More dialogue
- Restrict access to your choices based on your progress through the Goner Setup.
- Save progress through the setup to gamedata
    - Resets to beginning when Challenges is cleared
- Passwords
    - Only permit the password entry in like the first two seconds
        - Preemptively disarms potentially annoying people in stream chats
    - Make wrongwarp also quit the game on exit instead of returning to the title screen
    - Add GDQ cheats
        - `savetheanimals`
        - `savetheframes`
        - Both do practically the same thing, with slightly modified dialogue.
            - Skips all of the normal dialogue.
            - Performing a social experiment on anyone who might stream this game at a charity event. :)
2023-12-03 22:34:06 +00:00
toaster
fcb696d1ad First pass at the "Game Truly Starting" apparatus
- Unlock Ring Cup to get the real Title Screen, demos and all.
- Allows M_InterruptMenuWithChallenges.
2023-11-27 23:52:14 +00:00
toaster
98b22c0c6e Self-review now that I'm not dead tired
- Fixes for UC_ALLCUPRECORDS
    - Actually use the capped difficulty variable
    - For the "every Cup" case, don't permit modded Cups to affect the result
- M_CheckCupEmeralds (referenced for the above)
    - Also do not permit modded Cups to affect the result
2023-11-22 11:40:10 +00:00
toaster
9989543346 UC_ALLCUPRECORDS
New condition for tracking multiple cups' windata.
`Condition1 = AllCupRecords RR_Egg Bronze`
- All cups up to Egg Cup must be completed at Bronze or better
`Condition1 = AllCupRecords`
- All cups in the game must be completed
`Condition1 = AllCupRecords All Any Master`
- All cups in the game must be completed on Master mode`
2023-11-22 00:34:39 +00:00
toaster
382119b8fb Second row of cups is invisible if none of them are unlocked
- Controlled by M_CupSecondRowLocked
    - Looks for any Cup with associated unlockable that's on the second row
    - Cached on load for both relevant menus - Cupgrid and Challenges
- Custom cups will be stretched out onto more pages
    - Side incentive of unlocking more material: Less annoying interactions with custom material
- Pages with nothing unlocked are completely skipped over

Also moves a bunch of minor things which previously used magic numbers to the CUPMENU_COLUMNS/CUPMENU_ROWS defines, for sanity
2023-11-20 21:09:33 +00:00
toaster
ce085c3f66 failedtutorialchallenge -> enteredtutorialchallenge
Track ENTERING the challenge, instead of when you fail it
Allows for system-level ironclad prevention against multiple tutorial challenge runs on the same gamedata
2023-11-17 16:54:33 +00:00
toaster
e2a3acc99d Track failing the Tutorial Challenge
I do NOT want to touch ACS today, but all the important pieces are now there for this feature
2023-11-16 23:09:41 +00:00
toaster
0762b93ef2 Tutorial skipping challenge - first pass
- Go to a MainCfg-specified map on its guessed gametype
    - `TutorialChallengeMap = RR_ZonedCity`
- Some unique settings
    - K_CanChangeRules() == false
    - If GTR_CIRCUIT, make it Hard Speed
    - If GTR_BUMPERS, die in one hit
    - If GTR_BOTS, make them all difficulty 13 of the default bot skin
    - No Medals or Spray Cans during the Tutorial Challenge
- Complete the stage in 1st place or don't bother at all
- Has the "Give up" menu option available, but no "Try Again"
- Condition for successfully completing the Tutorial Skip
    - `Condition1 = TutorialSkip`

Related bugfixes:
- Correctly wipe skipstats when returning to the Title/menus
- Typing of `ultimatemode` (hey this isn't accessible by anything right now I wonder)
2023-11-16 21:44:52 +00:00
toaster
91f411d52b VC requests for auto-naming AltMusic Challenge
- Replace the track #1/#2 with side B/C
- Add invalid map-set text
2023-10-20 20:39:16 +01:00
toaster
5aa71fb43e PrecacheLevelLocks: Automate naming SECRET_ALTMUSIC
Untested, might need to patch iF Oni runs into bugs
2023-10-20 18:24:07 +01:00
toaster
22bef38562 Self-review: Fix missing space in "reach at least400% on the speedometer" 2023-10-20 16:18:10 +01:00
toaster
82afb5da5a Self-review: Grade S is not an available rank for the Tally 2023-10-20 16:14:58 +01:00
toaster
d1ad45236f Self-review: Guarantee the first character of the Challenge Hint is also uppercase, thanks to a possible prefix being "The Controls Tutorial:" 2023-10-20 15:34:44 +01:00
toaster
94cfda6832 Self-review: TrackHazard
- Fix the highest bit handling
- Cleaner code for specific lap handling
2023-10-20 15:21:22 +01:00
toaster
dc72602b00 UnlockPercent: Add fudge value
If you're hypothetically gating a Character behind 100% of Characters unlocked... that'll never come true!
To that end, allow a fudge value to be specified.
It's added to the unlock count before comparing it against the percentage.
2023-10-20 14:27:19 +01:00
toaster
d122ddf1c7 UC_TOTALTUMBLETIME: Show centiseconds too 2023-10-20 13:31:58 +01:00
toaster
a1f93b4c60 UCRP_FINISHGRADE A
"get grade A or better"
Not for Podium, use PodiumCup instead for that
2023-10-20 13:03:45 +01:00
toaster
48bb2e1b3c Add support for PodiumCup Any 2023-10-20 12:41:07 +01:00
toaster
f68d58fb85 UCRP_PODIUMCUP: Make %s Cup mixed case 2023-10-20 12:36:22 +01:00
toaster
d3b35099fc UCRP_TARGETATTACKMETHOD: Don't care about everseenspecial since this can be used with Prison Break now too 2023-10-19 22:13:36 +01:00