- 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)
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.
So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
- Replaces `tutorialmode`.
- Forces gamespeed to Easy, with no POSITION.
- Laps are currently disabled as well, but this can be changed if necessary.
- Hides Free Play.
- Does not count as a played round (except for Chao Keys).
`tutorialmap` has also been removed. This will be replaced in a later commit with something that plays nicer with Ring Racers' existing systems.
- P_PreTicker ("defrosting") is dead. Levels now actually start on tic 0 instead of tic 2.
- Netxcmds are ran before G_Ticker, instead of after.
- All netxcmds are required to be processed before the level will finish loading (up to 5 gametics, to prevent any possible lock-up from malicious clients).
- Made titlemap + ceremony code more straight-forward by being able to set gamestate in G_DoLoadLevel directly
- Demos are only recorded on GS_LEVEL (fixes crash for ceremony + titlemaps)
- Added G_GamestateUsesLevel to encapsulate all checks for using level rendering
- Added GS_CEREMONY to wipedefs
- K_PodiumSequence just checks for GS_CEREMONY now (optimization)
The game can now properly go to the podium after GP
- Bots follow a slightly more strict path via waypoints
- Bots decide their starting waypoint path depending on their position. (The 1st place winner will start by chasing waypoint ID 1, etc)
- The map used for podium sequence can be decided via `PodiumMap = x` in MainCfg.
TODO:
- Camera work
- Add Lose / Win animation states when stopping at final waypoint
- Adjust physics so that the bots can follow the path more strictly in this mode
- Actually go to it after GP
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.
Also fixed some scary mix-ups in some of the Lua archiving code.
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
System for netsyncing unlocks, inspired by but with nowhere near as many moving parts as (STJr/SRB2!1756).
* `gamedata->unlocked[MAXUNLOCKABLES]` is duplicated to `netUnlocked[MAXUNLOCKABLES]` (or all `true` in `dedicated`
* New `local` boolean for M_SecretUnlocked
* Removed last vestiges of SRB2 special stage token code because it occupied the spot in the netsave we wanted to use.
* Correct typing of multiple `m_cond` functions that returned `boolean` constants as `UINT8`s.
- Make timelimitintics handled a bit more like gamespeed, encore, frantic, etc - update on mapload/starttime, not during gameplay
- Use default setting if can't change rules - this is a surprise tool that will help us later
- Have it properly update when adjusting gametype from the menu
- Cleaned up SV_StartSinglePlayerServer to do this
- Remove CV_SAVE to prevent time limit bruh moments
* 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...
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)
For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.