Post #1 · Posted at 2016-10-30 03:21:02pm 8.5 years ago
![]() | |
---|---|
![]() |
Member |
263 Posts | |
![]() | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2016-10-30 03:21pm
Hi all,
Just curious if it would be possible to use the background dancer characters within the menu system in Stepmania 5? I know that it's possible to get characters within the How To Play but there's no call that I can find within the Lua's within SM5 so far to allow the theme creator to use them.
I'd like to have the rest animation working for a selected character within the menu. I'm thinking this could be great if we could work it out for character select screens, select style screens (like the SuperNOVA ones), etc.
If anyone has any ideas, feel free to share them here! I'm keen to try anything out.
Just curious if it would be possible to use the background dancer characters within the menu system in Stepmania 5? I know that it's possible to get characters within the How To Play but there's no call that I can find within the Lua's within SM5 so far to allow the theme creator to use them.
I'd like to have the rest animation working for a selected character within the menu. I'm thinking this could be great if we could work it out for character select screens, select style screens (like the SuperNOVA ones), etc.
If anyone has any ideas, feel free to share them here! I'm keen to try anything out.
Post #2 · Posted at 2016-10-31 02:41:34pm 8.5 years ago
You just need to use a model object inside an Actor Frame
Just provide the paths to the character files (Materials/Meshes/Bones) and load it.
Quote
local character = Def.ActorFrame {
Def.Model{
Materials = MaterialPath;
Meshes = MeshPath;
Bones = RestAnimationPath;
InitCommand=cmd(Center);
};
};
Def.Model{
Materials = MaterialPath;
Meshes = MeshPath;
Bones = RestAnimationPath;
InitCommand=cmd(Center);
};
};
Just provide the paths to the character files (Materials/Meshes/Bones) and load it.
Post #3 · Posted at 2016-10-31 04:31:58pm 8.5 years ago
![]() | |
---|---|
![]() |
Member |
263 Posts | |
![]() | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2016-10-31 04:50pm
Thanks for that! I don't quite know which paths to use to get the character model working though. I'm using the default Character folder with one character in it - Rage.
Could you explain more on what paths I would need to use for this? Especially the materials path since there are several .bmp files for the textures.
Sorry if it's a newbie sort of question, I understand what you're saying I should do, I'm just stumped on what paths it'll need.
Hope you can help!
This is my current code (I put the folder for Rage and the bones files inside the SelectStyle Single folder):
t[#t+1] = Def.ActorFrame {
Def.Model{
Materials = (5th) Rage/rage.bmp;
Meshes = (5th) Rage/model.txt;
Bones = (5th) Rage/Rest/Rest.redir;
InitCommand=cmd(Center);
};
};
Could you explain more on what paths I would need to use for this? Especially the materials path since there are several .bmp files for the textures.
Sorry if it's a newbie sort of question, I understand what you're saying I should do, I'm just stumped on what paths it'll need.
Hope you can help!
This is my current code (I put the folder for Rage and the bones files inside the SelectStyle Single folder):
Quote
t[#t+1] = Def.ActorFrame {
Def.Model{
Materials = (5th) Rage/rage.bmp;
Meshes = (5th) Rage/model.txt;
Bones = (5th) Rage/Rest/Rest.redir;
InitCommand=cmd(Center);
};
};
Post #4 · Posted at 2016-10-31 06:53:29pm 8.5 years ago
![]() | |
---|---|
![]() |
Member |
828 Posts | |
Not Set | |
Reg. 2009-11-24 | |
Just use Character:GetModelPath() for materials and meshes, the bones path is correct.
The GetModelPath function and other character related functions are documented here if you want to know some more:
https://github.com/stepmania/stepmania/blob/master/src/Character.cpp
The GetModelPath function and other character related functions are documented here if you want to know some more:
https://github.com/stepmania/stepmania/blob/master/src/Character.cpp
Post #5 · Posted at 2016-10-31 07:39:52pm 8.5 years ago
![]() | |
---|---|
![]() |
Member |
572 Posts | |
![]() | |
Reg. 2014-06-14 | |
This could be perfect for my supernova 2 theme lol if I knew how to get the characters from the select style screen out -_-
Post #6 · Posted at 2016-11-03 05:00:51am 8.4 years ago
![]() | |
---|---|
![]() |
Member |
263 Posts | |
![]() | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2016-11-03 05:01am
So I got it working finally - I had not put quotations around the Materials, Mesh and Bones lines.
HOWEVER, there is a slight problem. No matter what theme I place these assets in, the character models seem to be "reversed". Below is a picture of the code running in front of the playmode select on the default theme.

Below is my code:
t[#t+1] = Def.Model{
Materials = "(5th) Rage/model.txt";
Meshes = "(5th) Rage/model.txt";
Bones = "(5th) Rage/Rest/Rest.redir";
InitCommand=cmd(x,0;y,250;zoom,15;);
};
Now I've run the files locally rather than from the Character folder as for some reason I couldn't get Character:GetModelPath() to work (I think I might not have been running the right syntax).
Does anyone know how I could fix this up? Would love to hear any ideas and try them out!
HOWEVER, there is a slight problem. No matter what theme I place these assets in, the character models seem to be "reversed". Below is a picture of the code running in front of the playmode select on the default theme.

Below is my code:
Quote
t[#t+1] = Def.Model{
Materials = "(5th) Rage/model.txt";
Meshes = "(5th) Rage/model.txt";
Bones = "(5th) Rage/Rest/Rest.redir";
InitCommand=cmd(x,0;y,250;zoom,15;);
};
Now I've run the files locally rather than from the Character folder as for some reason I couldn't get Character:GetModelPath() to work (I think I might not have been running the right syntax).
Does anyone know how I could fix this up? Would love to hear any ideas and try them out!
Post #7 · Posted at 2016-11-03 02:11:14pm 8.4 years ago
![]() | |
---|---|
![]() |
Member |
828 Posts | |
Not Set | |
Reg. 2009-11-24 | |
Add a cullmode to the model:
cullmode( back, front, or none ) - In rendering, cull essentially means to not draw. With cullmode set to back, the back side of objects won't be drawn. For flat images, this means if they are rotated by between 90 and 270 degrees around the x or y axes they won't be drawn, as only the back would be visible. With cullmode front, the object won't be drawn if only the front is visible. The default value for this setting is none, in which case both will be drawn. The arguments are strings, and must be in quotes if used in a lua function. They are not case sensitive.
cullmode( back, front, or none ) - In rendering, cull essentially means to not draw. With cullmode set to back, the back side of objects won't be drawn. For flat images, this means if they are rotated by between 90 and 270 degrees around the x or y axes they won't be drawn, as only the back would be visible. With cullmode front, the object won't be drawn if only the front is visible. The default value for this setting is none, in which case both will be drawn. The arguments are strings, and must be in quotes if used in a lua function. They are not case sensitive.
Post #8 · Posted at 2016-11-03 03:40:29pm 8.4 years ago
![]() | |
---|---|
![]() |
Member |
263 Posts | |
![]() | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Hmm, thanks for the tip, I'm pretty sure this should solve it. However if I add cullmode("back"); to my InitCommand=cmd(x,0;y,250;zoom,15;); it stuffs up. I sometimes just lose the zoom that I need (otherwise the character is really small - I tried to replicate this glitch and I couldn't) or I get nothing running from the lua.
Any thoughts as to what could be happening?
Any thoughts as to what could be happening?
Post #9 · Posted at 2016-11-03 04:13:39pm 8.4 years ago
![]() | |
---|---|
![]() |
Member |
828 Posts | |
Not Set | |
Reg. 2009-11-24 | |

Just use this:
Quote
rotationy,180;cullmode,'CullMode_None';
Post #10 · Posted at 2016-11-03 04:27:21pm 8.4 years ago
![]() | |
---|---|
![]() |
Member |
263 Posts | |
![]() | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
You sir are the absolute best!
Issues solved, works like a charm! Thank you so much, I really appreciate it!
