Python Coding Tutorials *Current Amount: 3*
+2
Maze
Gitert994
6 posters
Rock Star :: General :: Fof Code Modding
Page 1 of 1
Python Coding Tutorials *Current Amount: 3*
Intro/LESSON 1
What color symbols mean in PYTHON!!
Let's run through some of the colors of the text.
***********************************
Blue
Blue is the class of code
Red
Red: Starts with a # sign. Means will not be active in the code. Like this:
#racer
Config.define("game", "rbnote", int, 0, text = _("Rock Band Version"), options = {0: _("Regular"), 1: _("Beta")}) #racer
The #racer will be in red text but will not be used as part of the code. He put it there for other coders to show he did it.
Red is only used when code is commented out
Green
Green: Only comes after "quotes". All quotes stays green until quote is closed. Means Text. Will apear as text in game
#racer
Config.define("game", "rbnote", int, 0, text = _("Rock Band Version"), options = {0: _("Regular"), 1: _("Beta")}) #racer
The quotes of Rock Band Version appear in the options pannel. If you remember your options you pick which version you want.
green is exact words the game gets or text for in game display
Yellow
Yellow: Only appears for certain words. Means your importing or doing other stuff. Acts like normal black text. Defining code (def)
Purple
Purple: Only activates at the text False and True with the first letter being capitalized. Does not need explanation. Int, bool, none, plus more
NOTE: This first tutorial was created by Jrdn and myself.
LESSON 2
Both Found In GAMENGINE.PY
Changing the version name of the window. Found on line 259. (VERSION NOT GAME NAME) Just Change This Code Name To Whatever You Want The Frets On Fire Window To Be Named.
This tutorial was made by me
LESSON 3 Moving the maintext
There are 2 ways going about doing this. You can change the settings in the library.zip, or create a theme.ini in your theme folder.
Library.zip Way
Back up your library.zip, open up the MainMenu.py inside with Python IDLE.
GH3 Text
To Change The GH3 Text, It's This Code
0.7's Width, 0.8's Height. Change them around til' you find the spot of the Main Text You Want.
8BIT Text
Same instructions as GH3.
Rock Band
This Code
Same Instructions As Rock Band
***********************************************************~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THEME.INI Way
go into the theme folder you want to change the Text In.
in the Main directory of the folder (where the editor,notes,starpower is ) create a new text document. Edit it and put this inside -----
Replace the the .75 and .49 with numbers to change the text position. Menu_x is width, menu_y is Height. after you're done, save it as theme.ini. (make sure you save it in your theme folder. Load up Frets On Fire and you should be done. This works for every single theme.
Enjoy
This tutorial was made by Jrdn
What color symbols mean in PYTHON!!
Let's run through some of the colors of the text.
***********************************
Blue
Blue is the class of code
Red
Red: Starts with a # sign. Means will not be active in the code. Like this:
#racer
Config.define("game", "rbnote", int, 0, text = _("Rock Band Version"), options = {0: _("Regular"), 1: _("Beta")}) #racer
The #racer will be in red text but will not be used as part of the code. He put it there for other coders to show he did it.
Red is only used when code is commented out
Green
Green: Only comes after "quotes". All quotes stays green until quote is closed. Means Text. Will apear as text in game
#racer
Config.define("game", "rbnote", int, 0, text = _("Rock Band Version"), options = {0: _("Regular"), 1: _("Beta")}) #racer
The quotes of Rock Band Version appear in the options pannel. If you remember your options you pick which version you want.
green is exact words the game gets or text for in game display
Yellow
Yellow: Only appears for certain words. Means your importing or doing other stuff. Acts like normal black text. Defining code (def)
Purple
Purple: Only activates at the text False and True with the first letter being capitalized. Does not need explanation. Int, bool, none, plus more
NOTE: This first tutorial was created by Jrdn and myself.
LESSON 2
Both Found In GAMENGINE.PY
Changing the version name of the window. Found on line 259. (VERSION NOT GAME NAME) Just Change This Code Name To Whatever You Want The Frets On Fire Window To Be Named.
- Code:
self.versionString = "MFH-Alarian Mod v2.900"
- Code:
self.title = _("Frets on Fire " + self.versionString)
This tutorial was made by me
LESSON 3 Moving the maintext
There are 2 ways going about doing this. You can change the settings in the library.zip, or create a theme.ini in your theme folder.
Library.zip Way
Back up your library.zip, open up the MainMenu.py inside with Python IDLE.
GH3 Text
To Change The GH3 Text, It's This Code
- Code:
self.BGText.transform.translate(w*0.7,h*0.8-(h*0.09)*i)
0.7's Width, 0.8's Height. Change them around til' you find the spot of the Main Text You Want.
8BIT Text
- Code:
self.BGText.transform.translate(w*0.5,h*0.45-(h*0.09)*i)
Same instructions as GH3.
Rock Band
This Code
- Code:
self.BGText.transform.translate(w*0.2,h*0.8-(h*0.12)*i)
Same Instructions As Rock Band
***********************************************************~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THEME.INI Way
go into the theme folder you want to change the Text In.
in the Main directory of the folder (where the editor,notes,starpower is ) create a new text document. Edit it and put this inside -----
- Code:
[theme]
menu_x = .75
menu_y = .47
background_color = #000000
Replace the the .75 and .49 with numbers to change the text position. Menu_x is width, menu_y is Height. after you're done, save it as theme.ini. (make sure you save it in your theme folder. Load up Frets On Fire and you should be done. This works for every single theme.
Enjoy
This tutorial was made by Jrdn
Last edited by Gitert994 on Mon Aug 04, 2008 9:44 pm; edited 1 time in total
Gitert994- Moderator
- Posts : 36
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
Don't free willingly post useless posts. Make posts helpful to others.
One word posts, and unhelpful posts removed.
~jrdnxxhero
One word posts, and unhelpful posts removed.
~jrdnxxhero
jrdnxxhero- Moderator
- Posts : 32
Join date : 2008-07-11
Re: Python Coding Tutorials *Current Amount: 3*
What exactly is being shown in lesson 3? it looks like background changes, although im not sure...
KTownEgghead- Posts : 27
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
Its moving the main text. Fixing now
Gitert994- Moderator
- Posts : 36
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
Gitert994 wrote:Its moving the main text. Fixing now
OH. duuuuhr. i see it now thanks!
so this basically works in any mod? like the MFH Alarian mod?
and thanks for the version name window changing. its funny to make it say weird things!
KTownEgghead- Posts : 27
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
Its mainly for MFH. All of regular FoF's files are all compiled.
Gitert994- Moderator
- Posts : 36
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
NO there not. - you can get the source files to original fof easily.
Re: Python Coding Tutorials *Current Amount: 3*
Really? How?
Gitert994- Moderator
- Posts : 36
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
sweet this is really helpful thanks =D
kidninjax- Posts : 39
Join date : 2008-07-12
Age : 34
Location : My Chair
Re: Python Coding Tutorials *Current Amount: 3*
Actually, I don't understand one thing. How do I know the code of the position that I want in theme.ini? Like menu_x = **** I really don't know the code.
acrox999- Posts : 13
Join date : 2008-07-24
Re: Python Coding Tutorials *Current Amount: 3*
You just guess acroxx999. It's always a decimal though in the theme.ini.
Such as .69.
~jrdnxxhero
Such as .69.
~jrdnxxhero
jrdnxxhero- Moderator
- Posts : 32
Join date : 2008-07-11
Re: Python Coding Tutorials *Current Amount: 3*
Oh. But it's hard too. Because if I wrong, I need to change it for several times.
acrox999- Posts : 13
Join date : 2008-07-24
Re: Python Coding Tutorials *Current Amount: 3*
that can be true =P.........heh heh
kidninjax- Posts : 39
Join date : 2008-07-12
Age : 34
Location : My Chair
Re: Python Coding Tutorials *Current Amount: 3*
Thats what makes it fun, yet annoying acrox!
Gitert994- Moderator
- Posts : 36
Join date : 2008-08-04
Re: Python Coding Tutorials *Current Amount: 3*
you just guess and guess until you get closer and closer and get it
kidninjax- Posts : 39
Join date : 2008-07-12
Age : 34
Location : My Chair
Rock Star :: General :: Fof Code Modding
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|