SMBX2 Beta 4 (2.0.0.b4)

Released January 2020

This update fixes several issues with the SMBX2 Beta 4 preview builds and adds additional functionality.

This update includes changes that may cause behavioural inconsistencies with levels made on preview builds or Beta 3.

This version is the next stable release of SMBX2 and is sufficient for releasing episodes.

We will be developing proper documentation throughout the coming months. The docs button at the top will redirect to the new documentation once it's available.

If you have any questions, please contact us on the Codehaus Discord server.

Updates

Yellow Highlighted changes may impact how previously created levels behave!

Orange Highlighted changes denote behaviour that may still persist despite our fixes. Please report back if you encouter these!

Patch 1 (2020-02-11)

  • Meta
    • Improved load times (especially on all loads past the initial one each session).
    • Improved gif recorder performance.
    • Improved Test Mode Menu performance.
    • Fixed an error where the game would constantly print debug messages due to a missing logs directory.
    • Fixed a bug where music playback sometimes failed to work on the overworld.
    • Fixed a bug where autostart.ini would prevent the game from loading at all.
    • Layers set in motion by Lua will now pause properly, preventing desyncs in movement loops.
    • Attempted to fix an issue where sometimes extra- and section-settings were ignored in random editor sessions. Please report back if this persists.
    • Fixed an error relating to the use of gl_Vertex on Intel GPUs.
    • Fixed an error relating to the use of surfdata on certain Graphics Cards.
    • Attempted to fix an error relating to the use of pow(int, int) on certain Graphics Cards. Please report back if this persists.
    • Made music pause during focus loss more consistent.
    • Fixed a bug where resetting section music to default would fail to play any music.
  • Controllers
    • The controller code will no longer inexplicably crash the game when using certain older CPUs.
    • Fixed a bug where the Hori Switch Pad controller would go to sleep when receiving instructions to turn the "Home" LED on.
  • Episodes
    • Added necessary graphics for the Demo Stages.
    • Removed unfinished Demo Stage.
    • Fixed an error that happened when loading the Demo Stages' overworld.
    • Loadscreens will no longer crash when registering new graphics.
    • Fixed an error related to levels like "Dream World" and "Forest House" in the Princess Cliche and an Invasion 2 Bonus level (Error pointed to particles.lua).
  • Blocks
    • TNT and Nitro blocks will no longer error due to an oversight with the Crash Switch Block.
    • Slime Blocks no longer animate oddly.
    • Certain blocks with contents (Brittle Leaves, Kirby Blocks, Breaking Dirt etc.) will no longer crash the game when their contents are to be revealed.
    • Certain blocks (Kirby Blocks, Breaking Dirt) can no longer be destroyed by fireballs and other NPCs from above. Projectile-spawned Birds and other projectile-spawned NPCs can still hit them from the side or below.
  • NPCs
    • Cobrats don't mind getting picked up anymore.
    • Mutant Vines have grown more tolerant towards sequences that include bible verses.
    • Wigglers have sorted out their anger issues with Klonoa. They're friends now.
    • Sent a friend to Snake Block's home to wake them up. Friend reported a success.
    • Snake Block was so taken aback by the sudden wake-up call it forgot to properly move while offscreen. This is now fixed, too.
    • Snake Block has levelled up! New Skill: Interaction with the State Toggler BGO. Switches between "Eat" and "Create" behaviour.
    • NPCs that use the direction field in special ways will no longer have it be changed by regular means.
    • Mutant Vines that have been toggled to "pass through" blocks with the Collision Toggler BGO will now propagate this property to siblings upon splitting at a multi-direction intersection.
    • The Torpedo Ted's grip will no longer crash the game when an invincible player runs into its buddy, the Torpedo Ted.
    • Audio, Light and Particle Source NPCs will pause/hide when hidden now.
    • Fixed pausing-related issues with Mega Shroom.
  • NPC Config
    • Added staticdirection (global): Forces changes to the NPC's direction to be done explicitly.
  • Effects
    • Possibly fixed an error related to the spawning of an inhuman amount of effects. Please report back if this persists.
    • Fixed a visual error with effects using the AI_STOMP template.
  • Characters
    • Invincible players travelling through Clear Pipes will no longer look like a disjointed mess.
    • Bullet Bills tossed by Klonoa have grown a bit more tolerant towards vertical movement.
    • Bowser's Steed, the Clown Car, can now be mounted by Bowser, the Clown Car's Canonical Owner.
    • Certain characters will longer crash the game in the Test Mode Menu.
  • Backgrounds
    • Mystic Cave Background now renders custom graphics properly again.
  • Launcher
    • Matched version number to the SMBX2 internal version number.
    • Improved update notifications.
  • Editor
    • The editor will no longer crash when switching sections.
    • Removed unfinished NPCs from the editor, for real.
    • 'Dummy' Items are now known as 'Reserved' Items to reduce confusion.
    • Fixed an issue where the editor would ask SMBX to start the game using Character ID 0.
  • Scripting
    • Fixed a bug in animatx2.

General

  • Meta
    • Mario Challenge now works for lvlx files.
    • imtiredofallthiswalking cheat works again.
    • Score is now capped like it was in 1.3.
    • The limit for events and layers has been increased from 101 to 255.
    • Fixed a bug where end game events would never be executed, causing all episodes to be effectively unbeatable.
    • Added template files for achievements, block-n.txt and block-n.lua.
    • Sound effects can now be dropped into a subfolder named "sound", and automatically replace vanilla sound effects without sounds.ini.
    • Fixed a bug where some effects would not automatically resize.
    • Fixed a bug where layers would move at a tiny speed after being set to stop moving.
    • Removed the F2 code preview. F2 will now list currently loaded Lua files instead.
    • When hardware OpenGL support is insufficient to run the engine, there is now an automatic fallback to a software OpenGL renderer. This autodetection can also be overriden by command line argument or the luna.ini configuration file.
    • Controller support has been rebuilt, allowing for more stable controller support and on-the-fly controller switching.
    • The editor testing pause menu now has access to a "Calibrate Controller" menu, that allows you to quickly remap your controller inputs.
    • Explosions now use slightly better hitbox calculations when using .lvlx files (.lvl files will still use the old collision implementation for compatibility).
  • Launcher
    • Redesigned the launcher layout to minimize required button presses.
    • The launcher is now displayed in 16:9 resolution by default.
    • The launcher's default size is now relative to the short edge of the monitor it's opened on by default.
    • The launcher.ini config file can now override the starting resolution of the launcher, for example, using "resolution=800x600".
    • The launcher will now remember which tabs you had open when it was last closed.
    • Added a new button in the lower left that displays the selected episode's achievement center.
    • Added a new button in the lower right that, when clicked, opens an email form for submitting bug reports.
    • Added a new button in the lower right that, when clicked, allows you to open a .lvl or .lvlx file directly, without loading either an episode or the editor.
    • Increased the maximum number of save slots per episode to 32,767.
    • Redesigned the save slot selection menu.
    • Fixed a bug where it was impossible to enter controller input.
    • You can now configure what kind of update notifications you would like to receive.
    • Fixed the "title" field in the launcher json.
    • Added a new field to the launcher json: "allowPlayerSelection". If false, the player selection field on the episode launcher page is hidden. The player defaults to the first allowed player index.
    • Added a new field to the launcher json: "allowSaveSelection". If false, the save slot selection field on the episode launcher page is hidden. Useful for episodes that would like to handle save slots internally.
    • Added a new field to the launcher json: "collectible". A string field that contains the name of the collectible item in the episode. By default, this value is "Star".
    • Added a new field to the launcher json: "collectibles". Can optionally be set to define a plural to the collectible value. By default, this value is "Stars".
    • Added a new field to the launcher json: "starIcon". Can optionally be set to define an icon representative of the episode's collectible.
    • Added a new field to the launcher json: "progressDisplay". Can optionally be set to "percent" to display episode progress as a percentage rather than a star count.
    • Added a new field to the launcher json: "maxProgress". Can optionally be set to use a custom progress measure for this episode (measured against Progress.progess, set in Lua).
    • Added a new field to the launcher json: "customProgress". Can optionally be set to true in order to force the launcher to measure progress with Progress.progress (not needed if "maxProgress" is already set).
    • Added a new field to the launcher json: "noAchievementBorders". Can optionally be set to disable the border around achievement icons in the achievement centre for this episode.
    • Custom episode launcher pages will now automatically populate HTML elements with certain classes.
    • Added a new automatic page element class: "_stars". Will display the number of stars in (or max progress for) the episode alongside their icon or name. Will not display if no stars or max progress setting were found.
    • Added a new automatic page element class: "_starsIcon". Will display the icon or name of the star collectible for the episode.
    • Added a new automatic page element class: "_starsCount". Will display the number of stars in (or max progress for) the episode.
    • Added a new automatic page element class: "_starsContainer". Will disappear if no stars or max progress setting were found in the episode.
    • Added a new automatic page element class: "_credits". Will display the episode credits defined in the world file. Will not display if no credits were found.
    • Added a new automatic page element class: "_creditsContainer". Will disappear if no credits were found in the episode world file.
    • Added a new automatic page element class: "_episodeIcon". Will display the episode icon.
    • Added a new automatic page element class: "_episodeTitle". Will display the name of the episode.
  • Editor
    • Fixed a bug where custom sound effects would sometimes not play in Lunatester.
    • Improved various editor descriptions.
    • Level properties: Added an "Appears in Mario Challenge" checkbox.
    • Level properties: Added a flag and number field for the configuration of a level-wide time limit.
    • Level properties: Moved greyed-out fields to "WIP" tab. Currently unused.
    • Section properties: Added configuration for per-section darkness in the editor.
    • Section properties: Added configuration for per-section weather effects in the editor.
    • Section properties: Added configuration for per-section screen overlay effects in the editor.
    • Section properties: Added configuration for per-section beat timers used by Blinking Blocks in the editor.
    • Section properties: Added vertical wraparound.
    • Warps: Added portal warps (instant warps that retain momentum).
    • Improvements to the Test Mode Menu.
    • Waterfalls now render behind sizables, like they do in the game.
  • Scripting
    • ExpandedDefines lists are now automatically populated from config fields. Deprecated registerDefines functions.
    • Adjusted draw event order to ensure camera is always properly positioned during onDraw, including on the first tick.
      Previous OrderNew Order
      onTickEndonTickEnd
      onDrawonCameraUpdate(1)
      onCameraUpdate(1)onCameraUpdate(2)
      onCameraDraw(1)onDraw
      onCameraUpdate(2)onCameraDraw(1)
      onCameraDraw(2)onCameraDraw(2)
      onDrawEndonDrawEnd
    • timer.lua is now globally loaded in code as namespace Timer.
    • progress.lua now exposes global functions through the namespace Achievements.
    • paralx2.lua is now globally loaded in code as namespace Background.
    • Global namespace Routine now exists as a replacement to eventu.lua.
    • Progress.progress can now be set, which allows for custom progress measurements to appear in the launcher.
    • Progress.maxProgress has been added as a read-only field. This is only set if the "maxProgress" field is set in the launcher.
    • Progress.savename can now be set, which allows save files to appear named in the launcher.
    • CamLock now works on the world map.
    • Calling Audio.MusicChange will no longer hard-reset the music volume.
    • Misc.multiResolveFile can now be used to resolve multiple file options at once. This is useful if the same file could use multiple filetypes, or could be located in optional subfolders.
    • Misc.saveSlot can now be used to get the current save slot number.
    • Misc.episodeName can now be used to get the current episode name.
    • Misc.richDialog can be used to display selectable text with rich text formatting in a dialog window similar to Misc.dialog.
    • Level.format can now be used to get the level file format (either "lvl" or "lvlx").
    • New effects' spawnBind[X/Y] and [x/y]Align properties work as expected now. Double-check the alignment of your custom effects!.
    • Adjusted the spawn algorithm of orbits.
    • Items can now be grabbed out of orbits.
    • Deprecated Audio.SfxOpen in favor of SFX.open.
    • Values from extra settings Color, Point, and Rect fields will now appear in Lua as Color, vector, and RECTd objects automatically.
    • Values from extra settings will now be stored in a data._settings table, rather than data._basegame.
    • Episode-wide extra settings fields can now be created, and will be stored in the data._settings._global table.
    • pnpc.lua is now deprecated. All NPC references now inherrently track the underlying NPC, including generators.
    • pblock.lua is now deprecated. All Block references now inherrently track the underlying Block.
    • Blocks and NPCs are always guaranteed to have a "data" table, which is guaranteed to contain "_basegame" and "_settings" tables.
    • Added Block:transform function, allowing blocks to be safely converted to blocks of a different ID.
    • Extra settings for BGOs should now be supported.
    • Fixed a bug where shader function-type macros weren't properly substituted into shader code in some circumstances.
    • onExplosion event can now be used to detect explosions. Explosion.get can also get a list of explosion objects.
    • onNPCGenerated event can now be used to detect NPC creation by generators.
    • New onPostNPCKill, onPostNPCHarm, onPostExplosion, onPostEventDirect, and onPostBlockHit events, which correspond to the version of the event without 'Post' in the name. These are called if the regular version of the event is not cancelled. You should use these unless you explicitly need to cancel the event.

NPCs

  • Meta
    • All (SMBX2-specific) basegame NPCs now use a combination of npc-n and AI files.
    • The NPC folder structure has been readjusted. If you have been loading files from scripts/npcs, you may have to load from scripts/npcs/ai now.
    • NPCs thrown onto lineguides will no longer randomly get stuck on blocks (noticable when trying to throw a platform onto lineguides).
    • Certain new NPCs that react to water will no longer react to water on hidden layers.
    • Extended NPC settings applied to generators are now inherited by the generated NPCs.
  • Additions
    • Added Light Source NPC, an NPC that shines brightly in dark sections.
    • Added Particle Source NPC, an NPC that emits particles based on a file source specified.
    • Added Audio Source NPCs, NPCs that play a set sound effect when the player overlaps with its active area.
    • Added Tantrunt, a chasing NPC that can be jumped on to cause it to charge forward until it hits a wall.
    • Added Filth Coating, an NPC that can be attached to blocks to give it a coating that is removed when the player comes in contact with it.
    • Added Auto-Rotating Barrel, an NPC that the player can enter and press the jump key to shoot out. It rotates automatically.
    • Added Auto-Barrel, an NPC that the player can enter and will immediately be shot out. It rotates automatically.
    • Added Straight Barrel, an NPC that the player can enter and press the jump key to shoot out. Its angle can be set in the editor.
    • Added Rotating Barrel, an NPC that the player can enter and press the jump key to shoot out. While inside, the player can press left and right to rotate the barrel.
  • Behaviour
    • Big Switches: Fixed an issue where switch state would not properly save for an episode.
    • Boo Snake: Supports custom graphics now.
    • Broadsword's Boomerang: No longer hits invisible NPCs.
    • Broadsword's Boomerang: Fixed post-throw player control.
    • Bro's Boomerang: Now spinjumpable by default (emulates Super Mario World's custom sprite).
    • Bunbun: More configuration options in the editor.
    • Buoyant Platform & Wood Platform: Adjusted momentum.
    • Checkpoints/Flag Checkpoints: Can now optionally specify a Warp ID to respawn at.
    • Cobrats: Standing on these enemies is now safer.
    • Donut Block (SMW): Fall when a heavy NPC stands on top.
    • Flying NPCs: When set to "low bounce", they will now no longer ignore semisolids.
    • Flying Spiny: Fixed framestyle=0.
    • Fry Guy: Giving Fry Guy a unique layer and a "No More Objects On Layer" event will now cause the selected event to trigger only after all Sizzle Guys have been defeated.
    • Hopping Flame: No longer safe to spinjump on by default.
    • Lakitu (SMB1): More configuration options in the editor.
    • Magikoopa: No longer teleports above the section.
    • Magikoopa: Supports custom graphics now.
    • Maverick Thwomp: Remove "legacy" flag.
    • Paddle Wheel: Fixed lineguide interaction.
    • Para Dry Bones: Now two distinct NPCs. ID 417 turns into bone-throwing Dry Bones, while ID 388 turns into regular Dry Bones.
    • Para Dry Bones: When jumped on, the NPC collapses for a short period of time.
    • Phantos: Now remain active for the duration of a chuck whistle.
    • Popup Coin: Renders to -55 now.
    • Popup Coin: NPC display now matches the spawned NPC's position.
    • Popup Coin: NPC display now matches the trigger hitbox.
    • Reverse Boo: Adjusted momentum to match SMW Boo by default.
    • Rotary Lift: Added editor configuration options.
    • Shyspring/Shyspike: Now collectively known as "Hatters". Renamed to Shyhatter and Spikehatter.
    • Skewers: No longer collide with sizeables they overlap with.
    • Small Colour Switch: Get pushed when a heavy NPC stands on top.
    • Springs: Now restore double jumps.
    • Springs: Adjusted bounce table. NPCs must now have block collision and be affected by gravity in order to bounce off a vertical spring, and must have block collision in order to bounce off a horizontal spring.
    • Springs: Additional NPCs can be manually white/blacklisted using springs.lua's whitelist/blacklist functions.
    • Springs: Added support for custom spring types in code.
    • Star Coins: Lowered volume of certain sounds.
    • Stretch: Now can be registered as a custom NPC that moves along walls, too.
    • Thwomps: Face right in the editor by default.
    • Thwomps: Now considered heavy NPCs.
    • Van de Graf: No longer spawns a ribbon trail by default.
    • Whistling Chuck: Fixed a bug where the whistle effect would never stop, even after the sound stopped playing.
    • Wigglers: Now render in correct order.
  • NPC Codes
    • Global: ignorethrownnpcs: Thrown NPCs pass through this NPC.
    • Global: linkshieldable: Destroys the NPC upon contact with Link's shield.
    • Global: noshieldfireeffect: Disables fire effect if linkshielded.
    • Global: notcointransformable: Prevents NPC from turning to coins upon level completion.
    • Global: isheavy: An integer value that determines the NPC's weight if greater than 0.
    • Global: ishot: A boolean determining elemental block releated collisions.
    • Global: iscold: A boolean determining elemental block releated collisions.
    • Global: durability: A number determining elemental block releated collisions. -1 = infinite.
    • Global: nogliding: Causes the NPC to be ignored by 1f0.
    • Global: lightflicker: Causes the NPCs light to flicker slightly in dark sections.
    • Global: iscustomswitch: Used by switch NPCs to identify them as such.
    • Global: powerup: Used by powerups to identify them as such.

    • ArrowLift: spawnid: ID of the ghost-platform to spawn.
    • ArrowLift: nospecialanimation: Disables special animation handling.

    • Big Goombas: splitid: ID to turn into when splitting.

    • Big Switches: blockon, blockoff: IDs of the switchables.

    • Birds: toflying: ID of the NPC to turn into when flying away.

    • Birds (Flying): togrounded: ID of the respective grounded variant.

    • Bob-Omb (SMW, Walking): spawnid: ID to turn into when bonked or the timer runs out.

    • Bombshell Koopa: spawnid: ID of the shell bomb.
    • Bombshell Koopa Bomb: nospecialanimation: Disables special animation handling.

    • Bros (Boomerang, Hammer, Sledge): followplayer: If false, the NPC will always face in its initial facing direction.

    • Bunbun: nospecialanimation: Disables special animation handling.

    • Busters: target[n]: IDs that can be picked up by this NPC, where n is a number starting at 1. (target1, target2)
    • Busters: collideryoffset: Vertical offset of the search area relative to the NPC's feet.
    • Busters: useai1: If true, the NPC transforms its grabbed NPC into whatever value is stored in the NPC's ai1 field.
    • Busters: throwspeedx, throwspeedy: Speed at which NPCs are thrown.

    • Cherries: starid: ID of the star to spawn when all are collected.
    • Cherries: limit: Number of cherries that needs to be collected for the star to spawn.

    • Cloud Drop: horizontal: If true, the NPC moves horizontally.

    • Cobrat: spawnid: ID of the projectile fired.
    • Cobrat: transformid: ID of the NPC to transform into.
    • Cobrat: transformonjump: Whether or not to transform into a different NPC after jumping.
    • Cobrat: hideoffset: y-offset from the block the cobrat hides in.

    • Dry Bones: spawnid: ID of the projectile to throw.

    • Fire Bro: projectileid: ID of the projectile fired.
    • Fire Bro: friendlyprojectileid: ID of the projectile fired when held.

    • Fire Snake: tailid: ID of the trail NPC.

    • Fliprus: spawnid: ID of the spawned NPC.
    • Fliprus: throwspeedx, throwspeedy: Speed of the thrown NPC when released.
    • Fliprus' Snowball: fliprusid: ID of the associated Fliprus.

    • Flutter: maxspeedx, maxspeedy: Maximum velocity.
    • Flutter: flightperiod: Frames it takes for a full flight sine wave to complete.
    • Flutter: stundecel: Deceleration when stunned.
    • Flutter: zerospthreshold: Minimum speed value before speed gets set to 0 when stunned.

    • Flying Dry Bones: effectid: Effect ID when killed.
    • Flying Dry Bones: playsound: ID of sound effect played when bonked.
    • Flying Dry Bones: recovery: Frames of recovery after being bonked the first time.
    • Flying Dry Bones: transformid: ID this NPC turns into when bonked.

    • Flying Spiny: spawnid: ID of the spawned spikes.

    • Foo: blowframes: Number of frames per direction used for blowing.

    • Graf: ribbon: Whether to spawn a ribbon trail.

    • Grrrol: grrrolstrength: Number that determines relative strength to other Grrrols. Stronger Grrrols (higher number) kill weaker Grrrols when running into them.

    • Hatters: bonkedframes: Number of frames used by the bonking state.

    • Hopping Flame: spawnid: ID of the spawned NPC.

    • Hot Foot: nospecialanimation: Disables special animation handling.

    • King Bill: effect: ID of the death effect.

    • Lakitu (SMB1): nospecialanimation: Disables special animation handling.

    • Launch Barrels: delay: Sets the delay between entering a barrel, and when the player can shoot out of it (in ticks).
    • Launch Barrels: cooldown: Sets the delay between exiting a barrel, and when the player can enter it again (in ticks).
    • Launch Barrels: correctgravity: If set to true, gravity will be adjusted when shooting sideways or down out of a barrel, so the player doesn't fall immediately.
    • Launch Barrels: launchtimer: Sets the time between exiting a barrel and when the player regains control (in ticks)

    • Magikoopa: [min/max]frame[left/right]: Maps frames of animation to direction.

    • Mechakoopa: stunid: ID of the NPC after stunning.
    • Mechakoopa (Stunned): recoverid: ID of the NPC after stunning is over.

    • Megashroom: Removed keeppower and replaced it with myPlayer.keepPowerOnMega.

    • Minigame Cloud: spawnid: ID of the NPC to spawn for the minigame.

    • Monty Mole: holeid: BGO-ID of the hole BGO.

    • Mutant Vine Head: playercontrolled: Index of the controlling player. False if controlled by redirectors.
    • Mutant Vine Head: vineid: ID of the regular vine.
    • Mutant Vine Head: thornedid: ID of the thorned vine.

    • Paddle Wheel: platformid: ID of the platforms.
    • Paddle Wheel: autorotate: If true, the paddlewheel always rotates at maximum speed.
    • Paddle Wheel: linespeedmultiplier: Multiplier to adjust lineguided speed.

    • Pansers: projectileid: ID of the NPC fired.

    • Phanto: stoptype: Enum for the on-stop behaviour.

    • Popup Coins: defaultcontents: NPC ID to default to when no content is provided.

    • Ptooies: blowheight[n]: Pattern for defining blow heights in pixels, where n is a number starting at 1. (blowheight1, blowheight2) Blowheights are selected randomly.
    • Ptooies: ballid: ID of the projectile.

    • (Reverse) Boo: maxspeedx/maxspeedy: Maximum velocity.
    • (Reverse) Boo: accelx/accely: Acceleration.
    • (Reverse) Boo: decelx/decely: Deceleration.

    • Reznor: projectileid: ID of the spawned projectile.
    • Reznor: turns: If false, disables the NPC's turning (NPC can still turn if set to Don't Move).

    • Rock: bounceheight: Height of the rock's bounce.

    • Rocky Wrench: spawnid: ID of the NPC to spawn.

    • Rotary Lift: cooltime: Number of frames of the idling state.

    • Scuttlebug (Hanging): spawnid: ID to turn into when losing the string.

    • Shoe Goombas: shoeid: ID of the shoe to drop.
    • Shoe Goombas: lavaproof: If true, spawns particles when on lava.
    • Shoe Goombas: spawnednpc: NPC ID to spawn when landing.
    • Shoe Goombas: flytime: Now accessible by all Shoe Goombas.

    • Skewer: waitdelay: Wait time.
    • Skewer: extenddelay: Wait time after extending.
    • Skewer: extendspeed: Speed at which to extend.
    • Skewer: retractspeed: Speed at which to retract.
    • Skewer: horizontal: If true, the NPC is sideways.

    • Small Switches: blockon, blockoff: IDs of the switchables.

    • Snakeblock: soundid: ID of the sound played.

    • Snifit: burst: Number of bullets to fire in quick succession.
    • Snifit: interval: Frames between burst shots.
    • Snifit: jumps: Whether the NPC jumps.
    • Snifit: prepare: Whether the NPC stands still and shakes before firing.
    • Snifit: shottimer: Number of frames between non-burst shots.

    • Spike: spawnid: ID of the spawned NPC.

    • Star Coin: nospecialanimation: Disables special animation handling.

    • Sumo Bro: spawnid: ID of the spawned NPC.
    • Sumo Bro Lightning: spawnid: ID of the spawned NPC.

    • Ted Spawner: traveldistance: Pixels travelled.
    • Ted Spawner: heldframe: Frame of the spawned NPC while held.
    • Ted Spawner: spawnerpriority: Render priority of the grip.
    • Ted Spawner: spawnpriority: Render priority of the held NPC.
    • Ted Spawner: anchory: Y-Anchor of the spawned NPC to the claw. 1 is top, -1 is bottom.
    • Ted Spawner: spawnid: NPC ID spawned.

    • Waddle Doo: sparkid: ID of the Spark NPC.
    • Waddle Doo Spark: dooid: ID of the related Waddle Doo NPC.

    • Walking Rinka Shooter: spawnid: ID of the NPC to spawn.

    • Wiggler: trailcount: Number of trail segments.
    • Wiggler: trailid: ID of the trail segment NPC.
    • Wiggler: angryid: ID when jumped on. Doesn't transform if it's the same as itself.
    • Wiggler: distance: Pixels between each segment.
    • Wiggler Segment: angryid: ID of the head when jumped on. Doesn't transform if the head already is of that ID.

    Global Default Settings
    • ignorethrownnpcs: Lineguided Utility NPCs, Small Switches, Tilt Lift, Boo Circle, Torpedo Ted Hand, Fire Snake Trail, Chuck Baseball, Gas Bubble, SMB2 Fire, Bowser Statue Fire, Hopping Flame Trail, Sumo Bros. Lightning and Fire, Spike Ball, various Platforms, Ptooie Ball, Popup Coin, Flying Spiny Spike, Rhino Fire, Bros' Fire, Wrench, Berries, Friendly NPCs, Minigame Cloud, Hidden Item, Reznor Fire, Dry Bones Bone, YI Fuzzy, Paddle Wheel, Broadsword's Boomerang, Springs, Waddle Doo Beam, Monitors, Asteron Spike, Mutant Vines, Rotary Lift, Bunbun Spear, Donut Blocks, Bros' Boomerang, Bros' Hammer, Crate-spawned flickering NPCs, Player Rinkas

    • linkshieldable: Baseball, SMB2 Fire, Bowser Statue Fire, Flying Spiny Spike, Bros' Fire, Wrench, Reznor Fire, Dry Bones Bone, Asteron Spike, Bros' Hammer.

    • noshieldfireeffect: Baseball, Flying Spiny Spike, Wrench, Dry Bones Bone, Asteron Spike, Bros' Hammer.

    • notcointransformable: Various static and offscreen-active NPCs like lineguided NPCs, Bumpers and Mutant Vines.

    • isheavy: Thwomps, Fliprus Snowball, Sledge Bros, Grrrols, block-like NPCs, Bowser's Bowling Ball, Dino Rhino, Golden Bowser Statue, Grand Goomba, Giant Goomba, Huge Goomba, Grand Koopa, Mega Mole.

    • ishot: All NPCs that were also previously able to melt frozen Turn Blocks.

    • iscold: All NPCs that were also previously able to melt hot Turn Blocks.

    • durability: Between 1 and 5, depending on the strength of the projectile. Infinite for non-projectile NPCs.

    • nogliding: Lineguided Rope, Paddlewheel Platform, Lineguided Engine Block Attachables.

Blocks

  • Meta
    • All (SMBX2-specific) basegame Blocks now use a combination of npc-n and AI files.
    • The Block folder structure has been readjusted. If you have been loading files from scripts/blocks, you may have to load from scripts/blocks/ai now.
    • newblocks.lua no longer exists.
    • You can now use block-n.lua files for your custom per-id block code.
    • You can now use block-n.txt files to override block codes on a per-level or per-episode basis.
  • Additions
    • Added SMM2 SMW Rainbow Sizeable.
    • Added SMM2 SMW Bridge Sizeable.
    • Added SMM2 Synced Switch Blocks.
    • Added SMM2 SM3DW Synced Switch Spikes.
    • Added SMM2 SM3DW Timed Spikes, periodically harmful spike blocks.
    • Added SMM2 SM3DW Blinking Blocks, blocks that appear and disappear based on a set BPM.
    • Added SMW Rope Conveyor Blocks, a semisolid conveyor block.
    • Added Shovel Knight Brittle Leaf Blocks, a set of blocks that disappears after a player or heavy NPC comes in contact with it and then leaves it again.
    • Added Sticky Slime Blocks, a set of Blocks you cannot jump off.
    • Added Anti-Nitro Switch, which explodes all Nitro Blocks in the level.
    • Added Metal Switch, a one-time Switch Block that does nothing unless hooked up to events or code.
  • Behaviour Changes
    • 1f0: No longer catches held NPCs.
    • Clear Pipes: Now render to priority -22.5 instead of -10 (now they render behind foreground elements) by default.
    • Clear Pipes: Render priority can be adjusted by manipulating the clearpipe.priority variable in lua.
    • Clear Pipes: Elements in clear pipes can now travel through lava.
    • NPC Passthrough Block: Behaviour changed. Now no longer compatible with Multiplayer in exchange for compatibility with thrown NPCs. NPCs will now no longer randomly fall through all blocks after intersecting with one.
    • New snow slopes: Now slippery by default.
    • Nitro: Now explodes instantly when coming in contact with anything.
    • Nitro: New explosion effect.
    • Nitro: Added optional visual effects.
    • Nitro: Allows players to enter mega state even if they will grow into Nitro blocks.
    • TNT: Enemies that fall onto TNT now set it off.
    • TNT: Now instantly explode when coming in contact with NPCs that are marked as hot with the ishot flag.
    • TNT: Now instantly explode when touching an invincible or mega player.
    • TNT: Allows players to enter mega state even if they will grow into TNT blocks.
    • TNT: Yoshi now starts running when landing on TNT.
    • TNT: New explosion effect.
    • TNT: Added optional visual effects.
  • Block Codes
    • Global: width: (automatically inferred from sprite by default).
    • Global: height: (automatically inferred from sprite by default).
    • Global: frames: Number of frames in the block animation (only works for SMBX2-specific blocks).
    • Global: sizable: If true, the block is a sizable block.
    • Global: passthrough: If true, the block has no collision.
    • Global: pswitchable: If true, the block turns into a coin when a P-Switch is pressed.
    • Global: lava: If true, the block is considered lava.
    • Global: semisolid: If true, the block only has collision on the top.
    • Global: floorslope (-1, 0, 1): Determines the direction of this block as a floor slope.
    • Global: ceilingslope (-1, 0, 1): Determines the direction of this block as a ceiling slope.
    • Global: lightoffsetx/y: Offset of light source from the center of the block.
    • Global: lightradius: Determines radius of light source in pixels.
    • Global: lightbrightness: Determines brightness of light source.
    • Global: lightcolor: Determines the color of the light source.

    • Global: lightflicker: Causes the blocks light to flicker slightly in dark sections.

    • Global: playerfilter: Used by player filter blocks to identify them as such.

    • Global: customhurt: Used by hurtful new blocks to identify them as such.

    • Global: noshadows: Prevents the block from casting shadows in a dark section.

    • Brittle: effectid: ID of the effect spawned upon the block's removal.

    • Escalator: direction: Direction of the conveyor effect.
    • Escalator: downwards: If true, special logic for downwards escalators is enabled.
    • Escalator: Speed: Speed of the conveyor effect.

    • Nitro: flashcolor: Color of the block's flashes.
    • Nitro: randomjumps: If false, disables the block's jumping effect.

    • Switchblock: offswitchid/onswitchid: ID of the blocks to toggle.
    • Switchblock: color: String of the color name.

    • TNT: flashcolor: Color of the block's flashes.
    • TNT: randomflashes: If false, disables the block's random flashes.

  • Other
    • Slightly adjusted the visuals of SMW Castle Slopes, SMW Cave Sizeable.

Characters

  • Behaviour Changes
    • Broadsword: Can no longer slash through solid ice.
    • Klonoa: Minor changes to hover momentum.
    • Megaman: Reduced charge shot timer from 140 to 80.
    • Wario: Crouching in midair no longer locks horizontal momentum like on the ground.
    • Wario: Dismounting from Yoshi or another mount is no longer almost impossible.
    • Wario: Can no longer climb up sizables using the Ground Pound.
    • Wario: Pressing Alt-Jump during a ground pound will now cancel the ongoing ground pound.
    • Wario: Can no longer break certain blocks erroneously using the Shoulder Bash.

BGOs

  • BGO Codes
    • Global: lightflicker: Causes the BGOs light to flicker slightly in dark sections.

Warps

  • Scripting
    • Added "allowItems" field, deprecating the "allowCarriedNPCs" field.
    • Added "toOtherLevel" field, deprecating the "isLevelExit" field.
    • Added "fromOtherLevel" field, deprecating the "isLevelEntrance" field.
    • Added "entranceSection" field (readonly).
    • Added "exitSection" field (readonly).

Sections

  • Scripting
    • Added "origBoundary" field, getting the initial bounds of the section.
    • Added "wrapH" field, which determins the horizontal wrap state of the section, deprecating the "isLevelWrap" field.
    • Added "wrapV" field, which determins the vertical wrap state of the section.
    • Added "background" field, allowing you to get or set a parallax background object for your section.
    • Added "settings" field, allowing you to get the settings table for your section.
    • Added "darkness" field, allowing you to get the darkness data for your section. You can use "darkness.enabled" and "darkness.playerLightEnabled" to enable or disable darkness,
    • Added "effects" field, allowing you to get a table containing section effects. You can use "effects.weather" and "effects.screenEffect" to get or set those fields.
    • Added "beatTimer" field, allowing you to get a table containing beat timing data. You can use "beatTimer.enabled", "beatTimer.bpm", "beatTimer.useMusicClock" and "beatTimer.timeSignature" to get or set those fields.

Backgrounds

  • Behaviour Changes
    • All section backgrounds are now implemented with background2.txt files. You can find the configuration for each one in data/config/backgrounds, or manipulate them at runtime with Section.background. Certain custom animated backgrounds may appear incorrectly if their heights are not a full multiple of the frame number.
    • SMB2 Clouds (ID 59) has been tweaked.
    • SMB2 Snow Islands (ID 60) has been tweaked.
    • SMB2 Snow Hills (ID 61) has been tweaked.
    • SMB Clouds (ID 62) has been tweaked.
    • SMB Snow Hills (ID 63) has been tweaked.
    • SMB Waterfall (ID 64) has been tweaked.
    • SMB2 Ice Underground (ID 65) has been overhauled with a more accurate animation.
  • Background2 Codes
    • startingFrame: Allows you to set a starting frame for animated background layers.
    • sourceX: Allows you to cut a portion of the image to use as a background layer.
    • sourceY: Allows you to cut a portion of the image to use as a background layer.
    • sourceWidth: Allows you to cut a portion of the image to use as a background layer.
    • sourceHeight: Allows you to cut a portion of the image to use as a background layer.
    • maxParallaxX: Limits the speed of horizontal parallax when "fitX" is enabled.
    • maxParallaxY: Limits the speed of vertical parallax when "fitY" is enabled.
    • img/image now allows you to supply a number, which will use the corresponding "background2-#" image file.
  • Scripting
    • Added "Background.set" function, allowing you to set the background of a section directly (equivalent to assigning "Section.background").