Logo

Is there is a way to make the "♥" character being recognized in a .lua file?

Register Log In Back To Forums

Post #1 · Posted at 2017-09-06 11:40:00pm 6.6 years ago

Offline SaikioM
SaikioM Avatar Member
30 Posts
Not Set
Reg. 2015-04-20

Nintendo Network ID: SaikioM
Hello! It's me again, the guy who made the Stepmania 5 theme about some random J-pop girls groups Laughing Out Loud and I'm having a very small issue, well I have a song with the "♥" char as the first letter on the title, and the game recognizes normally but when it sorted by title puts the song on a separate category using the default banner, and it looks out of place, so I made a graphic for the "♥" category, but my problem is that I define the .png file on the lua for that category(the one on the DDR2014 theme), just like this:

elseif group=='♥' then
self:Load(THEME:GetPathG("group title","♥"));

And don't let me save the file propertly, changing the ♥ char for question marks, and if try to save the file with another format the game don't recognize that file as .lua anymore, so I don't know if there's a way to edit that lua propertly, I'm using notepad and wordpad. Sorry I still a noob on this Laughing Out Loud

Post #2 · Posted at 2017-09-07 02:31:54am 6.6 years ago

Offline King_Mew
King_Mew Avatar Member
269 Posts
United States
Reg. 2012-06-27

Nintendo Network ID: mewy573
"Fast 'n Bulbous!"
If you're using Notepad try changing the character encoding of the document to UTF-8. Notepad might also be saving it correctly but it isn't displaying the heart character. If that doesn't work, you should be able to use a standard code editor like Notepad++ to edit it with less problems.
http://mew151.net/creative/coke_a.png Rippin' bro, you cleared it!

Post #3 · Posted at 2017-09-07 03:33:38am 6.6 years ago

Offline MadkaT
MadkaT Avatar Member
820 Posts
Not Set
Reg. 2009-11-24

As King_Mew have said, you need to change the encoding of the file to UTF-8, the heart character is unicode and is not included in the ANSI set. That's the reason that is replaced by another character.

Post #4 · Posted at 2017-09-07 03:57:40pm 6.6 years ago

Offline SaikioM
SaikioM Avatar Member
30 Posts
Not Set
Reg. 2015-04-20

Nintendo Network ID: SaikioM
Many thans for your help, Notepad++ is a very helpful tool and it saves the heart character correctly but the game keeps ignoring the file for the category and put the default banner instead :/

Post #5 · Posted at 2017-09-07 07:21:37pm 6.6 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30

Is your Lua producing any errors?

You can turn on ShowThemeErrors by holding F3 and pressing F6, then holding F3 and pressing 8.

If you have ShowThemeErrors turned on and your theme has Lua errors, StepMania will display the error at the top of screen when the error occurs. This may help you solve the problem with your banner, and even if not, will help you become a better themer.

Post #6 · Posted at 2017-09-07 09:45:46pm 6.6 years ago

Offline SaikioM
SaikioM Avatar Member
30 Posts
Not Set
Reg. 2015-04-20

Nintendo Network ID: SaikioM
Thanks for the tips Smile I've tried to encode the file in UTF-8 but the game don't recognize the .lua file if I do that, one thing I noted is that every song with a symbol as the first letter is getting in the "other" category, so now I just need to make the game recognizes the graphic for that category, but I can't simply just name it "other" because there's a png file for every letter and the game tells me there's duplicated elements Sad

Post #7 · Posted at 2017-09-08 12:54:39am 6.6 years ago

Offline MadkaT
MadkaT Avatar Member
820 Posts
Not Set
Reg. 2009-11-24

Yes, I've forgot that it also happens with the Preferred Songs file, you could replace the heart character with another one? Like asterisk or one unused letter if is for your fullgame.

Post #8 · Posted at 2017-09-08 04:06:38am 6.6 years ago

Offline SaikioM
SaikioM Avatar Member
30 Posts
Not Set
Reg. 2015-04-20

Nintendo Network ID: SaikioM
But I need to change the name of the song in order to make it work, I've tried with other song with the Ç character and it's the same, I guess I'l have to remove the symbols from the title of the songs, it won't be accurate with the jackets but it's still a minor thing.
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: 4% · Database: 4% · Server Time: 2024-04-24 12:09:33
This page took 0.007 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language