Resource icon

[Open Assets] Jugador's Map Script Collection (Tags, Fricfix, No Waterskips, KMP Respawns Handler) v4 (BouncyFloor.lua release)

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
I named my file(s) correctly (see Filename Conventions)
  1. Yes
These are miscellaneous scripts that help fix common problems with levels in Kart. Namely, these include being able to remove KMP Respawn Points (namely to make floating moving platforms viable as an element in modded levels, in servers that run KartMP), allow low friction to persist even when a player is in sneaker status (fixes "Ivo Slopes"), and allowing mappers to change elements of their level based on mods loaded.

The reason these are not separate releases, is because they're often one-off scripts I made to help fix other mappers' gripes with certain oversights with how the engine works, and in some cases I'm not willing to maintain them beyond the initial release. Think of it, ultimately, as a "community resources" script pack by me.

Context Tags​


kart0081.gif
kart0082.gif

Vanilla vs. Hard Speed, Slipstream, No Acrobatics

Context Tags allow players to change map elements based on mods loaded. This is done by checking if a console value (or CVar) is set to a specific value, and if so, it will trigger a linedef executor with a specific tag.

The map Lua headers to use are the following, where the # is a number starting with 1, so you can add multiple of them:
Map Lua HeaderExplanation
Lua.ContextTags_CVarsToCheck#Defines which console variables (cvars) to check for.
More than one can be checked with a comma-delimited list.
Input example: kartspeed,slipstream_enabled,ac_active
Lua.ContextTags_ValueToMeet#Optional but should not be skipped for clarity's sake.
Defines which values should the cvars be compared to.
You are strongly suggested to use numbers instead of strings for comparison purposes.
More than one value can be checked for with a comma-delimited list.
Input example: hard,1,0

Assuming there's more cvars than values:
  • If no values are set, 1 is assumed as every value that each cvar should have.
  • If at least (more than) one is set, the first value will be assumed to be met for every other cvar.
Lua.ContextTags_AllCvarsTrue#Optional. Defines if every value defined for each cvar must be true.
Otherwise, at least one value must be true for any cvar for executors to trigger.
The script only checks if this header is defined, and will apply if it does.
Input example: any cute text you wish for it to be here, could also be a comment too.
Lua.ContextTags_ExecuteTags#Defines which tags to execute if the cvar(s) had their value(s) met.
More than one can be executed with a comma-delimited list.
Input example: 5,6,7,8,9

It's possible to debug if CVars being used for Context Tags are working properly without loading the mod whose CVars come from, using the ctags_force CVar, and then writing the name of the cvars delimited by a comma as defined in the examples. Also, before release, be sure to turn off the debug feature by setting debug variable in the code to false. See also the example wad, ContextTags_Demo.wad.


Friction Fix (fricfix)​


kart0073.gif
kart0074.gif

Fixed vs. Unfixed

Friction Fix is straightforward - through setting it on the level header, or by specifying it in certain friction linedefs, you can make friction apply on players using Sneakers, Grow, Invincibility or Hyudoro, or in other cases, under certain mod effects like Acrobatics boosts. This effectively allows the players to go over the speed limit when they shouldn't be. when they are under the effects of these changes.

In order to toggle this effect for all Floor Friction linedefs, pack this script into your wad, then add the following to your level header:
Code:
Lua.frictionfix = true
In order to toggle this for specific low friction linedefs, set the [12] No Tails flag on whichever the fix should apply to. See also its respective example wad, FrictionFix_Example.wad.

No Waterskips​

No Waterskips is straightforward - it just doesn't allow waterskipping in your map, ever.

In order to toggle this, pack the nowaterskip.lua script into your wad, then add the following to your level header: Lua.nowaterskip = true.

Wacky Workbench's Spring Script​

This is the script used for Dig Pack's Wacky Workbench spring effects.

Setup:
  • Mark an in-level sector with Sector Special 128 (Check for Linedef Executor on FOFs), give it a tag number.
  • Make a 1 FU height FoF using linedef 223 (Intangible, Invisible), ground level (there's a ground check, so the height doesn't actually matter). Its sector special needs to be Trigger Linedef Executor (Pushable Objects). Give the FoF control sector a new unused tag, and the FoF linedef should be tagged the same as the previously mentioned in-level sector.
  • Make a new control sector, with linedef 300 (Continuous) and linedef 443 (Call Lua Function). Point (tag) the Continuous linedef to the FoF sector.
  • Call Lua Function's front upper texture needs to be BOINGFLR.

ParameterExplanation
X Texture OffsetStrength of the upward boost.
Back Upper TextureName of sound (without DS or _sfx).
No Knuckles flagIf toggled, enables spring status.
No Sonic flagIf toggled, enables anti-softlock.

KMP Respawn Handler​


KMP Respawn Handler allows the removal of KMP Respawn Points until a player reaches the next level checkpoint, such as their current one, one specifically set, or until it is toggled on or off - very useful to prevent jumps from breaking among other things, such as preventing KMP Respawns from turning easter eggs into softlocks. This is done using Call Lua Function linedefs, and debug can be enabled through the nokmppoints_debug console variable.

Lua FunctionExplanation
NOLATPNTTHISPlayers who stand in the tagged sector will have their current checkpoint devoid of KMP Respawn Points. Falling off once removes the effect until they touch the sector again.
NOLATPNTONESame as NOLATPNTTHIS, but you can use the linedef Tag to devoid a specific checkpoint from KMP Respawn Points. Players must still touch the tagged sector.
NOLATPNTTOGGLEAllows you to toggle KMP Respawn Points from a player who touches the sector, on and off. In addition, checking the [14] Bouncy Wall flag forces removal of KMP Respawn Points, while checking the [15] Transfer Line prevents their removal.

Debug can be enabled through nokmppoints_debug to see if it is working. See also its example wad, KMPRespawnManip_Example.wad.

Conclusion​


I hope these scripts are found useful overall by Kart mappers. They were semi-public before, but I'm hoping a proper public release will improve the overall level quality. For any questions and problems, let me know on the thread, or on Discord (JugadorXEI#1815).

Thanks to Lat for their blessing on the KMP Respawn Handler script, and also thanks Fayt, Diggle, ChaoBrother, and Eldog for extended testing and feedback.

Please enjoy!
  • Cool!
Reactions: Saturn Ross
Author
JugadorXEI
Downloads
686
Views
3,188
Extension type
zip
File size
27.2 KB
MD5 Hash
2106e793d541c29331034be28deb8924
First release
Last update
Rating
3.00 star(s) 1 ratings

More resources from JugadorXEI

Share this resource

Latest updates

  1. v4 (Wacky Workbench's Bouncy Floor)

    Releases the Wacky Workbench's Bouncy Floor script publicly because people don't know it exists...
  2. v3 - No Waterskip Script

    The official release of the nowaterskip.lua is here. This script allows you to disable...
  3. v2 - I hate hash collisions edition

    Context Tags: Changed contexttags_force to ctags_force due to a string hash conflict with KartMP...

Latest reviews

Welcome to releases!
Upvote 0
Back
Top