Commit graph

279 commits

Author SHA1 Message Date
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
toaster
d8e6e1d1a4 UC_TOTALTUMBLETIME
`Condition1 = TotalTumbleTime 30*TICRATE
"tumble through the air for 30:00"

Also makes all the time-based non-playing Conditions use get_number so TICRATE can be provided
2023-10-19 20:22:17 +01:00
toaster
42233cfb9e UCRP_GROWCONSECUTIVEBEAMS
- Condition1 = GrowConsecutiveBeams 4
- "touch the blue beams from your own Shrink at least 4 times before returning to normal size
2023-10-19 19:44:37 +01:00
toaster
6211c0b222 UCRP_GIANTRACERSHRUNKENORBI
"hit a giant racer with a shrunken Orbinaut"
Does what it says on the tin
2023-10-19 18:43:40 +01:00
toaster
d2d7830afc UCRP_HASFOLLOWER
Self-explanatory.
- `Condition1 = HasFollower Buzz_Bomber`
    - "with Buzz Bomber in tow"
    - Combine with Podium checks or other completion-based challenges.
2023-10-19 18:06:27 +01:00
toaster
de79dfe983 UCRP_MAPDESTROYOBJECTS
You have to destroy all objects of a certain list of types.
UNLIKE OTHER CHALLENGES, this is dependent on a mapheader parameter!!
The author of this commit just didn't want to create too laggy a condition check.
- `Condition1 = MapDestroyObjects RR_ESPRESSOLANE tables & chairs
- Map RR_ESPRESSOLANE
    - DestroyObjectsForChallenges = MT_ESPTABLE,MT_ESPCHAIR
2023-10-19 17:28:55 +01:00
toaster
a6ef8d357c UCRP_DRAFTDURATION
"consistently draft off other racers for [parameter] seconds"
Actually counts leniency tics too, but if the leniency hits 0 it gets reset.
2023-10-18 02:32:46 +01:00
toaster
83acdaa0cf UCRP_HITDRAFTERLOOKBACK
"hit a racer drafting off you while looking back at them"
Self-explanatory set of conditions
Wrote a commented out more compicated check for valid angles between player and target, but lastdraft probably is good enough for these purpses
2023-10-18 02:05:12 +01:00
toaster
a7940684f6 UCRP_WHIPHYUU
Insta-Whip another racer while you yourself are invisible from Hyuudoro, it's shrimple
Also updates the phrasing used for UCRP_TRIPWIREHYUU to match ("afflicted by Hyudoro")
2023-10-18 01:18:34 +01:00
toaster
1c887a7041 UCRP_LANDMINEDUNK: The official parsing is "Land Mine" 2023-10-18 00:45:26 +01:00
toaster
edd3e8bbea UCRP_PODIUMNOCONTINUES
Fires if no continues have been used (as tracked on the Ceremony Ranking screen)
2023-10-18 00:42:59 +01:00
toaster
813ad52b15 Guarantee UCRP_PODIUMxx events only occour ig grandprixinfo.gp is true
Currently podium is GP only, but that won't be forever
2023-10-18 00:42:02 +01:00
toaster
acdb7fd869 UCRP_CHASEDBYSPB
True if the player has PF_RINGLOCK (SPB on the HUD). Probably the cleanest implementation.
Stacks well with "finish in 1st".
2023-10-18 00:10:40 +01:00
toaster
a746c4f33f SPB-related conditions: Make hyphenation consistent 2023-10-18 00:07:30 +01:00
toaster
e9d4cc2f3a UCRP_TRACKHAZARD, UCRP_FAULTED: Use latestlap instead of current lap when determining elegibility 2023-10-17 23:25:26 +01:00
toaster
fa2e54dd13 UCRP_FAULTED
- `Condition1 = Faulted Yes`
    - `FAULT during POSITION`
    - for example, combine with "& finish in 1st"
- `Condition1 = Faulted No`
    - `don't FAULT during POSITION`
2023-10-17 23:21:47 +01:00
toaster
90a65220b2 UCRP_FALLOFF, UCRP_TOUCHOFFROAD, UCRP_TOUCHSNEAKERPANEL, UCRP_RINGDEBT: Only evaluate the "false" case if the player is exiting or has PF_NOCONTEST 2023-10-17 23:20:16 +01:00
toaster
35ca8e6191 UCRP_SPEEDOMETER
Provide a percentage between 100 and 999 inclusive.
Reach that speed on the speedometer at any point during the race to achieve the condition.
2023-10-17 22:53:40 +01:00
toaster
9e1aec4298 UCRP_RETURNMARKTOSENDER
"when cursed with Eggmark, blow up the racer responsible"
Just a simple condition. Either it happens or it doesn't.
MT_SPBEXPLOSION now tracks whether it was made by KITEM_EGGMAN or KITEM_SPB, too!
2023-10-17 22:25:47 +01:00
toaster
3e494a342c UCRP_GACHABOMMISER
Break a target (Prison Egg/UFO) using exactly one Gachabom again and again
Becomes invalid if an Insta-Whip collides with a target, or you throw two at the same time
2023-10-17 21:09:22 +01:00
toaster
01b97cb829 Update UCRP_UFOATTACKMETHOD into UCRP_TARGETATTACKMETHOD
Supports Prison Eggs and Gachabom now as well.
For the original behaviour, combine with the new UCRP_SMASHUFO.
2023-10-17 21:03:20 +01:00
toaster
d11fe78e90 UCRP_UFOATTACKMETHOD
`Condition1 = UfoAttackMethod [type]`
    - "smash a UFO Catcher using only [type]"
        - Combine with `Prefix_SealedStar` or `Prefix_IsMap [special stage stage]`
        - Shows up as "???"
    - Types supported:
        - `Boost` - "boost power" (sneakers)
        - `Whip` - "Insta-Whip"
        - `Banana` - "Bananas"
        - `Orbinaut`- "Orbinauts"
        - `Jawz` - "Jawz"
        - `SPB` - "Self Propelled Bombs"
    - Other types could be added on request, these were just the easy ones

In addition, the prototype for P_MobjWasRemoved was moved to `p_mobj.h`.
It's EXTREMELY important that we're able to safely check mobj pointers anywhere a mobj_t is possible to observe, without including the full `p_local.h`...
2023-10-17 01:07:03 +01:00
toaster
f0d1813752 UCRP_TRACKHAZARD: Optimise implementation to not be 100 booleans
Much like player->availabilities, use a set of bits on UINT8.
2023-10-16 18:04:23 +01:00
toaster
d4e3d8433d UCRP_TRACKHAZARD
A series of 100 booleans on the roundconditions struct, one per possible lap.
Allows for a full suite of track hazard touching conditions - see the following examples.

- `Condition1 = Prefix_IsMap RR_MOTOBUGMOTORWAY
- `Condition1 = TrackHazard No`
- `Condition1 = IsMap RR_MOTOBUGMOTORWAY`
    - "MOTOBUG MOTORWAY: Don't touch any track hazard"
- `Condition1 = Prefix_GrandPrix`
- `Condition1 = IsMap RR_HARDBOILEDSTADIUM`
- `Condition1 = TrackHazard Yes`
- `Condition1 = And`
- `Condition1 = FinishPlace 1`
    - "GRAND PRIX: On HARD-BOILED STADIUM, touch a track hazard every lap & finish in 1st"
- `Condition1 = Prefix IsMap RR_DEATHEGG`
- `Condition1 = Trackhazard No 8`
    - "DEATH EGG ZONE: Don't touch any track hazard on lap 8"
- `Condition1 = Prefix_IsMap RR_SPEEDHIGHWAY
- `Condition1 = TrackHazard No Final`
    - "SPEED HIGHWAY: Don't touch any track hazard on the final lap"
2023-10-16 17:09:12 +01:00
toaster
6b2e0a508d UCRP_RINGS, UCRP_RINGSEXACT
`Rings 10` - "with at least 10 Rings"
`RingsExact -14` - "with exactly -14 Rings"
(`Rings 20` will also be parsed as "with exactly -20 Rings")
2023-10-15 00:17:20 +01:00
toaster
b2aac22856 UCRP_FINISHPERFECT
Complete a perfect round (1st every lap) to get this
2023-10-14 23:21:51 +01:00
toaster
e4a3b85adf UC_UNLOCKPERCENT: Make SECRET_COLOR option actually count Spray Cans, not unlockables directly 2023-10-14 22:36:41 +01:00
toaster
70c0b0503d Ancient Shrine polish
- Change the phrasing from "activate the ancient shrine" to "play a melody for the ancient shrine in"
- Add ~~Morbius~~ Mystic Melody Orb decorations
- A_FireShrink has been fixed to use mapobjectscale (and prevent dividing by 0)
2023-10-14 21:25:03 +01:00
toaster
52674c7bb2 UC_UNLOCKPERCENT
- `UnlockPercent 40 AltMusic` - "Get 40% of alternate music"
- `UnlockPercent 1 Color` - "Get 1% of Spray Cans"
- `UnlockPercent 20 Map` - "Get 20% of Courses"
- `UnlockPercent 55 Cup` - "Get 55% of Cups"
- `UnlockPercent 100` - "Get 100% completion"
    - Provide a percentage and, optionally, an Unlockable type
    - This only works for Unlockable Types where there are expected to be more than one per board
2023-10-14 18:42:27 +01:00
toaster
1c4750a0a2 readcondition: Support non-fragmented parameters that can be used for the Challenge Description directly
- "DescriptionOverride" (new!)
    - Provide a full description in place of the params and this will be used
    - Any conditions that are before it will not be wiped, so you can prefix it if you need to
    - Can be used with any other set of Conditions
        - `Condition1 = DescriptionOverride Complete the sentence: "ring racers (???)"`
- "Password"
    - Now supports passwords that contain spaces
        - `Condition1 = Password race as a ring!`
- "WetPlayer"
    - Now supports liquids that contain spaces
    - HOWEVER, it comes with the following caveats as part of the change:
        - The strictness level must be provided first.
        - You can't leave the strictness out. The previous default behaviour now requires STANDARD to be explicitly written.
        - `Condition1 = WetPlayer Standard Mega Mack` can be used, now.
2023-10-13 16:25:05 +01:00
toaster
f8de2cfc83 UC_PRISONEGGCD
Gamedata minor version was updated again.
(God this was a weirdly big amount of work and it's not even polished.)
- Condition1 = PrisonEggCD [Level that has to be unlocked]
- Approximately every 30 Prison Eggs destroyed, you get a shot at a Prison Egg Drop.
    - The only Prison Egg Drop implemented right now is an Alt Music CD.
    - Your [Wild Prize] is guaranteed to be selected only from conditions associated with levels that are unlocked!
- Only spawns in Grand Prix Bonus Rounds, for netsync and game design.
- The number is fuzzed. If you start the level with 0 Prison Eggs to destroy, it selects a random number of Prisons in the level to bust.
- If you miss the pickup (such as into a deathpit), you'll get another shot in the immediate next Bonus Round you play.

Also:
- The number of Chao Keys you start your gamedata with is now part of the header file, not buried in the wiping function.
- Removed the ACTUAL last object definition vestiges of the Emerald Hunt gamemode.
2023-10-12 21:12:08 +01:00
toaster
71a95b3096 M_BuildConditionTitle: Support menuttl
Example for menuttl "Controls":
- For Tutorial levels, show "The Controls Tutorial"
- Otherwise, show "CONTROLS" (allcaps)
2023-10-11 17:24:50 +01:00
toaster
2cc796a042 M_AssignSprayCans: Don't handle the prepended cans in reverse order
Was messing around with part-duplicating this code for Prison Egg CDs, and realised a corruption/overwriting bug if you had more freebie Spray Cans than the standard ones.
2023-10-11 16:11:14 +01:00
toaster
d784f6ad4a SECRET_ALTMUSIC
Restricts a map's alt music, in order of music definition.
Supports out-of-order discoveries!
2023-10-08 21:22:58 +01:00