Flexible X-mods on default theme?

Answering all questions about r21freak and r21/ITG.
Feel free to ask questions/add information.

Moderator: Admins

Flexible X-mods on default theme?

Postby Sckxyss on Tue Feb 17, 2015 3:30 am

I played on a cabinet before that had "flexible" x-mods, i.e. one row with 1x, 2x, 3x, etc. and another row with +0.1x, +0.2x, +0.3x, etc. (the theme looked like ITG3 or something similar). I was wondering if it was possible to add something like this to the default ITG2 theme. I've added songs and some static x-mods (3.5x, 4.5x, etc.) before, but it's in a public place, so I'd like to keep it looking like the default theme, if possible.
Sckxyss
0%
0%
 
Posts: 7
Joined: Mon Mar 04, 2013 7:40 pm

Re: Flexible X-mods on default theme?

Postby Horsey on Tue Feb 17, 2015 6:30 am

If you have some theme knowledge, then you can add it in yourself. I no longer use oITG/3.95/Roxor ITG, and never used the default theme, so this is something I don't already have cooked up.

Here's an evernote that I wrote detailing where and what to paste into the default theme:

http://www.evernote.com/l/AAUBQp7tWFpFQ ... qCznNqseM/

now, instead of using the mods.LUA script that's in the above link, use the code in this note, because it fixes a longstanding bug that has to do with negative BPMs and DisplayBPM being set to 0.

http://www.evernote.com/l/AAU2_otMoDBI_ ... z5-qHdu3M/


This was discussed, along with other insanely helpful theming topics starting on page 32. Modern theming starts about page 30, if you're interested in reading the progression of things. I highly suggest you read through the entire thread, and maybe read through a few more in the Technical section of AIJ.

Click >> http://aaronin.jp/boards/viewtopic.php? ... &start=620
Image
Image
Community Dropbox Thread wrote:http://r21freak.com/phpbb3/viewtopic.php?f=6&t=24873
User avatar
Horsey
80%
80%
 
Posts: 1390
Joined: Sun May 01, 2011 3:00 pm
Location: Château Frontenac

Re: Flexible X-mods on default theme?

Postby Sckxyss on Wed Feb 18, 2015 2:23 am

That doesn't look terribly complicated, I'll give it a shot. Thanks!
Sckxyss
0%
0%
 
Posts: 7
Joined: Mon Mar 04, 2013 7:40 pm

Postby Horsey on Wed Feb 18, 2015 3:39 am

if you have questions, just ask
Image
Image
Community Dropbox Thread wrote:http://r21freak.com/phpbb3/viewtopic.php?f=6&t=24873
User avatar
Horsey
80%
80%
 
Posts: 1390
Joined: Sun May 01, 2011 3:00 pm
Location: Château Frontenac

Re: Flexible X-mods on default theme?

Postby Sckxyss on Sat Mar 14, 2015 2:55 pm

One question - at the end of your first link, where exactly do these lines go (folders/filenames, and location within xml document)?

Code: Select all
ScreenStage and ScreenSelectMusic:
     <Layer
          Type="Quad"
          OnCommand="%function() SetSpeedMod(PLAYER_1) end"
     />
     <Layer
          Type="Quad"
          OnCommand="%function() SetSpeedMod(PLAYER_2) end"
     />



ScreenSelectMusic options out:
     <Layer
          Type="Quad"
          OnCommand="%function() BreakSpeedMod(PLAYER_1) end"
     />
     <Layer
          Type="Quad"
          OnCommand="%function() BreakSpeedMod(PLAYER_2) end"
     />
Sckxyss
0%
0%
 
Posts: 7
Joined: Mon Mar 04, 2013 7:40 pm

Re: Flexible X-mods on default theme?

Postby Horsey on Sun Mar 15, 2015 4:14 pm

Sckxyss wrote:One question - at the end of your first link, where exactly do these lines go (folders/filenames, and location within xml document)?

Code: Select all
ScreenStage and ScreenSelectMusic:
     <Layer
          Type="Quad"
          OnCommand="%function() SetSpeedMod(PLAYER_1) end"
     />
     <Layer
          Type="Quad"
          OnCommand="%function() SetSpeedMod(PLAYER_2) end"
     />



ScreenSelectMusic options out:
     <Layer
          Type="Quad"
          OnCommand="%function() BreakSpeedMod(PLAYER_1) end"
     />
     <Layer
          Type="Quad"
          OnCommand="%function() BreakSpeedMod(PLAYER_2) end"
     />



I love that you're asking the same question that I asked when I first started. Okay, so the way themes work, is that each screen has a name:

Code: Select all
ScreenSelectMusic


from there you can have multiple filetypes and modifiers that are "acceptable" screen types that do different things:

Code: Select all
ScreenSelectMusic underlay
ScreenSelectMusic overlay
ScreenSelectMusic in
ScreenSelectMusic out
ScreenSelectMusic header
ScreenSelectMusic footer
ScreenSelectMusic banner frame(this has caveats, but is present in the original theme that you're working with)


each of these file names can be represented with .ini, .xml, .redir, .sprite, .lua, .actor (these are different file types that will affect the code syntax)

.lua is Stepmania 5+ only, and .sprite and .actor is far more complicated than I'm willing to explain unless you actually care to listen.

The code above is in XML, so we'll look at xml: (NOTE: Since these elements above will not show up and are "framework" code, the layering and screen position don't really matter unless there is a race condition associated to these screen types, and in the default theme, there isn't one. You need to know the theme you're working on to know whether or not it's more appropriate to put these unseen framework elements on different layers. Now I'm rambling, so I'll stop and get back on topic.)

looking into the default theme here:

Image

We need to find a file that matches one of the ones we're looking for (note my search bar in the top right)

Image

We'll go to ScreenSelectMusic overlay.xml (bottom of the list)

Here's the code with our code already pasted in. We needed to put the Quad layers within an actorframe. Since these Quads will not be visible, it doens't matter for this case which actorframe we choose

Image

Now we search for the next element, and this is the second case of how these files can be used:

Instead of a single xml file to represent a valid screen element type, you can have a folder with the exact name as the element you're trying to utilize in your theme. Valid filenames that are hardcoded that ITG will look for are BGAnimation.ini and default.xml (default.lua in SM5)

Image

inside we find an .ini file. OOPS. We can't paste XML code into an INI because the syntax is different. This is what we find:

Image

Now, this is where I don't know what to do, but in this case, I'll say nix the BGAnimation.ini file all together and start over from scratch with an xml file:

now we have

Image

open and this is what we create:
'
Image

Cool, we have our blank actorframe/children barebones, let's copy and paste:

Image

cool, that's two of the places, and with two unique case scenarios you'll have to deal with.

Do the same with ScreenStage:

Image

Cool, the folder method, and even cooler: there's already a defualt.xml for us to paste into

Image
Image
Image
Community Dropbox Thread wrote:http://r21freak.com/phpbb3/viewtopic.php?f=6&t=24873
User avatar
Horsey
80%
80%
 
Posts: 1390
Joined: Sun May 01, 2011 3:00 pm
Location: Château Frontenac

Re: Flexible X-mods on default theme?

Postby Sckxyss on Sun Mar 15, 2015 5:47 pm

Thanks! The BGAnimations folder makes a lot more sense now.

I made the above changes and it seems like it's almost working now, but not quite. The mods show up in the options correctly, and even loads the defaults correctly the first time I open the menu (1x, +.5x, instead of the 1.5x default). But, when I start the song from the menu, only the base mod stays and the mods aren't properly recombined (and the +.5x is lost, even when I re-enter the menu).
Sckxyss
0%
0%
 
Posts: 7
Joined: Mon Mar 04, 2013 7:40 pm


Return to FAQ and Guides

Who is online

Users browsing this forum: No registered users and 1 guest