Forums » General Questions » Roll Credits after a passed Extra Stage or Course - Theming help

1
Hello there, amateur themer here, that only knows how to tweak the metrics.ini, and some very little stuff about lua.

So i've been tinkering with some themes, and i discovered CyberiaStyle Last Approach, a very cool theme that i have no idea how did i just discovered it now, inwhich along with many cool features, there's a feature, that i would like to add into other themes.

The theme will roll the credits, after a play session has ended, but ONLY if the player has passed an Extra Stage on Dance mode, or any Course on either Nonstop or Oni. Otherwise, just shows the Game over screen. (Another SM3.9+ theme also has this, but on a different branching mechanic i don't understand)

I'm assuming all i have to do is somehow create a conditional code somewhere, where if it detects the player meeting the requirement after the game ended, it will enter ScreenCredits, similar if entered from ScreenOptions.

(Slight update): After looking into CS LA's Branches lua, i've found a "SelectEndingScreen" branch, that is called after a summarized profile save is happened. This branch then reads the current game session's current state, like mode, passed or failed, incase of course, if the stages are 4 or higher, which then if it returns true, it'll roll credits, which then will show the usual game over screen. If false, skip the credits roll, and goes straight to the game over screen.
So what i did, is i copy-pasted the code to 2 themes, first on _fallback, so i can test it, if it can work globally, while taking care that "SelectEndingScreen" gets called after profile save summary, so it can start the conditional check. Not trusting myself with difficult extra stages, i started playing an easy 4 stage course, but after i've beaten the course, after the evaluation screen, it just showed the usual game over. Tried several times, fiddling around with the branches to make sure the ending check gets called, but with no luck.

Any small help on that regard? Thanks!
Reply