Gamer125 / fofix

Automatically exported from code.google.com/p/fofix
0 stars 0 forks source link

Add more varables and features to the rockmeter.ini #1153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Here is a list of 11 things that i beleave must be added to the new
rockmeter.ini settings:

- Add support For if, then. or elif statements directly in the rockmeter.ini
- add support for you to change the visibility of items if you please, then
have them become visible with the if     then statements
- add support for the rockmeater.ini to be able to show certain images for
certain instruments, or players, maybe     again with if then statements.
- Add support for images to be shown when the user is in star power, star
power is activated, or starpower is     deactivated
- Add support for an image to be shown when you miss a note, or hit a note.
- Add Support for any image to be dynamically faded in and out like the
Overdrive full.png
- add support for BPM to be a variable that you may multiply add subtract
and divide by
- add support for a variable which will have how long the song is
- add support for a variable which will have how long the song has left
- add support for a variable which will a have how long the song has been
played so far 
- change how the overdrive fill works, right now it is really hard to
position on the screen.

Original issue reported on code.google.com by dfan...@gmail.com on 14 Feb 2010 at 10:23

GoogleCodeExporter commented 8 years ago
- Add support For if, then. or elif statements directly in the rockmeter.ini

I was thinking of adding a condition variable that allows for a single 
statement such
as condition = a != 35 and if it's true then show it.  You can handle else with
different layers then, I don't want to make it too complex in the code, you 
have to
remember I myself am still learning python, I started learning python when I 
started
messing around with FOF, if I make it hard on myself imagine what other newbies 
will
be feeling.

- add support for you to change the visibility of items if you please, then
have them become visible with the if     then statements

This will be covered with the conditional value

- add support for the rockmeater.ini to be able to show certain images for
certain instruments, or players, maybe     again with if then statements.

it already has support for this.  Example: part = guitar will show only if the
player's part is guitar

- Add support for images to be shown when the user is in star power, star
power is activated, or starpower is     deactivated

this will be handled with the conditional value

- Add support for an image to be shown when you miss a note, or hit a note.

This will be a bit complex, but if I just bring back some of the old code it 
should
work.  If you haven't noticed, most of my code is built directly from the old
stage.ini code, in fact with the few fixes I've made we can reimplement the 
stage
code so it can play on top of backgrounds and such no problem.  That was my 
original
goal but then it branched into the new rockmeter.

- Add Support for any image to be dynamically faded in and out like the
Overdrive full.png

I could add a cycle method that you could use when setting visibility.  Example:
visibility = cycle(.02) would increment it in steps of .02 every frame until it 
hits 1.

- add support for BPM to be a variable that you may multiply add subtract
and divide by
- add support for a variable which will have how long the song is
- add support for a variable which will have how long the song has left
- add support for a variable which will a have how long the song has been
played so far 

Okay, little trick time.  If you know your variables in the guitarscene.py throw
stage. in front of the variable and you can use it in the rockmeter.ini ;) 
Example:
stage.bpm will be the song's bpm at the current point.  This can work for any
variable in the guitarscene.py, but I will add quick methods and math so then 
the
themer won't always have to do tricky things like that, that's what a lot of 
things
currently are if you look at the code.  I do want to add features for time 
since that
is actually quite tricky and stage. only works for global variables and not 
private.

- change how the overdrive fill works, right now it is really hard to
position on the screen.

This can be changed by throwing a .x at the end of the equation.
.5*(1+oBarScale*(currentSP-1)) is standard right now.
(.5*(1+oBarScale*(currentSP-1))) + .25 would have it shifted a quarter of the 
screen
to the right.

I think that's everything, I hope you are satisfied with my answers.

Original comment by n_hyd...@comcast.net on 15 Feb 2010 at 10:24

GoogleCodeExporter commented 8 years ago
Python 2.5+ supports ternary operations as is, so you already can use 'if's. Its
current form is as follows: (Note that I haven't tested this form)
a if a<b else b
and this breaks down as follows:
(this if condition=true) if (condition) else (this if condition=false)

Of course, since this was introduced in python 2.5, it won't work in python 
2.4. I
believe the current plan is to drop 2.4, but until then, I found this dodgy 
workaround:
(a<b) and a or b
i.e:
(condition) and (this if condition=true) or (this if condition=false)
The problem with this is that "a" may equal zero, in which case it will go to 
"b"
anyway. A workaround for that is this:
((a<b) and [a] or [b])[0]
Making them arrays mean they'll always be "true" but then you have to get the 
first
element using [0]

it's difficult for me to explain, so I'm just going to go with an example: 
displaying
the current multiplier using the streak variable. The multiplier is 
(streak/10)+1, to
a maximum of 4, so if (streak/10)+1 is bigger than 4, we need to still display 
"4".
You'd normally do something like:

if((streak/10)+1 < 4){ text = str((streak/10)+1) + "x" }
else { text = "4x" }

In python 2.5+ you could do:

text = str( ((streak/10)+1) if (streak/10)+1 < 4 else 4 ) + "x"

And here's what I did:

text = str( ((int(streak*.1)+1<4) and [int(streak*.1)+1] or [4])[0] )+"x"

(I substituted streak/10 for streak*.1 because multiplication is quicker than
division, so I've been taught)

Hope this helps!

Original comment by death.au on 15 Feb 2010 at 10:58

GoogleCodeExporter commented 8 years ago
Added WishList type and lowered priority.

Original comment by fuzio...@gmail.com on 1 Sep 2010 at 2:22

GoogleCodeExporter commented 8 years ago
pretty much everything on this list has been fixed over time plus more,so im 
just going to mark it as fixed.

Original comment by matthews...@gmail.com on 19 Jul 2011 at 8:44