Logo

Rating Star System Idea

Register Log In Back To Forums

Post #1 · Posted at 2017-12-19 05:06:35pm 6.3 years ago

Offline RedAgent14
RedAgent14 Avatar Member
50 Posts
United States
Reg. 2014-08-20

Hi all,
After spending time learning about LUA and Stepmania, I think I have an idea for a basic implementation of the rating star Extra Stage system. I just need to know a few things:

1. What language is metrics.ini written in?

2. Goes with question 1: In metrics.ini, I see some lines written like
if param.Parameter then \
Where "Parameter" is whatever parameter is specified (CustomDifficulty, Player, etc). What does the backslash mean?

3. Where is the code for displaying stage results stored, and can I reference it from a separate file?

Post #2 · Posted at 2017-12-19 05:13:35pm 6.3 years ago

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
Reg. 2011-03-09

1. metrics.ini is, as its name suggests, an INI file. StepMania 5's INI file format is slightly odd: for example, # is used as the comment character instead of a semicolon, and it lets you incorporate Lua expressions in many places in the file.

2. For multi-lined chunks of Lua in metrics.ini, you need to use a backslash at the end of the line to continue the expression. You do not need to, and in fact cannot, use backslashes in .lua files.

3. Some themes create their own version of ScreenEvaluation, but most themes use the version of ScreenEvaluation that StepMania provides built in, which is written in C++ and you can't access individual pieces of its code. It gets all its information from PlayerStageStats objects, which you can get in Lua.

Post #3 · Posted at 2017-12-19 05:46:50pm 6.3 years ago

Offline RedAgent14
RedAgent14 Avatar Member
50 Posts
United States
Reg. 2014-08-20

So say I wrote a script to get the player stats from each played stage, add them together, and from there determine whether or not the Extra Stage is earned. Would I have the script run after the final stage grade is displayed, or is that already too late?

Also, is Stepmania written in a way that requires the Extra Stage to depend on the final stage's grade? (I assume it is, but I just want to make sure)

Post #4 · Posted at 2017-12-19 09:56:07pm 6.3 years ago

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
Reg. 2011-03-09


Last updated: 2017-12-19 09:56pm
You could do it then.

It is written in a way that requires the Extra Stage to depend on the final stage's grade, but in the current WIP version of DDR SuperNOVA 3 (and also in some MadkaT themes I believe) some measures are taken to circumvent that basically by making SM give you an Extra Stage if you cleared the song by making the grade requirement that easy, and then having some other condition in a branch or somewhere that prevents the player from actually getting the Extra Stage if they didn't meet the "real" condition.

Post #5 · Posted at 2017-12-20 07:41:07pm 6.3 years ago

Offline ZTS
ZTS Avatar Member
139 Posts
Not Set
Reg. 2015-01-13

"But enough talk! Have at you!"

Last updated: 2017-12-20 07:44pm
You can force event mode and ignore stepmania's stage system like I did, but that requires keeping track of the stages yourself and people don't like their game settings being changed.

If you do that, use a branch for the NextScreen for ScreenEvaluation, if they meet extra stage take them to song select (or an extra stage song select), if they don't take them to the game over screen.
Get Rave It Out! https://sites.google.com/view/riodevs/home
Want your theme made? I take commissions, PM for details.

Post #6 · Posted at 2017-12-20 10:46:47pm 6.3 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
An alternative to forcing event mode is to use GAMESTATE:AddStageToPlayer() to add stages to each player as needed. GAMESTATE:GetNumStagesLeft() will return the number of stages a player has left, so you can make sure they stay at 1 or 2 or whatever you want.

(this is what I did for the timed sets and reward time system in my theme years ago)
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 5% · Database: 4% · Server Time: 2024-04-19 23:28:14
This page took 0.006 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language