RandomBG - Random Backgrounds for 1.2.451

Discuss mods and get help with mods ONLY
This topic is 16 years and 6 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 9:33 am

Hey guys, i just added some rudimentary code (to Stage.py) to enable random backgrounds.

Included are 5 backgrounds, Guitar Hero themed (Anti-GH people can just delete the 5 .pngs and add your own .pngs)

You NEED FoF 1.2.451 + raph's GH Mod 1.2.451

Grab RandomBG here

oh and the mod does not display the speaker/crowd animations. (they wont suit the newer backgrounds)

readme.txt
Requirements
Frets on Fire 1.2.451
Raph's GH Mod 1.2.451

EXTRA SIDE NOTE:
For fans of the newer HOPO system, just copy over "Stage.pyo" from this library.zip into

your library.zip

Installation Instructions
1) Backup your "data/library.zip" and "data/mods/raph's GH Mod/stage.ini" files
2) Copy the data folder from this zip, to your Frets on Fire folder, Overwrite library.zip and stage.ini(inside raphs folder)

Adding more Backgrounds
1) Make sure dimensions are 775x500, save it as bgx.png(replace x with whatever number comes after)
2) Copy any one of the .svg files and rename them (ie. bg8.png goes with bg8.svg)
3) Go into raph's GH Mod folder, edit stage.ini, look under [layer1] and change the

"backgrounds" option to the total number of backgrounds you have.

Side note :
This mod doesnt check if the file exists, so make sure you dont have any gaps in your filenames (ie, if you have only 3 backgrounds, bg1,bg2,bg3 is OK. bg1,bg2,bg8 is NOT OK)
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)
[/url] -> discussion thread

Useful Stuff
-> SH Songs(1,2) (Dr Zaiuss, Apru)
-> label collection (winniez)
-> .chart to .sng converter (winniez)
User avatar
RexMundi412
Member
Posts: 724
Joined: March 7th, 2007
Location: Pittsburgh, PA
Reputation: 0

Postby RexMundi412 » Sun Jul 29, 2007 10:06 am

I don't have 1.2 to see if it works. But if it does Great job! This has been on many peoples wish list.
...
User avatar
warhol
Member
Posts: 5437
Joined: March 15th, 2007
Location: Philippines
Reputation: 9
Contact:

Postby warhol » Sun Jul 29, 2007 10:15 am

Oh my god.

+1 best noob ever
http://fof-empire.myminicity.com/tra
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 11:19 am

RexMundi412 wrote:I don't have 1.2 to see if it works. But if it does Great job! This has been on many peoples wish list.

i could do it for 1.1 vanilla as well. will get it up maybe tomorrow

warhol wrote:Oh my god.

+1 best noob ever


well does it work ?
Last edited by tummster on Sun Jul 29, 2007 11:23 am, edited 1 time in total.
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)
User avatar
meadow
Member
Posts: 223
Joined: April 10th, 2007
Reputation: 0

Postby meadow » Sun Jul 29, 2007 11:53 am

Screenies
User avatar
RexMundi412
Member
Posts: 724
Joined: March 7th, 2007
Location: Pittsburgh, PA
Reputation: 0

Postby RexMundi412 » Sun Jul 29, 2007 12:13 pm

i could do it for 1.1 vanilla as well. will get it up maybe tomorrow
Vanilla is good, real good. Yummm... I can taste it even now :p .

If possible could you pleas make it so you could set something in the song.ini to select the background you want for that song?<only do if it's not to much work for ya'
Last edited by RexMundi412 on Sun Jul 29, 2007 12:16 pm, edited 1 time in total.
...
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 12:15 pm

meadow wrote:Screenies

Image
Image
Image

oh and by the way, when adding new backgrounds, you have to edit this line in the .svg file as well (just open it in wordpad)
assuming its bg6.svg

Code: Select all

sodipodi:docname="bg6.svg"


New Background
Image


off topic : why cant we edit the previous post ?
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)
User avatar
RexMundi412
Member
Posts: 724
Joined: March 7th, 2007
Location: Pittsburgh, PA
Reputation: 0

Postby RexMundi412 » Sun Jul 29, 2007 12:18 pm

off topic : why cant we edit the previous post ?
This forum is a bit strange on editing posts. I think you only have till some one else posts in that thread.

On editing, can you check the question I edited into my last post?


Before you go ahead on this. Just a heads up on 1.1. Virtually all users of it use RF_MOD. And many like myself use Capo's MOD and Static SVG_MOD. So you may want to check those out. I don't know code so I don't how or if any of these will effect what you do. But if it's not compatable with at least RF_MOD, I doubt many people would want it.
Last edited by RexMundi412 on Sun Jul 29, 2007 12:34 pm, edited 1 time in total.
...
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 12:31 pm

edit : 0.2 doesnt work, cause i compressed the bgs to PNG8, which cant be rendered apparently. So im using PNG24. Get 0.2B

RandomBG 0.2B still for 1.2.451 only
changes :
edited the svgs to have the same width and height (forgot to do that earlier)
new background

RexMundi412 wrote:
If possible could you pleas make it so you could set something in the song.ini to select the background you want for that song?<only do if it's not to much work for ya'

Yea, it should be possible, i think... ill look into it soon.
Last edited by tummster on Sun Jul 29, 2007 1:28 pm, edited 1 time in total.
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)
Shredder
jake2k3
Member
Posts: 2801
Joined: February 24th, 2007
Location: River City, Alabama
Reputation: 0

Postby jake2k3 » Sun Jul 29, 2007 3:14 pm

I like the way this is heading. I'm a 1.1.324 user though, so I guess patiently waiting is as close as I get for now.

Can you explain the process you go through (after the mod is installed) to change which backgrounds appear? Also, how come the crowd sounds and such don't work? Did you just disable them? I would like for that option to remain toggleable in the Mod Settings menu. I'm thinking of having a few concert backgrounds be the ones this mod picks up (I don't like the close up character shots, just my opinion).

Hope this works out for OldFoF! :)
~Jake2k3
Goodbye everyone. It's been fun. I spent many many hours here on these boards and playing/contributing to FoF. Today I uninstalled my game and deleted all my files. I just don't have the time or interest anymore. I won't be coming back here anymore. I might show up in the IRC from time to time to chat. I regret nothing.

So long, farewell.
~Jake2k3
zelurker
Member
Posts: 21
Joined: June 21st, 2007
Location: France
Reputation: 0

Postby zelurker » Sun Jul 29, 2007 4:37 pm

It looks interesting, but could you release the source changes for the poor linux users please instead of the .pyo files (they don't seem to work at all in linux for amd64... !)
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 10:29 pm

ill post the source changes when i get back.
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Sun Jul 29, 2007 11:09 pm

jake2k3 wrote:I like the way this is heading. I'm a 1.1.324 user though, so I guess patiently waiting is as close as I get for now.

Can you explain the process you go through (after the mod is installed) to change which backgrounds appear? Also, how come the crowd sounds and such don't work? Did you just disable them? I would like for that option to remain toggleable in the Mod Settings menu. I'm thinking of having a few concert backgrounds be the ones this mod picks up (I don't like the close up character shots, just my opinion).

Hope this works out for OldFoF! :)
~Jake2k3

when it comes to building the layers, it parses stage.ini,

Code: Select all

if section == "layer1"
  if "texture = random"
    rIndex = random from 1 to (value of the backgrounds option)
    get a random integer from 1 to rIndex
    return "bg%d.svg" % rIndex


its something like that, im at school, so i dont have the exact source at the moment.

for raph's GHMod 1.2, there are no crowd sounds... does he include it with his 1.1 version ?
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)
Leather Rebel!
User avatar
Lone Wolf
Member
Posts: 416
Joined: March 14th, 2007
Reputation: 0

Postby Lone Wolf » Mon Jul 30, 2007 7:05 am

Yes, the crowd sounds are for 1.1.324 only.
tummster
Member
Posts: 62
Joined: July 24th, 2007
Location: sg
Reputation: 0

Postby tummster » Mon Jul 30, 2007 1:04 pm

ok, source is here.

File : Stage.py

add this with the rest of the imports

Code: Select all

import random


then further down, at the Stage class (do a find for "# Build the layers")

it should look like this.

Code: Select all

# Build the layers
    for i in range(32):
      section = "layer%d" % i
      if self.config.has_section(section):                
        def get(value, type = str, default = None):
          if self.config.has_option(section, value):
            if section == "layer1":
              if value == "texture":
                if self.config.get(section, value) == "random":                  
                  rIndex = random.randint(1, int(self.config.get(section, "backgrounds")))
                  return ("bg%d.svg" % rIndex)                
            return type(self.config.get(section, value))
          return default
        
        xres    = get("xres", int, 256)
        yres    = get("yres", int, 256)
        texture = get("texture")


feel free to add/modify what you want, post any changes.
Last edited by tummster on Mon Jul 30, 2007 1:08 pm, edited 1 time in total.
[url=http://www.mediafire.com/?0cp69yrydjr]Random Backgrounds Mod 0.2B (For Frets on Fire 1.2.451)

[/url] -> discussion thread



Useful Stuff

-> SH Songs(1,2) (Dr Zaiuss, Apru)

-> label collection (winniez)

-> .chart to .sng converter (winniez)

Return to “FOF Mod Discussion and Support”

Who is online

Users browsing this forum: No registered users and 32 guests