Page 1 of 1

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

Posted: Thu Apr 24, 2025 6:00 am
by John Nameless

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



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

Posted: Thu Apr 24, 2025 8:19 am
by Shaktool
Oooh! this looks soo stylish! I hope to use it in a later project.

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

Posted: Thu Apr 24, 2025 10:12 am
by mariobrigade2018
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.

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

Posted: Thu Apr 24, 2025 11:02 am
by AirShip
Grandioso!
A must-use for sure!

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

Posted: Thu Apr 24, 2025 12:23 pm
by ChromaNyan
if only i had this when i was working on castle of oddities 2

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

Posted: Fri May 02, 2025 5:58 am
by John Nameless
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!

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

Posted: Thu May 08, 2025 11:26 pm
by AdvancedTrash
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.

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

Posted: Thu Jul 24, 2025 5:42 pm
by Shaktool
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

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

Posted: Tue Jul 29, 2025 8:41 pm
by ChromaNyan
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

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

Posted: Sun Aug 03, 2025 1:35 pm
by mariobrigade2018
Question, is there a way to replace the E with an F?

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

Posted: Wed Aug 27, 2025 9:23 am
by Falafel_83
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?

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

Posted: Wed Aug 27, 2025 3:22 pm
by mariobrigade2018
I’m pretty sure you need to put the require call in map.lua. If it doesn’t work, then try reporting it.

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

Posted: Wed Aug 27, 2025 6:20 pm
by AdvancedTrash
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")

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

Posted: Wed Aug 27, 2025 7:47 pm
by mariobrigade2018
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.

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

Posted: Wed Aug 27, 2025 10:14 pm
by AdvancedTrash
mariobrigade2018 wrote:
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.
In its current state its just a rip from another Sonic game, given that it is mostly typographical you just can use spriters resource to find an extract a ripped font and just copy and paste it with minimal changes on your end