Commit graph

65 commits

Author SHA1 Message Date
NepDisk
bda7d26a0f Port basic lap anticheat for new waypoints from RR 2025-03-09 20:03:10 -04:00
GenericHeroGuy
8a51847fb1 Y'know what? Just make these functions one-based, sheesh 2025-03-03 21:18:07 +01:00
GenericHeroGuy
ebea1395d4 Map number compatmode 2025-03-03 01:28:51 +01:00
NepDisk
b0bbf07bdb Custom gametype and gametyperules additions
Many new options have been added.

You can now specify "menucolor" when creating a gametype. This accepts a V_ colorchar flag (IE V_PURPLEMAP) and will be used to color hud elements in menus and on the HUD.

Encore is now controlled by GTR_ENCORE. This allows for custom modes that don't accept encore.

Itemodds are now controlled by GTR_RACEODDS and GTR_BATTLEODDS respectively. If neither is specified on gametype creation, completely random items will be rolled.

General GTR_FREEROAM adjustments
2025-03-02 11:41:30 -05:00
NepDisk
c8e78711a6 dont throw a warning about addons with custom gamedata
just ignore it
2025-02-25 14:15:19 -05:00
Alug
f9a2623773 make game use seperate save when addons are loaded
so you can record attack and it will also keep saving to statistics
also added a few things it now keeps track of
TODO: unfuck the statistics page and add a 2nd one perhaps? due to space reasons
menucode is hell
2025-02-25 14:04:02 -05:00
toaster
1b53d6b4bf Fix special map usage
- Free header on `CLEAR LEVELS` even if it's `tutorialmap`
- `titlemap` infinite recursion prevention Z_Free's instead of leaking
2025-02-24 22:45:26 +01:00
NepDisk
1a3295f670 More warning fixes, restore old pause, No void in 3p splitscreen 2025-02-23 21:45:33 -05:00
NepDisk
0d6aad827b Begin work on making custom lighting optional 2025-02-21 16:51:56 -05:00
toaster
4e559aed87 Level and cup header information: Hashing for referencing by name
Foundational assistive work.
Also guarantees a consistent cup name length in memory, as some places read/wrote 15 bytes, and some places read/wrote 16 bytes. We settle on the latter (including null terminator) for the broadest backwards compatibility.

G: partial merge, missing lots of cup stuff
2025-02-12 01:50:46 +01:00
toaster
2c3fc38f27 "Monitor" parameter for cups
- Defaults to 1, AKA Sonic 1/2 monitor
- Set to 2 for Sonic 3k monitor
- Supports a range of 1-9 and A-Z
- Permits fine-grained rapid-prototype stretch goal Chaotix monitor stuff later in development
2025-02-12 01:24:47 +01:00
GenericHeroGuy
4697a69bd9 Ignore old SOC map header fields 2025-02-11 21:33:12 +01:00
toaster
342f6294eb Kill spstage_start and spmarathon_start 2025-02-11 17:30:03 +01:00
toaster
2c7e7b8aa8 Fix replacing cups' map lists not properly reassigning the cachedlevels 2025-02-11 17:22:34 +01:00
toaster
1475feb734 Refactoring ahoy
* Instead of doing constant G_MapNumbers when finding the relationship between maps and cups...
    * Add a cache of level IDs to cups, to go with the strings.
    * Add a cache of the cup pointer to maps, so we don't have to search through all cups to find our map. (done in P_InitMapData)
    * Pre-emptive work: G_IsSpecialStage and P_GetNextEmerald now reference cup data instead of a hardcoded ID set.
* Remove a bunch of old stuff from mapheaderinfo_t/associated, and reorder what stays
    * Countdowntimer? 💥
    * Startrings? 💥
    * sstimer/ssspheres? 💥
    * forcecharacter? 💥 (distinct from forceskin)
    * interscreen? 💥
    * sstage_start/end and smpstage_start/end? 💥💥💥💥
    * You've been blocked
* G_MapNumber now returns a special NEXTMAP_INVALID if not found, for more consistent reference.
* Incorporate a good chunk of the `edit-headers` branch. Can't clear maps individually because of the new restrictions on sequential mapheaders, but we can add a "disable in vote screen, not even for map hell/archive" flag to a map at some future juncture for equivalent functionality...
2025-02-11 17:22:34 +01:00
toaster
4d5cfc38bb NUMMAPS is dead
Dynamically allocated mapheaderinfo. 1035 reserved slots in a google doc is a thing of the past
2025-02-11 15:38:43 +01:00
toaster
07c1fbf426 Move two of the three remaining NUMMAPS arrays part of the mapheader_t struct
- mapvisited and recorddata_t (previously mainrecords)
- Changed how gamedata is saved and loaded
- Change the versioncheck (funny hex provided by chengi) AND call it `developringdata.dat` in develop builds
- Fix a bunch of off-by-ones in condition and emblem data
ALSO, for Time Attack:
- Fix menu not showing off your times
- Now save times even when gamedata modified, since the menu didn't care (come back to it?)
- Don't save times or do intermission screen if the Capsule Attack ended because you lost all your bumpers
- Fix a crash adding ghosts in Capsule Attack
2025-02-11 03:47:36 +01:00
toaster
88ae398eea Rework nextmap to be automatic
- Refactor significantly (now has its own func, `G_GetNextMap`)
    - If gametype uses cups, iterate through cups to find the current level, then grab the next valid level
    - If not, get the next valid mapheader for your gametype
    - SOC `nextmap`/`marathonnext` is not just deprecated but REMOVED
    - Hide the NEXTMAP_ constants again, but leave support dummied out for if we have them publically accessible again
- Also get rid of a bunch of OTHER mapheader stuff we're never gonna use
    - NiGHTS Grades? NOPE
    - Vanilla titlecard patches? NOPE
    - Boss music fadeout/replacement? NOPE
    - Select Heading? NOPE
    - You've been blocked.
- Don't show maps without lumps on the level select list
- this is me being petty, but making it NOTIMEATTACK in SOC instead of TIMEATTACK so we can reconsider the maps with/without them.
2025-02-11 02:24:01 +01:00
toaster
4b12f8a729 Rework special nextmap events.
- G_MapNumber now handles special NEXTMAP_ nextmapspecial_t constants that exist at the end of the available type.
- Cleanup of G_DoCompleted
- Add bounds checking to the various SOC maincfg map starts (spstage_start, etc)
- Add lump checking to titlemap behaviour
2025-02-11 01:52:05 +01:00
toaster
b92c125928 I_Error in all situations where mapheaders were previously allocated outside of SOC.
Also:
- improved error prints for SOC condition definitions
- improved bounds checking to use `nummapheaders` for iterating over mapheaderinfo
There are still situations that use NUMMAPS like mapvisited, randmapbuffer, etc, which need to be addressed before merger.
2025-02-11 01:52:05 +01:00
toaster
78fb4df054 Remove test strtok print 2025-02-11 01:52:04 +01:00
toaster
6a2553cf57 Fix cups.
* Required an adjustment of everywhere using G_MapNumber to return the raw header number, instead of off-by-one ala gamemap.
    * Fixing gamemap is a viable improvement for a future commit, but this commit is already pretty big.
    * Remove SCANTHINGS, since it used G_MapNumber and didn't work with long map names OR virtres anyways.
* Support freeing new information in CLEAR LEVELS maincfg event, since I tried to use that to test cups.
* Make Patch_Free's usability match Z_Free -- passing NULL is permitted and a no-op.
2025-02-11 01:52:04 +01:00
GenericHeroGuy
a78bfe2785 The rest of the changes from de1f67b 2025-02-10 21:56:07 +01:00
NepDisk
954156cd1b Long Map Names Port pt 2. 2025-02-05 17:53:53 -05:00
NepDisk
3350b02cc8 Long Map Names Port pt 1. 2025-02-05 17:46:21 -05:00
NepDisk
a90dce0c71 make MAXSKINCOLORS return numskincolors in lua compat mode
Should fix the out of range errors that can occur in some lua.
2025-01-30 17:28:42 -05:00
GenericHeroGuy
ec5d7156bd Fix skinsounds, MAXRADIUS, inaccessible colors 2025-01-17 16:53:14 +01:00
GenericHeroGuy
d64ae0c915 No more dummies 2025-01-17 15:21:20 +01:00
NepDisk
7f355a35ca cherrypikcs from 'miniladder-16' 2025-01-09 13:19:48 -05:00
NepDisk
4b1324da69 Remove Battle capsule stuff and turn it into Item Breaker
You have to smash every itembox in a map as fast as you can. When you mash you get a pogospring and waiting gives a sneaker
2024-12-17 00:24:20 -05:00
Sally Coolatta
ce7d345e44 Level_SetWeather: Use str instead of int 2024-10-04 13:23:59 -04:00
toaster
bb79940893 COM_Exec_f: By default, insert into command buffer
- Resolves KartKrew/RingRacers#281 under standard operation
- Add `-immediate` parameter for previous, `wait`-ignoring behaviour
    - Used by configfile, EXECCFG
2024-09-20 18:52:18 -04:00
Wumbo
0dbecfdcf3 Improve presentation of followers on player setup screen
- Animation speed is now framerate-independent
- Render height is no longer all over the place
- Ground followers now bounce
2024-09-12 22:37:28 -04:00
Wumbo
45304f5c3d Handle follower colors better
- Default color definitions are now parsed properly
- Fallback color value is now default color instead of player color
- Player setup now renders follower with right color

Selecting the first follower in the list is currently broken, will
fix later
2024-09-12 01:34:56 -04:00
NepDisk
1085c6ceb0 Implement blan folder and reimplement walltransfer
Wall transfering can now be used by enabling cvar BG_forcewalltransfer or putting WALLTRANSFER into your map header
2024-09-10 22:36:45 -04:00
Oni
8012a21070 Merge branch 'alt-music' into 'master'
Alt Music

See merge request KartKrew/Kart!915
2024-09-07 13:57:13 -04:00
NepDisk
0d62fe65bc Fix map load crash 2024-09-05 16:04:24 -04:00
Oni
089fd65f37 Merge branch 'encore-directional-lighting' into 'master'
Add encore variants of LightContrast, LightAngle and SpriteBacklight to level header

Closes #593

See merge request KartKrew/Kart!1388
2024-09-05 15:51:01 -04:00
James R
99c05156f6 Sprite directional lighting, add SpriteBacklight option to level header
- Sprites have directional lighting, like walls
- For normal sprites: contrast is much stronger than walls
- Papersprites look the same as walls

- SpriteBacklight option in level header weakens the contrast for sprites only
  - SpriteBacklight subtracts from LightContrast
  - E.g. SpriteBacklight = 0 would let it match LightContrast
  - E.g. SpriteBacklight = 60 would make the contrast much weaker
  - Negative values make the contrast stronger
2024-09-05 15:18:50 -04:00
Hannu Hanhi
6367af6cd7 LUA_EnumLib optimizations for constant value access
- constants are stored into _G after first use

- made LUA_EvalMath's dedicated Lua state permanent so it can also benefit from these optimizations
2024-08-01 03:11:20 -04:00
hayaunderscore
94f6206c87 Expose followers[] and follower_t to lua 2024-08-01 01:58:04 -04:00
Sal
d91aa69677 Merge branch 'pivot-default' into 'master'
Upgrade SPRTINFO -- default pivot offsets + wildcard

See merge request KartKrew/Kart!691
2024-07-31 03:16:08 -04:00
NepDisk
f611554cbc Assorted Changes 2
Restored old titlescreen, generally made the game closer to v1 gameplay wise and visual wise
2024-07-30 18:00:37 -04:00
NepDisk
ec09f8a7e5 Make legacy checkpoints work along with respawn 2024-07-30 04:26:40 -04:00
NepDisk
64b36b90ae Use kart titlecard, redo fade and fix grow canceling 2024-07-29 15:38:06 -04:00
NepDisk
e2037f149e Fix skyboxes, and make butteredslopes nice 2024-07-29 02:23:54 -04:00
Sally Coolatta
4c3f89cdf7 Allow freesloting & editing precipprops
Allows for custom weather types.

In SOC:
```Freeslot
PRECIP_GROOVY

Weather PRECIP_GROOVY
Type = MT_PARTICLE
Effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING```

In Lua:
```freeslot("PRECIP_GROOVY")

precipprops[PRECIP_GROOVY] = {
    type = MT_PARTICLE,
    effects = PRECIPFX_THUNDER|PRECIPFX_LIGHTNING
}```

Then in level header, simply set `Weather = PRECIP_GROOVY`.

Other properties are part of the object itself:
- Falling speed is set as the object's speed
- Sound ID is set via the object's SeeSound
- Sound frequency is set by the object's Mass.
2022-05-31 09:03:06 -04:00
Sally Coolatta
b6ed17d9fc Allow adjusting map contrast 2022-05-24 23:04:48 -04:00
Sally Coolatta
4b70a64b3f Ground follower mode 2022-05-23 15:51:00 -04:00
Sally Coolatta
0e60a3ef26 Increase default horzlag to 3
This value is closer to how the old value felt before the tracking was improved.
2022-05-23 04:10:20 -04:00