Problem about music box script atelier

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Here's the script: http://www.atelier-rgss.com/RGSS/System/ACE_SYS07.html

In the original script, the make background part was like this:

def make_background if @background.bitmap != nil @background.bitmap.dispose @background.bitmap = nil end if RPG_FileTest.music_cover_exist?(song_name + "_B1") @background.bitmap = Cache.music_cover(song_name + "_B1") else @background.bitmap = Cache.music_cover("") end @background.opacity = 0 if @background2.bitmap != nil @background2.bitmap.dispose @background2.bitmap = nil end if RPG_FileTest.music_cover_exist?(song_name + "_B2") @background2.bitmap = Cache.music_cover(song_name + "_B2") else @background2.bitmap = Cache.music_cover("") end @background2.opacity = 0 endIt will show the background named song_name_B1 or _B2 when the music song_name is turned on. But with this, i have to choose a background for each song, it's really bothersome, 'cause i want some song will have a same background, and some have another background. So, i modified that part like this:

def make_background if @background.bitmap != nil @background.bitmap.dispose @background.bitmap = nil end if @background2.bitmap != nil @background2.bitmap.dispose @background2.bitmap = nil end if song_name == ("Battle")or("Boss")or("Crossover Battle")or("Crossover")or ("Enrika")or("Forest")or("House")or("Past")or("Pedo's Castle")or("Roko") @background2.bitmap = Cache.music_cover("Chap0_B2") @background.bitmap = Cache.music_cover("Chap0_B1") end if song_name == ("Bath")or("Chuunibyou School")or("Danger")or("Dark Flame Master")or ("Welcome to the Chuniibyou World!")or("Secret") then @background2.bitmap = Cache.music_cover("Chap1_B2") @background.bitmap = Cache.music_cover("Chap1_B1") end if song_name == ("Hurry, Starfish")or("Illusions")or("Meaningful Ways to Pass the Time")or ("Nagisa")or("Spring Wind")or("Tea in the Reference Room")or("To the same Heights")or ("Town, Flow of Time, People") then @background2.bitmap = Cache.music_cover("Chap2_B2") @background.bitmap = Cache.music_cover("Chap2_B1") end if song_name == ("Dai")or("Ichuu")or("Kishuu")or("Senjin")or("Shougun")or ("Shunshuu")or("Shuugeki")or("Takuchaku")or("Yuushou") then @background2.bitmap = Cache.music_cover("Chap3_B2") @background.bitmap = Cache.music_cover("Chap3_B1") end @background.opacity = 0 @background2.opacity = 0 endWell, as you can see, my idea is to make the song "battle", "boss",... have chap0_B1 and _B2 background, "Illusions", "Nagisa",... have chap2_B1 and _B2 background,... just like that. But, it's really strange that, no matter what song it is, the only background showed is chap3_B1 and _B2. I really don't know what i was wrong? Can someone help me, please?
 

Cressalia

Veteran
Member
Joined
Oct 15, 2012
Messages
4
Reaction score
6
First Language
English
Primarily Uses
RMVXA
So instead of editing the script what you could do is have one image for a selection of songs, but make multiples of the image with the different song names. For Example: I would have a song called Field, then I would have a song called Field2. I want them to have the same background so I make one image with the first songs name, but I make a copy with the second songs name. 

Then in area 56-61 where you define the songs, when you put the songs they will have the same background. The if:else statement you edited merely checks if the song has the same name as the cover and then puts the image where it should go. And the songs are defined in the beginning. 

I hope this made sense because I toyed with the script a bit in the Master Demo from the site which has Enterbrain songs with the same background.
 

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
So instead of editing the script what you could do is have one image for a selection of songs, but make multiples of the image with the different song names. For Example: I would have a song called Field, then I would have a song called Field2. I want them to have the same background so I make one image with the first songs name, but I make a copy with the second songs name. 

Then in area 56-61 where you define the songs, when you put the songs they will have the same background. The if:else statement you edited merely checks if the song has the same name as the cover and then puts the image where it should go. And the songs are defined in the beginning. 

I hope this made sense because I toyed with the script a bit in the Master Demo from the site which has Enterbrain songs with the same background.
Erm, that means, i have to make a copy of image for every song? I was thought about that before, but it will make my game really large size, just because those copy of image. Well, my game have a lot of BGM, too. And, i really don't know what you're talking about my if:else statement. I'm a beginner when it comes to script.
 

Cressalia

Veteran
Member
Joined
Oct 15, 2012
Messages
4
Reaction score
6
First Language
English
Primarily Uses
RMVXA
If you're a beginning scripter I wouldn't try to edit a complicated script. But the only way I can see in fixing the problem is that you make image copies named for the songs you want to have the same cover. Your game will have to be large if you want to have covers for every song in your game. I can't think of any other way to help you with this because the part you edited wasn't really meant to be edited.
 

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
I've figured out how to make it works by using case, so... problem solved. Please close this topic :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top