Hey, we have forums!

Author Topic: Changing song symbols?  (Read 20519 times)

0 Members and 1 Guest are viewing this topic.

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Changing song symbols?
« on: December 30, 2008, 03:43:01 am »
I'd like to use the built-in song system to add some new songs to my mod, but I'm running into a minor problem.  I can get the songs to work, and I can get them to appear in the songs section of the pause screen.  Unfortunately, I can't change the symbols- the game just ignores any "song/songslot-*.png" files I add in the graphics folder of my mod if a file of that name already exists in the data files.  So, for example, whatever song is in slot 2 will have the Energy Form symbol, regardless of whether I have a file named songslot-2.png in my mod.

This seems to be due to the game caching those images when it first loads, and never checking to see if they've changed, as when I remove the line "song/*.png" from the file precache.txt, everything starts working properly.  So, I guess what I want to know is: is there any way I can force the game to reload the precached images?

Alternately, a way to display any songs in slots 11 and up on the song list screen would also work.

- Edwards
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline silverflagon

  • Dream Bit
  • **********
  • Posts: 1511
    • View Profile
    • Salties Idiosyncrasies
Re: Changing song symbols?
« Reply #1 on: December 30, 2008, 06:25:00 pm »
I'm sorry I can't help with this question, can you wait until the holiday time is over and more people are here to help solve problems?
http://dl.getdropbox.com/u/485144/Tiger%20Tank.mp3

Duct tape is like 'The Force'. It has a light side and a dark side, and it holds the universe together

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Changing song symbols?
« Reply #2 on: December 31, 2008, 12:27:20 am »
I wouldn't be surprised if you can't. I've tried overriding other files (like elementeffects) in a mod just to see if it would work but I couldn't get it to. Enabling recache on the mod doesn't seem to change anything.

Offline Edwards

  • Bit Bit
  • ****
  • Posts: 93
    • View Profile
Re: Changing song symbols?
« Reply #3 on: December 31, 2008, 12:28:44 am »
Well, I seem to have worked out one method myself, although it isn't particularly nice to the mod's load time.  Simply add the line "reloadTextures()" to mod-init.lua, and the game will reload everything when the mod starts, including the precached textures.  Unfortunately, this means it reloads all the images, so launching the mod takes significantly longer than it normally does.  I'm still open to suggestions for a way to do this that doesn't have a major impact on the load time.

@Guy: "Enabling recache on the mod"?

- Edwards
« Last Edit: December 31, 2008, 12:31:19 am by Edwards »
You should only need one canister shell to bag your deer using your howitzer, but assemble more than one if  you have a mind to.1

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Changing song symbols?
« Reply #4 on: December 31, 2008, 01:59:26 am »
If you take a look at jukebox.xml you'll see some Properties included there: recache, runBG and debugMenu. I don't know what any of them do though I think debug has been disabled in the program so you can't use it even if you enable it in a mod.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Changing song symbols?
« Reply #5 on: December 31, 2008, 02:18:33 am »
Hmm recache -should- work....

Offline Danger Mouse

  • Hero Bit
  • *********
  • Posts: 624
  • Shush.
    • View Profile
    • Danger Mouse
Re: Changing song symbols?
« Reply #6 on: December 31, 2008, 02:25:36 am »
Looks like we're stuck with a long way for now... let us know if you find any other method.

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Changing song symbols?
« Reply #7 on: December 31, 2008, 02:46:49 am »
Okay, I tested it a little more and recache -does- work and seems to function identically to reloadTextures(). For me this only takes a few extra seconds so I'm not worried about the speed, however there are a couple of problems:
1) If you load a saved game from the mod it will not recache/reload textures. This is why I initially thought recache didn't work.
2) If you quit the mod and go back to playing normal aquaria it will again not reload so it retains all the graphics from the mod.
Number 2 isn't a big deal though and is actually helpful as a workaround for 1: Load the mod, quit the mod (only necessary if the mod doesn't come with a title screen allowing you load games), then load your saved game for the mod. Hopefully number 1 can be fixed though.
As a side note, it'd be great if the saved game window could show what mod each game is for :)
« Last Edit: December 31, 2008, 02:53:21 am by Guy »

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Changing song symbols?
« Reply #8 on: December 31, 2008, 03:29:41 am »
Okay, I tested it a little more and recache -does- work and seems to function identically to reloadTextures(). For me this only takes a few extra seconds so I'm not worried about the speed, however there are a couple of problems:
1) If you load a saved game from the mod it will not recache/reload textures. This is why I initially thought recache didn't work.
2) If you quit the mod and go back to playing normal aquaria it will again not reload so it retains all the graphics from the mod.
Number 2 isn't a big deal though and is actually helpful as a workaround for 1: Load the mod, quit the mod (only necessary if the mod doesn't come with a title screen allowing you load games), then load your saved game for the mod. Hopefully number 1 can be fixed though.
As a side note, it'd be great if the saved game window could show what mod each game is for :)

Thanks for the feedback! That's very helpful. :)

Offline Danger Mouse

  • Hero Bit
  • *********
  • Posts: 624
  • Shush.
    • View Profile
    • Danger Mouse
Re: Changing song symbols?
« Reply #9 on: December 31, 2008, 03:46:48 am »
I like the suggestion.. but a better way to do it is have some sort of tab that is created for each of the mods, that way each has it's own separate save game list. But either way, it would be a nice touch.

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Changing song symbols?
« Reply #10 on: January 01, 2009, 09:54:20 pm »
Aha, I suddenly clicked as to what runBG is. I'm not sure how this would apply on the Windows version of Aquaria but on the Mac if you're running in a window and switch to another app the game will freeze itself, resuming when you return. runBG prevents this and is important for the jukebox mod.

Sorry, I realise this is off-topic ::)

Alec, what exactly is the debugMenu? Would it be useful to mod developers?

Offline RobertWalker

  • Extra Bit
  • *****
  • Posts: 154
    • View Profile
    • My Blog
Re: Changing song symbols?
« Reply #11 on: January 02, 2009, 04:49:10 pm »
I accidentally invoked it once when I was testing the patch. I don't recall how I did it, and before I realized what was on the screen I hit something and it disappeared. I only know it was a debug menu because the interface looked "programmery" rather than polished and just before it went away I glimpsed the word "Invincibility." I would guess that it's probably disabled in the final build. Although there is a debug option in the user settings XML file...

Offline Hiro

  • Hero Bit
  • *********
  • Posts: 674
  • Kriel's Legionary
    • View Profile
    • The Rat Hole
Re: Changing song symbols?
« Reply #12 on: January 03, 2009, 01:45:07 pm »
Hmm, an interesting problem and one I have no input to help with for. xD But it seems a solution has been found anyway.

As for this:
Aha, I suddenly clicked as to what runBG is. I'm not sure how this would apply on the Windows version of Aquaria but on the Mac if you're running in a window and switch to another app the game will freeze itself, resuming when you return. runBG prevents this and is important for the jukebox mod.
Windows has the exact same thing with switching to different app.s, so it applies in the exact same way as on a mac. ;)

And I believe that debug menu is in some of the videos Alec has released. I'm sure it would be useful to modders, but I don't have any idea how to invoke it or if its even possible.
My site is: http://www.therathole.co.nr/
Where I put pictures and blog posts and stuff..

Offline Danger Mouse

  • Hero Bit
  • *********
  • Posts: 624
  • Shush.
    • View Profile
    • Danger Mouse
Re: Changing song symbols?
« Reply #13 on: January 03, 2009, 11:48:26 pm »
I surprised someone has bumped into the debug menu... I've seen it in Alec's video blogs as well and I thought it was hardcoded to be OFF, so that it couldn't be accessed...am I wrong Alec?

Offline Guy

  • Bit Bit
  • ****
  • Posts: 62
    • View Profile
Re: Changing song symbols?
« Reply #14 on: January 04, 2009, 12:10:36 pm »
Yeah I caught a glimpse of it in a video too. I think Alec said somewhere that it's invoked with ` but is disabled.

[edit] Here's the thread :  Replacing the Main Character
Alec says there he may add it into the next patch. Hint hint :)
« Last Edit: January 04, 2009, 12:13:15 pm by Guy »