Commit graph

33 commits

Author SHA1 Message Date
Antonio Martinez
6a2568e7a7 Foes in Match Race 2025-08-04 04:23:37 -04:00
Ashnal
144e2be262 More renaming 2025-05-18 14:30:46 -04:00
Ashnal
bf6a5babfb Reworks changes to K_CalculateGPRankPoints to account for the 125+10 max for points
and untramples the implementation
fixes gp results screen totals

I really need to refactor lappoints to be named exppoints or something later
2025-05-18 14:30:45 -04:00
Ashnal
8242cb89f0 Replace GP points with exp
update GP results screen lap patches with exp patches
2025-05-18 14:30:45 -04:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
toaster
2dc8ce330a Review
- Update SAV_VERSIONMINOR so 2.0/2.1 cup backup files won't load
- Move specialDamage to grandprixinfo_t (from rank_t, per Sal review)
2024-05-05 20:36:43 +01:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
Sal
0675a4e527 Tally screen 2023-09-09 05:27:55 +00:00
James R.
172c3861f4 K_SetBot: check spectator status on first round of GP
Fixes map warp to Prisons or Sealed Stars, since these
create a 1-round GP.
2023-09-08 03:24:20 -07:00
toaster
e372d348cd Live Event Backup
Associated menu stuff is rough and unpolished, but it's 1am for the author of this commit.
- Activated for this session by either of the following Passwords.
    - `savetheframes`
    - `savetheanimals`
    - The idea is that if Ring Racers were ever ran at a GDQ, runners would swear their alliegance to a particular Metroid routing at the startup stage, because I think it's funny and cute.
- A live event backup is created/overwritten on non-cheated grandprix level change.
- It's wiped on reaching the podium.
- When hitting PLAY on the main menu, if a live event backup exists, make a Menu Message.
    - If you hit A, turn live event backups on for this session, and load the backup.
    - If you hit B/X, delete the backup and proceed to character select.
        - Done this way to avoid cheating a different character to the end of GP.
- Unlike the (maybe a little over-)engineering of ringdata.dat, liveringbak.bkp is streamlined as all hells and has very little recovery for differing file lists.
2023-06-25 23:44:37 +01:00
toaster
19ef96351a roundqueue
A general purpose system that permits cacheing of GP progression in one place, but which permits future expansion and brings Online GP a little closer to reality.
- Stores a bunch of levels, gametypes, encore state, and restricted-by-rank-ness in sequence.
    - Initialised on GP cup select.
    - FUTURE WORK: Open to being initialised by other methods
- Digests its way through that sequence as maps are completed.
- Stores round number instead of `grandprixinfo`.
- Map commands as sent over the wire have been adjusted.
    - Sends round number and size of/position in roundqueue.
    - Now figures out GP Event Type from gametype.
        - Can be swung in the direction of a Special Stage with a hint flag.
        - This hint flag replaces "fromlevelselect", which was functionally vestigal.
2023-04-11 17:18:27 +01:00
Chromatian Keiske
77117bbc9f Merge branch 'fix-retry' into 'master'
Fix retry life/rank farming + fix buffered retry

Closes #475

See merge request KartKrew/Kart!1083
2023-03-25 05:50:06 +00:00
James R
f5f85cc3e4 Refactor lives and rank increase to occur at level end transition, not when the player finishes
Fixes exploiting retries after finishing in good standing
to farm lives and rank. These are now applied when you can
no longer retry.

Extra life sound effect still plays as soon as you finish
the race.
2023-03-22 20:49:33 -07:00
toaster
d2c36c952a Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_grandprix.c
#	src/k_grandprix.h
2023-03-07 19:37:46 +00:00
Sally Coolatta
23a00b1d00 Move GP ranking data to grandprixinfo 2023-03-06 18:26:08 -05:00
Sally Coolatta
c61e017c38 GP rank cleanup
- Move ranking to its own file.
- gpRank (the variable) -> g_gpRank
- gpRank (the struct) -> gpRank_t
- Functions that worked on the global directly now take a pointer to a struct
- Fixed total ring increment
- Fixed final lap's lapPoints being discarded
- Capsules are now added when exiting with the rest of the stuff
2023-03-06 18:25:14 -05:00
Sally Coolatta
55de982fa3 GP ranking
Needs balancing + intermission, but mostly functional
2023-03-06 18:25:14 -05:00
toaster
0c75c40060 Rework how Bots handle their skin availabilities
Before we can add extra unlock features, we need to make sure we're not building on a house of sand.
- R_SkinUsable: Use Net Unlock system if playernum is -1
- R_BotDefaultSkin: Move to r_skins.c, cache skin search
- R_GetSkinAvailabilities: Use Net Unlock when called for bots (and always permit R_BotDefaultSkin)
- Got_AddBot: Call R_GetSkinAvailabilities for summoned bots to guarantee sync status of available skins
- K_UpdateMatchRaceBots: Tidy up to match grand prix bot skin selection system, hiding server-locked skins and defaulting to R_BotDefaultSkin if you don't have enough unlocked for the remaining player slots
2023-03-05 18:06:09 +00:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
toaster
ca2ecf6e9f Add "allowdemos" option to K_CanChangeRules()
It's been used interchangably as "this is a singleplayer gameplay context" and "This is a no cvar changing context". This addition repairs some behaviour which might have been inconsistent between netgame and netreplay.
2022-10-15 15:15:22 +01:00
toaster
f281f47c6f Support alternate gameplay events during GP
- Implementation details:
    - grandprixinfo.eventmode is the reference point
    - All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
    - You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
    - Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
    - You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
    - Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
   - Timelimit starts at 20 seconds.
   - Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
   - WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
   - Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
2022-10-14 18:34:43 +01:00
toaster
13c8d45764 Rework bot skin randomisation
- Instead of picking over numskins and adjust the number if it picks an already used skin, build and shuffle a list of allowed skins and pick over that instead.
- Fixes some issues with increased weighting towards the skins immediately after your rivals' skins.
- Use PR_RULESCRAMBLE instead of PR_UNDEFINED.
- Why am I doing it in this branch? I'm getting re-acquainted with how bots are handled between matches in advance of disabling them for bonus events without losing or corrupting data.
2022-10-11 18:42:04 +01:00
Sally Coolatta
358cc9f215 Bad function declaration 2022-04-02 15:24:19 -04:00
Sally Coolatta
5ffba0a678 review 2022-04-02 15:24:18 -04:00
Sally Coolatta
af3499c024 Make bots RETIRE when they NO CONTEST
They get replaced with another bot when they NO CONTEST, swapping their skin and resetting their difficulty & points.
2022-03-31 18:21:03 -04:00
Sally Coolatta
136bb1d252 Add K_CanChangeRules, and start a "single session" GP when warping to a map in single player 2020-06-06 19:45:13 -04:00
Sally Coolatta
42419f7bc6 Add comments for functions 2020-06-04 17:14:14 -04:00
Sally Coolatta
47c2c875d5 Increase bot difficulty every match based on placement, implement rival tag
Rival tag does not have an in-game indicator, but it is there & it gives the bot better odds
2020-05-14 02:18:32 -04:00
Sally Coolatta
6c8d67ab86 Give bonus points to 1st, 2nd, and 3rd place. 2020-05-13 23:15:57 -04:00
Sally Coolatta
fa5fccffc5 Implement lives system
Lose a life & restart the current race if you place below the top half. Lose all of your lives, and you get kicked to the title screen.
2020-05-13 02:14:39 -04:00
Sally Coolatta
e2d95ae9c1 Fake results for bots that didn't get to finish in time 2020-05-09 23:08:11 -04:00
Sally Coolatta
4ae81ff236 Add menu for selecting cup & other options 2020-05-09 20:03:14 -04:00
Sally Coolatta
4a3262da41 Initial GP commit
Has a rudimentary option in the menu, which spawns the specific bots & spawns you on Green Hills in singleplayer.
2020-05-09 03:42:51 -04:00