make mario levels make mario levels make mario levels make mario levels make mario levels

Fairy gameplay from that one MaGLX3 level

Post Reply
User avatar
Duker
I post u2be tags I guess
Posts: 254
Joined: 11 years ago
Location: The Comment Section

Fairy gameplay from that one MaGLX3 level

Post by Duker »

Since the X3 LP is ending figured I should get this out.

This is officially a beta, main issue being that for any NPC that doesn't use the ai1 though ai5 values the freeze probably won't work as expected and going through and manually checking every single npc in existence is too daunting for me, so if there's an NPC you want to use but it doesn't function like you'd expect give me a holler and I'll fix it as needed (if possible).

Download Link (Beta 1.0)

~What is this~
A easy-to-use package to add a controllable fairy that can create platforms and freeze enemies in place, as seen in raocow's MaGLX3 LP episode 75 featuring it: https://youtu.be/Inr_lg6OfFY&t=1078
'Alt-run' to swap control to and from the fairy, after swapping: 'jump' to create platform, 'run' to freeze enemies

~How to use~
Put the content of the .7z file into your level's folder, then add this line to the top of your luna.lua:

Code: Select all

local fg = require("FairyGameplay")
For the majority of users that's likely it, you're good to go. Custom tilesets are included for the blocks and npc so they're easy to find.
The 'magic button' activates any event when triggered by the freeze, set by changing the npc message text.

If you want to use the "race" functionality:
There is an attribute that need to be set like such:

Code: Select all

local onStart()
   fg.setAttribute("races", { lunatime.toTicks(5), lunatime.toTicks(3) }) -- List of time limits for the races.
end
How many coins the custom startline block contain determine which race it starts, 1 coin = race 1, etc.
A race is ended by a magic button with its npc message set to 'RaceWinCheck'.
~Customisation~
Full list of configurable attributes with default values:
-- Copy whichever relevant line to onStart()

fg.setAttribute("color", "#7ee099") -- Color of fairy and related effects
fg.setAttribute("npcs to ignore", {}) -- NPCs to be immune to the freeze. Example value: { 413, 889 }

-- Freeze related
fg.setAttribute("freeze range start", 50) -- Initial radius of freeze range
fg.setAttribute("freeze range end", 100) -- Final radius of freeze range
fg.setAttribute("freeze speed", 1.5) -- How fast the freeze range expands
fg.setAttribute("freezecolor", "#ffffaa") -- Color of freeze indication particles and timer
fg.setAttribute("freeze time", lunatime.toTicks(6.5)) -- For how long to freeze enemies

-- When the fairy passively follows
fg.setAttribute("maxoffset", 60) -- How far away from the player the fairy can drift
fg.setAttribute("traveltime max", 250) -- Maximum time spent traveling to the next position
fg.setAttribute("traveltime min", 150) -- Minimum time spent traveling to the next position
fg.setAttribute("yoffset", -50) -- Offset for the fairy's follow position

-- Movespeeds
fg.setAttribute("movespeed normal", 4.5) -- Movespeed during normal movement
fg.setAttribute("movespeed freeze start", 4) -- Initial movespeed during normal movement
fg.setAttribute("movespeed freeze end", 2) -- Final movespeed when

-- Setting races
fg.setAttribute("races", {}) -- List of time limits for the races. Example value: { lunatime.toTicks(5) }

-- Below should only by set if you need to change the IDs to solve a custom npc/block ID conflict, otherwise things will break
fg.setAttribute("switchID", 868) -- NPC ID of the magic switch
fg.setAttribute("platformID", 869) -- NPC ID of the platform
fg.setAttribute("ouchBlockID", 868) -- Block ID of the pink fairy blocker
fg.setAttribute("startRaceID", 869) -- Block ID of the startline block
Changelog wrote:2021-08-07 - Initial beta 1.0 release

BONUS!
Non-gameplay fairy NPC, can be placed in the level or be set to follow similarly to the gameplay one.
Download Link

Similarly to the gameplay one just dump the files into the .7z files into the level folder (some files are shared between the versions, if you install both versions then expect to overwrite a couple of the files).

Preview gif: https://imgur.com/zNyFewD
fart.
Post Reply