rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

John Nameless
2025 Egg Hunter
2025 Egg Hunter
Posts: 130
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby John Nameless » Thu Apr 24, 2025 6:00 am


Heya!

Found the basegame score to be pointless & not really serving anything purposeful?
Then here's a huge addon to the system that change the way you approach levels!

Featuring a score bonus & ranking system akin to Sonic Adventure 2 or Sonic Unleashed that gives you extra points at the end of a level whenever you perform certain actions then gives you an E to an S rank depending on how well you do!

It also records how fast you are beating a level while at that!


Image

Image




& for those S-Rank hunters, comes included, is an optional setting to reset checkpoints when you're in the world map!
RESETTABLE CHECKPOINTS: show

Image




Not only that, this script also has support for smwMap.lua aswell!
smwMap.lua Support: show

Image








INSTALLATION & IMPLEMENTATION GUIDE
HOW TO INSTALL & ADD LEVELS: show

1. Unzip then, Copy/Cut/Move & Paste all of the files of rankSystem.lua into the level/episode folder of your choice.
2. Open up the luna.lua file of said chosen level/episode.
3. Within the luna.lua file put something similar to the picture below inside it, but replace the values in the levels table with your own:

Image

4. Open up your & episode & check if the unranked icon appears on the top right of the screen when heading on a registered level!



For more information, a documentation/example luna.lua file can be found within the installation of rankSystem.lua





Image
DOWNLOAD:
https://drive.google.com/file/d/1kG0EvL ... sp=sharing


Last edited by John Nameless on Fri May 02, 2025 5:56 am, edited 1 time in total.

Shaktool
2025 Egg Hunter
2025 Egg Hunter
Posts: 542
Joined: Thu Jul 25, 2024 5:34 am
Flair: zip zoom
Pronouns: male

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby Shaktool » Thu Apr 24, 2025 8:19 am

Oooh! this looks soo stylish! I hope to use it in a later project.

mariobrigade2018
Eerie
Eerie
Posts: 716
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby mariobrigade2018 » Thu Apr 24, 2025 10:12 am

Ok but the bars that show the bonuses popping out is super smooth, easily one of the most satisfying things I’ve seen in a while.

AirShip
Fuzzy
Fuzzy
Posts: 1086
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby AirShip » Thu Apr 24, 2025 11:02 am

Grandioso!
A must-use for sure!

ChromaNyan
Blooper
Blooper
Posts: 155
Joined: Sat Feb 17, 2018 5:32 pm

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby ChromaNyan » Thu Apr 24, 2025 12:23 pm

if only i had this when i was working on castle of oddities 2

John Nameless
2025 Egg Hunter
2025 Egg Hunter
Posts: 130
Joined: Mon Jul 10, 2023 11:40 pm
Flair: vidio gaem

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby John Nameless » Fri May 02, 2025 5:58 am

minor update to rankSystem.lua!

now including the option to turn off the built-in level timer & time records + fixes on the barOffsets settings not working properly & a few new extra settings to offset the bars & the ranking letter vertically + victory wait times are no longer hardcoded & can be modifiable!

AdvancedTrash
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Fri Apr 25, 2025 4:21 pm
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby AdvancedTrash » Thu May 08, 2025 11:26 pm

This is one of my favorite scripts I have used so far. It’s incredibly easy to configure and super dynamic, and the compatibility with smwMap is so nice.

Shaktool
2025 Egg Hunter
2025 Egg Hunter
Posts: 542
Joined: Thu Jul 25, 2024 5:34 am
Flair: zip zoom
Pronouns: male

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby Shaktool » Thu Jul 24, 2025 5:42 pm

ChromaNyan wrote:
Thu Apr 24, 2025 12:23 pm
if only i had this when i was working on castle of oddities 2
or you can update it or include it in another installment. You cant change the past, but you can with the future

ChromaNyan
Blooper
Blooper
Posts: 155
Joined: Sat Feb 17, 2018 5:32 pm

Re: rankSystem.lua - Sonic Adventure 2/Unleashed styled rankings!

Postby ChromaNyan » Tue Jul 29, 2025 8:41 pm

ilovehamburgerz wrote:
Thu Jul 24, 2025 5:42 pm
or you can update it or include it in another installment. You cant change the past, but you can with the future
it really wouldn't be worth it to update my existing episode. i wrote essentially my own scoring system for my episode, the main benefit to be gained by switching to this system would just been the ability to have a nice score tally at the end and that's really not worth it. this is still far more polished than what i did though, if i ever do a castle of oddities 3 (which isn't planned) i'm definitely using this script

mariobrigade2018
Eerie
Eerie
Posts: 716
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby mariobrigade2018 » Sun Aug 03, 2025 1:35 pm

Question, is there a way to replace the E with an F?

Falafel_83
Shy Guy
Shy Guy
Posts: 6
Joined: Sun Apr 27, 2025 1:02 pm
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby Falafel_83 » Wed Aug 27, 2025 9:23 am

I am using this code for my episode, and the ranks work fine, but it won't be displayed in the worldmap.
This is the code in the luna.lua file of the episode (simplified):

Code: Select all

rankSystem.timer = {false, 768, 47}

local levels = {
	{"1-1.lvlx",48000,9000},
}
for i = 1, #levels do
	rankSystem.registerLevel(
		levels[i][1], -- registers the levelname per level
		levels[i][2], -- registers the requirement per level
		levels[i][3] -- registers the time preset per level
	)
end

function rankSystem.onLevelComplete(score,rank,time) -- runs upon the player completing a level
	if rank <= 0 then
		SFX.play(80)
	end
end

function rankSystem.onRankGive(rank) -- runs upon the final rank being revealed
	if rank == #rankSystem.rankThresholds then
		SFX.play(84)
	end
end
Image

Do I have to code something in specific in the map.lua file too or something?

mariobrigade2018
Eerie
Eerie
Posts: 716
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby mariobrigade2018 » Wed Aug 27, 2025 3:22 pm

I’m pretty sure you need to put the require call in map.lua. If it doesn’t work, then try reporting it.

AdvancedTrash
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Fri Apr 25, 2025 4:21 pm
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby AdvancedTrash » Wed Aug 27, 2025 6:20 pm

mariobrigade2018 wrote:
Sun Aug 03, 2025 1:35 pm
Question, is there a way to replace the E with an F?
Easily, the simplest solution is just use a different image with an F instead of an E

Added in 5 minutes 13 seconds:
Falafel_83 wrote:
Wed Aug 27, 2025 9:23 am
I am using this code for my episode, and the ranks work fine, but it won't be displayed in the worldmap.
This is the code in the luna.lua file of the episode (simplified):

Code: Select all

rankSystem.timer = {false, 768, 47}

local levels = {
	{"1-1.lvlx",48000,9000},
}
for i = 1, #levels do
	rankSystem.registerLevel(
		levels[i][1], -- registers the levelname per level
		levels[i][2], -- registers the requirement per level
		levels[i][3] -- registers the time preset per level
	)
end

function rankSystem.onLevelComplete(score,rank,time) -- runs upon the player completing a level
	if rank <= 0 then
		SFX.play(80)
	end
end

function rankSystem.onRankGive(rank) -- runs upon the final rank being revealed
	if rank == #rankSystem.rankThresholds then
		SFX.play(84)
	end
end
Image

Do I have to code something in specific in the map.lua file too or something?
did you use

local smwMap = require("smwMap")
local rankSystem = require("rankSystem")

mariobrigade2018
Eerie
Eerie
Posts: 716
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: rankSystem.lua [1.5.0] - Sonic Adventure 2/Unleashed styled rankings!

Postby mariobrigade2018 » Wed Aug 27, 2025 7:47 pm

AdvancedTrash wrote:
Wed Aug 27, 2025 6:25 pm
mariobrigade2018 wrote:
Sun Aug 03, 2025 1:35 pm
Question, is there a way to replace the E with an F?
Easily, the simplest solution is just use a different image with an F instead of an E
Obviously, but I don't feel comfortable with my spriting skills.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari