Logo

How to add Online features to ITG2 themes

Register Log In Back To Forums

Post #1 · Posted at 2016-01-08 06:19:35pm 9.6 years ago

Offline yoshi75
yoshi75 Avatar Member
20 Posts
Italy
Reg. 2016-01-01


Last updated: 2016-01-08 08:15pm
As usual... if you are not sure of what you are doing, don't do it ^:^

Note: you have to use a build that supports online functions for enable them in your theme!
Online functions can be useful not only for going online in webservers, but also for build your private ITG LAN (connecting two or more machines/pc). It can be useful in fitness centers for have a control on a local server, connect all machines and visualize the overall results to server screen, or (why not?) if you want to make a tournament.
Anyway it's not most used, that's the reason because also the default OpenITG theme has not those functions in his metrics (as far I know only the OpenITG3 r5 and r35 themes support online functions, I don't know if it has been implemented in latest OpenITG official build)

Many themes for ITG2 where made at most for r16 release, that is a bit outdated, that's the reason because they don't support even the custom song enable option, nor obviously the online functions.
If you use an OpenITG build with online functions (from the beta2 I think all new versions can do it) you can enable them in your default theme or your favorite theme.

so let's start...

1 - in 'Metrics.ini' add the following code:

--- Code Start ---

[ScreenSMOnlineLogin]
Class=ScreenSMOnlineLogin
Fallback=ScreenOptionsSubmenu
NextScreen=ScreenNetRoom
PrevScreen=@ScreenTitleBranch()
StyleIcon=0
TimerSeconds=0
MoreX=SCREEN_CENTER_X
MoreY=SCREEN_CENTER_Y+112
MoreOnCommand=hidden,1
MoreShowMoreCommand=hidden,1
MoreHideMoreCommand=hidden,1
MoreExitSelectedP1Command=hidden,1
MoreExitSelectedP2Command=hidden,1
MoreExitUnselectedP1Command=hidden,1
MoreExitUnselectedP2Command=hidden,1

[ScreenNetRoom]
MusicSelectScreen=ScreenSMOnlineSelectMusic
TitleBGOnCommand=hidden,1
TitleBGOffCommand=hidden,1
TitleOnCommand=hidden,1
TitleOffCommand=hidden,1
PrevScreen=@ScreenTitleBranch()
NextScreen=ScreenGameplayBranch
Fallback=ScreenNetSelectMusic
Class=ScreenNetRoom
OpenRoomColor=1.0,1.0,1.0,1.0
PasswdRoomColor=1.0,0.5,0.5,1.0
InGameRoomColor=1.0,0.1,0.1,1.0
RoomWheelX=SCREEN_CENTER_X-210
RoomWheelY=SCREEN_CENTER_Y-10
RoomWheelOnCommand=sleep,0.5;addx,20;ztest,1
RoomWheelOffCommand=addx,-20


[ScreenSMOnlineSelectMusic]
PrevScreen=ScreenNetRoom
Class=ScreenNetSelectMusic
RoomSelectScreen=ScreenNetRoom
Fallback=ScreenNetSelectMusic

[ScreenNetSelectMusic]
MusicWheelX=SCREEN_CENTER_X-210
MusicWheelY=SCREEN_CENTER_Y-10
MusicWheelOnCommand=sleep,0.5;addx,20;ztest,1
MusicWheelOffCommand=addx,-20
BPMDisplayX=SCREEN_CENTER_X+291
BPMDisplayY=SCREEN_CENTER_Y+154
BPMDisplayOffCommand=hidden,1
OptionIconsP1OnCommand=hidden,1
OptionIconsP2OnCommand=hidden,1
ChatInputBoxY=SCREEN_CENTER_Y+86
ChatInputBoxX=SCREEN_CENTER_X+140
ChatInputBoxOnCommand=addx,SCREEN_WIDTH;decelerate,0.75;addx,-SCREEN_WIDTH
ChatInputBoxOffCommand=linear,0.2;addx,SCREEN_WIDTH
ChatInputBoxWidth=310
ChatInputBoxHeight=60
ChatInputBoxColor=0.5,0.5,1.0,0.7 //transparent cyan
ChatOutputBoxY=SCREEN_CENTER_Y-52
ChatOutputBoxX=SCREEN_CENTER_X+140
ChatOutputBoxOnCommand=addx,SCREEN_WIDTH;decelerate,0.75;addx,-SCREEN_WIDTH
ChatOutputBoxOffCommand=linear,0.2;addx,SCREEN_WIDTH
ChatOutputBoxWidth=310
ChatOutputBoxHeight=210
ChatOutputBoxColor=1.0,0.5,0.5,0.7 //transparent reddish
ChatInputY=SCREEN_CENTER_Y+69
ChatInputX=SCREEN_CENTER_X
ChatInputOnCommand=zoom,.5;addx,SCREEN_WIDTH;decelerate,0.75;addx,-SCREEN_WIDTH
ChatInputOffCommand=linear,0.2;addx,SCREEN_WIDTH
ChatOutputY=SCREEN_CENTER_Y+38
ChatOutputX=SCREEN_CENTER_X
ChatOutputOnCommand=zoom,.5;addx,SCREEN_WIDTH;decelerate,0.75;addx,-SCREEN_WIDTH
ChatOutputOffCommand=linear,0.2;addx,SCREEN_WIDTH
UsersBGColor=0.7,0.7,0.7,0.7
UsersBGWidth=640
UsersBGHeight=50
UsersBGX=SCREEN_CENTER_X+0
UsersBGY=SCREEN_CENTER_Y-215
UsersBGOnCommand=y,SCREEN_TOP-100;decelerate,0.8;y,SCREEN_CENTER_Y-215
UsersBGOffCommand=accelerate,0.5;addy,-100
UsersX=SCREEN_CENTER_X-250
UsersY=SCREEN_CENTER_Y-237
UsersDX=SCREEN_CENTER_X-250
UsersAY=SCREEN_CENTER_Y-217
UsersOnCommand=y,SCREEN_TOP-100;decelerate,0.8;y,SCREEN_CENTER_Y-237
UsersOffCommand=accelerate,0.5;addy,-100
Users0Color=1.0,0.4,0.4,1.0 //Inactive users
Users1Color=1.0,1.0,1.0,1.0 //Inactive; Undefined
Users2Color=0.5,0.5,1.0,1.0 //Active, In NetScreen
Users3Color=0.5,1.0,0.5,1.0 //Active, In Options
Users4Color=1.0,0.5,0.5,1.0 //Active, in Evaluation
optionsY=SCREEN_CENTER_Y-170
optionsX=SCREEN_CENTER_X-240
optionsOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,0.7;zoomx,0.7
optionsOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
MeterP1X=SCREEN_CENTER_X-66
MeterP1Y=SCREEN_BOTTOM-93
MeterP1OnCommand=shadowlength,0;zoom,0;sleep,0.55;bounceend,0.3;zoom,.8
MeterP1OffCommand=bouncebegin,0.2;zoom,0
MeterP2X=SCREEN_CENTER_X+66
MeterP2Y=SCREEN_BOTTOM-93
MeterP2OnCommand=shadowlength,0;zoom,0;sleep,0.55;bounceend,0.3;zoom,.8
MeterP2OffCommand=bouncebegin,0.2;zoom,0
DifficultyIconP1Y=SCREEN_CENTER_Y+160
DifficultyIconP1X=SCREEN_CENTER_X-120
DifficultyIconP1OnCommand=shadowlength,2;zoomx,0;zoomy,0;linear,0.5;zoomx,1.0;zoomy,1.0;
DifficultyIconP1OffCommand=linear,0.5;zoomx,0.0;zoomy,0.0;shadowlength,0
DifficultyIconP2Y=SCREEN_CENTER_Y+185
DifficultyIconP2X=SCREEN_CENTER_X+20
DifficultyIconP2OnCommand=shadowlength,2;zoomx,0;zoomy,0;linear,0.5;zoomx,1.0;zoomy,1.0
DifficultyIconP2OffCommand=linear,0.5;zoomx,0.0;zoomy,0.0;shadowlength,0
DiffBGColor=0.7,0.7,0.7,0.7
DiffBGWidth=0
DiffBGHeight=0
DiffBGY=SCREEN_CENTER_Y+160
DiffBGX=SCREEN_CENTER_X-60
DiffBGOnCommand=zoomz,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
DiffBGOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
ChatOutputLines=12
ChatTextOutputWidth=690
ChatTextInputWidth=690
NumStylesShow=1
NumSongsShow=4
NumGroupsShow=3
MemoryCardIcons=1
PrevScreen=@ScreenTitleBranch()
NextScreen=ScreenStage
NoSongsScreen=@ScreenTitleBranch()
Class=ScreenNetSelectMusic
Fallback=ScreenSelectMusic

--- Code End ---

--- Code Start --- in [ScreenOptionsMenu]

Line'x'=list,Profile Options

--- Code End ---

--- Code Start --- after Machine Update

Profile Options=1;together;SelectNone
Profile OptionsDefault=
Profile Options,1=screen,ScreenProfileOptions;name,Profile Options

--- Code End ---

--- Code Start --- between [ScreenSoundOptions] and [ScreenCompany]

[ScreenProfileOptions]
Class=ScreenProfileOptions
Fallback=ScreenOptionsSubmenu
Player1Profile=
Player2Profile=
CreateNew=
Delete=
Rename=
CardDirPlayer1=
CardDirPlayer2=
StyleIcon=0
TimerSeconds=0

--- Code End ---

Also set SignProfileData to "0" in all his values for auto-signup with a profile


2 - In 'Branches.lua' add the following functions:

--- Code Start ---

function SongSelectionScreen()
local s = "ScreenSelectMusic";
if GAMESTATE:IsCourseMode() then s = s.."Course" end
if IsNetConnected() then ReportStyle() end
if IsNetSMOnline() then return SMOnlineScreen() end
if IsNetConnected() then return "ScreenNetSelectMusic" end
return s
end

--- Code End ---

--- Code Start ---

function FailAfter30Misses()
if IsNetConnected() then return "0" end
return "1"
end

function OptionsLines()
if IsNetConnected() then return "1,2,3,4,5,6,9,10,11,12,13,14,15" end
return "1,2,3,4,5,6,9,10,11,12,13,14,15,16"
end

--- Code End ---


3 - In 'BGAnimation' folder make sure you added:

-> 'ScreenSMOnlineLogin background' folder with the right 'default.xml' file
-> 'ScreenTitleMenu background' folder with the right graphics
-> 'ScreenSelectMusic background' folder with the right 'default.xml' file and 'LQmpg2CJ126.mpg' video for shared background
-> 'ScreenNetEvaluation in.redir'
-> 'ScreenNetEvaluation out.redir'
-> 'ScreenNetRoom overlay.xml'
-> 'ScreenNetRoom underlay.xml'
-> 'ScreenNetSelectMusic overlay.xml'
-> 'ScreenNetSelectMusic underlay.redir'
-> 'ScreenNetworkOptions in.redir'
-> 'ScreenNetworkOptions out.redir'
-> 'ScreenSMOnlineLogin overlay.xml'
-> 'ScreenSMOnlineLogin in.redir'
-> 'ScreenOptions frame.png' in 'ScreenPlayerOptions overlay' folder
-> '_base' '_expandtop' '_normaltop' '_sides' 'X_base' 'X_sides' folders in 'ScreenWithMenuElements underlay' folder


4 - In 'Graphics' folder make sure you added those elements: (if you don't want to make your own you can always rip the graphic from an OpenITG3 r5 or r35 theme)

-> '_pane elements' folder with the right graphics
-> 'ScreenSMOnlineLogin page' folder with the right graphics
-> 'options page.png' in '_options page' folder
-> 'line highlight mask right.png' in '_options page' folder
-> 'RoomWheelItem bar.redir'
-> 'ScreenNetEvaluation header.redir'
-> 'ScreenNetRoom ChatInputBox.png'
-> 'ScreenNetRoom ChatOutputBox.png'
-> 'Triangle' folder with the right graphics in 'ScreenSelectMusic' banner frame folder
-> 'ScreenNetSelectMusic ChatInputbox.redir'
-> 'ScreenNetSelectMusic ChatOutputBox.redir'
-> 'ScreenNetSelectMusic header.redir'
-> 'ScreenNetworkOptions header.xml'
-> 'ScreenProfileOptions header.xml'
-> 'ScreenSMOnlineLogin header.xml'
-> 'ScreenSMOnlineLogin PasswordBG.redir'
-> 'ScreenSMOnlineSelectMusic ChatInputbox.redir'
-> 'ScreenSMOnlineSelectMusic ChatOutputBox.redir'
-> 'ScreenSMOnlineSelectMusic Selection.redir'
-> 'ScreenTournamentOptions header.xml'


5 - In 'Fonts' folder make sure you added:

-> 'RoomWheel text.redir'
-> 'RoomWheelItem text.redir'
-> 'ScreenSMOnlineLogin text.redir'
-> '_r bold 30px 16x16.png'
-> '_r bold 30px.ini'
-> '_r bold glow 30px 16x16 (res 576x608).png'
-> '_r bold glow 30px.ini'
-> '_r bold shadow 30px 16x16 (res 576x608).png'
-> '_r bold shadow 30px.ini'
-> '_r bold stroke 16x16.png'
-> '_r bold stroke.ini'
-> '_v 26px bold shadow 16x16.png'
-> '_v 26px bold shadow.ini'
-> '_z bold 19px 16x16 (res 512x512).png'
-> '_z bold 19px.ini'
-> '_z bold gray 36px 16x16.png'
-> '_z bold gray 36px.ini'


6 - In 'Languages' folder make sure the 'english.ini' file contains the following code:

--- Code Start ---

[ScreenSMOnlineLogin]
HelpText=&MENULEFT; &MENURIGHT; to change selection:: Press &START; to choose

[ScreenNetworkOptions]
HelpText=&MENULEFT; &MENURIGHT; to change selection:: Press &START; to choose

--- Code End ---

--- Code Start ---

[OptionExplanations]

Network Options=Connect to a server or change server options.
#ScreenOptionsMenu
Insert Credit=Insert one credit.
Profile Options=Edit the player profiles stored on this machine.
Profile=Depending on the server you're connected to, you may have to register for an account on their website.
Arcade Options=Configure difficulty, game, and coin options.
Reset Menu=Reset options, bookkeeping data, statistics, or edits.
Center Image=Display a test image to check the color and brightness of the monitor.
System Diagnostics=Show diagnostic information.
Machine Update=Install game updates.

--- Code End ---

7 - In 'Sounds' folder make sure you added

-> 'ScreenNetRoom music.redir'
-> 'ScreenSelectMusic course music (loop).ogg'
-> 'ScreenSMOnlineLogin music.redir'
-> 'ScreenTitleMenu music (loop).ogg'


Note 1: If you get this error in theme manager

ThemeManager:
The redirect '/Themes/(your theme)/Graphics/ScreenOptionsSubmenu header.redir'
points to the file '_shared options header',
which does not exist. Verify that this redirect is correct.

That's because profile creation warning screen is missing;
check if you added with no errors the [ScreenProfileOptions] lines


Note 2: After changing those metrics the LQmpg2CJ126.mpg will be the song selection background video


Note 3: Make sure in Stepmania.ini the string for player 2 is DefaultLocalProfileIDP2=00000001 for second player name
signup (otherwise game will crash after login and start a 2 players game - usually you have to check this on standard
Oitg beta2 builds).
Also don't Delete Profile "00000000", simply copy it as "00000001" and rename both "editable.ini" for change names,
because making a second profile with the profile editor sometimes will result in a corrupt profile, and the game might crash

For the first songs all players will be under generic "Player 1" and "Player 2" name but from second songs it will
be displayed the correct name infos Happy


Note 4: To display calories burned instead of percentage (it can be useful in fitness centers)

1 - Make an overlay.xml under BGAnimations (adding "%" to a command allows you to use Lua instead of a command string)

2 - add the following code that contains the function "Profile:GetCaloriesBurnedToday()"
it's like if you do "local P1_calories = PROFILEMAN:GetProfile(PLAYER_1):GetCaloriesBurnedToday()"


--- Code Start ---

<BitmapText
Condition="GAMESTATE:IsPlayerEnabled(PLAYER_1)
Font="_eurostile normal"
InitCommand="x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y"
OnCommand="%function(self) local profile = PROFILEMAN:GetProfile(PLAYER_1); self:settext( profile:GetCaloriesBurnedToday() ); end"
/>

--- Code End ---

That should be all, if I miss something or you experience game crashes first double check all you did and then please notify it to me ^^
For my themes it works great I hope also for yours

Yoshi Smile

Post #2 · Posted at 2016-01-10 12:07:23pm 9.6 years ago

Offline luke07651
luke07651 Avatar Banned
66 Posts
United Kingdom
Reg. 2015-07-12

that alot of words and does it takes longer to do that

Post #3 · Posted at 2016-01-10 02:57:37pm 9.6 years ago

Offline Quickman
Quickman Avatar Member+
6,086 Posts
United Kingdom
Reg. 2013-08-17

"five minute white boy challenge"
Quote: yoshi75
As usual... if you are not sure of what you are doing, don't do it ^:^

You probably need to read this sentence, then.
Quote: Quick Man
Approximately nobody asked for this song to be included. Least popular decision by the Japanese since Nintendo released the Wii U.
https://card.psnprofiles.com/1/DWN012Quick_Man.png
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2025 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 7% · Database: 4% · Server Time: 2025-09-12 12:47:25
This page took 0.004 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language