GlovePIE:Frets On Fire
From WiiLi
The following scripts can be used to play the game Frets On Fire(http://fretsonfire.sourceforge.net/).
For scripts one and two, the wiimote and nunchuk are held in their standard position. On the wiimote: B, d-pad and A, act as the first 3 frets and the nunchuk is used to strum and the C & Z buttons are used as the last two frets.
When using the three player script the third player uses 2 wiimotes in place of a single wiimote and nunchuk.
The fourth script and fifth script use the wiiguitars from Guitar Hero III.
Contents |
[edit] Single player script using one wiimote and one nunchuk:
//Frets On Fire //Game controls RightShift = Wiimote.Nunchuk.gy > 2 F1 && Wiimote.Led1 = Wiimote.B F2 && Wiimote.Led2 = Wiimote.Up || Wiimote.Down || Wiimote.Left || Wiimote.Right F3 && Wiimote.Led3 = Wiimote.A F4 && Wiimote.Led4 = Wiimote.Nunchuk.CButton F5 = Wiimote.Nunchuk.ZButton //Menu controls Escape = Wiimote.Minus Enter = Wiimote.Plus || Wiimote.Home Left = Wiimote.Nunchuk.JoyX < -0.5 Right = Wiimote.Nunchuk.JoyX > 0.5 Up = Wiimote.Nunchuk.JoyY < -0.5 Down = Wiimote.Nunchuk.JoyY > 0.5
[edit] Two player script using two wiimotes and two nunchuks:
/* Frets On Fire: Two Player Script v1.0
***********************************************************
* Created by Rhys Legault *
* rhyslegault@hotmail.com *
* Last Modified: July 12th, 2007 *
***********************************************************
* Feel free to use, modify and redistribute this script *
***********************************************************
*
* About:
* This script allows you to play the game Frets On Fire
* with two players.
*
* In order to have a successful session both players are required
* to hold the correct "chords" and strum at the same time.
*
* Requires: 2 Wiimotes + 2 Nunchuks
*
* Game Controls:
* Players are required to simultaneous strum & hold buttons
*
* Fret 1 Wiimote.B
* Fret 2 Wiimote.Up/Down/Left/Right
* Fret 3 Wiimote.A
* Fret 4 Wiimote.Nunchuk.CButton
* Fret 5 Wiimote.Nunchuk.ZButton
* Strum Flick Nunchuk downwards
*
* Menu Controls:
* Either player may use the menu controls
*
* Escape Wiimote.Minus
* Enter Wiimote.Plus/Wiimote.Home
* Left Nunchuk thumbstick left
* Right Nunchuk thumbstick right
* Up Nunchuk thumbstick up
* Down Nunchuk thumbstick down
*/
if !var.init
//Amount of time allowed between sequence actions
PIE.SeqReadGap = 50ms
PIE.FrameRate = 60Hz
//Amount of accelation required for action to occur
var.AccelerationThreshold = 1.5
//Amount of time between a flick action
var.ActionGap = 100ms
//Amount of time to hold key press
var.HoldKey = 25ms
//Number of frames allowed between player strums
var.CountDown = 15
var.init = true
endif
if var.Wiimote1NunchukFlick = false
if (Wiimote1.Nunchuk.gy < -var.AccelerationThreshold, Wiimote1.Nunchuk.gy > var.AccelerationThreshold)
var.Wiimote1NunchukFlick = true
var.Count1 = var.CountDown
wait var.ActionGap
var.Wiimote1NunchukFlick = false
endif
endif
if var.Wiimote2NunchukFlick = false
if (Wiimote.Nunchuk.gy < -var.AccelerationThreshold, Wiimote.Nunchuk.gy > var.AccelerationThreshold)
var.Wiimote2NunchukFlick = true
var.Count2 = var.CountDown
wait var.ActionGap
var.Wiimote2NunchukFlick = false
endif
endif
if ((!var.Count1 = 0) && (!var.Count2 = 0))
var.PlayNote = true
endif
if var.Count1 > 0
var.Count1--
endif
if var.Count2 > 0
var.Count2--
endif
if var.PlayNote
var.Count1 = 0
var.Count2 = 0
RightShift = true
wait var.HoldKey
RightShift = false
var.PlayNote = false
endif
F1 && Wiimote1.Led1 && Wiimote2.Led1 = Wiimote1.B && Wiimote2.B
F2 && Wiimote1.Led2 && Wiimote2.Led2 = (Wiimote1.Up || Wiimote1.Down || Wiimote1.Left || Wiimote1.Right) && (Wiimote2.Up || Wiimote2.Down || Wiimote2.Left || Wiimote2.Right)
F3 && Wiimote1.Led3 && Wiimote2.Led3 = Wiimote1.A && wiimote2.A
F4 && Wiimote1.Led4 && Wiimote2.Led4 = Wiimote1.Nunchuk.CButton && Wiimote2.Nunchuk.CButton
F5 = Wiimote1.Nunchuk.ZButton && Wiimote2.Nunchuk.ZButton
//Menu controls
Escape = Wiimote1.Minus || Wiimote2.Minus
Enter = Wiimote1.Plus || Wiimote1.Home || Wiimote2.Plus || Wiimote2.Home
Left = Wiimote1.Nunchuk.JoyX < -0.5 || Wiimote2.Nunchuk.JoyX < -0.5
Right = Wiimote1.Nunchuk.JoyX > 0.5 || Wiimote2.Nunchuk.JoyX > 0.5
Up = Wiimote1.Nunchuk.JoyY < -0.5 || Wiimote2.Nunchuk.JoyY < -0.5
Down = Wiimote1.Nunchuk.JoyY > 0.5 || Wiimote2.Nunchuk.JoyY > 0.5
debug = F1 + " " + F2 + " " + F3 + " " + F4 + " " + F5
[edit] Three player script using four wiimotes and two nunchuks:
/* Frets On Fire: Three Player Script v1.0
***********************************************************
* Created by Rhys Legault *
* rhyslegault@hotmail.com *
* Last Modified: July 12th, 2007 *
***********************************************************
* Feel free to use, modify and redistribute this script *
***********************************************************
*
* About:
* This script allows you to play the game Frets On Fire
* with three players.
*
* In order to have a successful session all players are required
* to hold the correct "chords" and strum at the same time.
*
* Requires: 4 Wiimotes + 2 Nunchuks
* Player 1: 1 Wiimote + 1 Nunchuk
* Player 2: 1 Wiimote + 1 Nunchuk
* Player 3: 2 Wiimotes
*
* Game Controls:
* Players are required to simultaneous strum & hold buttons
*
* Fret 1 Wiimote.B
* Fret 2 Wiimote.Up/Down/Left/Right
* Fret 3 Wiimote.A
* Fret 4 Wiimote.Nunchuk.CButton / Wiimote2.B (Player 3)
* Fret 5 Wiimote.Nunchuk.ZButton / Wiimote2.Up/Down/Left/Right (Player 3)
* Strum Flick Nunchuk downwards / Flick Wiimote2 downwards
*
* Menu Controls:
* Either player 1 or 2 may use the menu controls
*
* Escape Wiimote.Minus
* Enter Wiimote.Plus/Wiimote.Home
* Left Nunchuk thumbstick left
* Right Nunchuk thumbstick right
* Up Nunchuk thumbstick up
* Down Nunchuk thumbstick down
*/
if !var.init
//Amount of time allowed between sequence actions
PIE.SeqReadGap = 50ms
PIE.FrameRate = 60Hz
//Amount of accelation required for action to occur
var.AccelerationThreshold = 1.5
//Amount of time between a flick action
var.ActionGap = 100ms
//Amount of time to hold key press
var.HoldKey = 25ms
//Number of frames allowed between player strums
var.CountDown = 15
var.init = true
endif
if var.Wiimote1NunchukFlick = false
if (Wiimote1.Nunchuk.gy < -var.AccelerationThreshold, Wiimote1.Nunchuk.gy > var.AccelerationThreshold)
var.Wiimote1NunchukFlick = true
var.Count1 = var.CountDown
wait var.ActionGap
var.Wiimote1NunchukFlick = false
endif
endif
if var.Wiimote2NunchukFlick = false
if (Wiimote.Nunchuk.gy < -var.AccelerationThreshold, Wiimote.Nunchuk.gy > var.AccelerationThreshold)
var.Wiimote2NunchukFlick = true
var.Count2 = var.CountDown
wait var.ActionGap
var.Wiimote2NunchukFlick = false
endif
endif
if var.Wiimote4Flick = false
if (Wiimote4.gy < -var.AccelerationThreshold, Wiimote4.gy > var.AccelerationThreshold)
var.Wiimote4Flick = true
var.Count3 = var.CountDown
wait var.ActionGap
var.Wiimote4Flick = false
endif
endif
if ((!var.Count1 = 0) && (!var.Count2 = 0) && (!var.Count3 = 0))
var.PlayNote = true
endif
if var.Count1 > 0
var.Count1--
endif
if var.Count2 > 0
var.Count2--
endif
if var.Count3 > 0
var.Count3--
endif
if var.PlayNote
var.Count1 = 0
var.Count2 = 0
var.Count3 = 0
RightShift = true
wait var.HoldKey
RightShift = false
var.PlayNote = false
endif
F1 && Wiimote1.Led1 && Wiimote2.Led1 && Wiimote3.Led1 && Wiimote4.Led1 = Wiimote1.B && Wiimote2.B && Wiimote3.B
F2 && Wiimote1.Led2 && Wiimote2.Led2 && Wiimote3.Led2 && Wiimote4.Led2 = (Wiimote1.Up || Wiimote1.Down || Wiimote1.Left || Wiimote1.Right) && (Wiimote2.Up || Wiimote2.Down || Wiimote2.Left || Wiimote2.Right) && (Wiimote3.Up || Wiimote3.Down || Wiimote3.Left || Wiimote3.Right)
F3 && Wiimote1.Led3 && Wiimote2.Led3 && Wiimote3.Led3 && Wiimote4.Led3 = Wiimote1.A && wiimote2.A && wiimote3.A
F4 && Wiimote1.Led4 && Wiimote2.Led4 && Wiimote3.Led4 && Wiimote4.Led4 = Wiimote1.Nunchuk.CButton && Wiimote2.Nunchuk.CButton && Wiimote4.B
F5 = Wiimote1.Nunchuk.ZButton && Wiimote2.Nunchuk.ZButton && (Wiimote4.Up || Wiimote4.Down || Wiimote4.Left || Wiimote4.Right)
//Menu controls
Escape = Wiimote1.Minus || Wiimote2.Minus
Enter = Wiimote1.Plus || Wiimote1.Home || Wiimote2.Plus || Wiimote2.Home
Left = Wiimote1.Nunchuk.JoyX < -0.5 || Wiimote2.Nunchuk.JoyX < -0.5
Right = Wiimote1.Nunchuk.JoyX > 0.5 || Wiimote2.Nunchuk.JoyX > 0.5
Up = Wiimote1.Nunchuk.JoyY < -0.5 || Wiimote2.Nunchuk.JoyY < -0.5
Down = Wiimote1.Nunchuk.JoyY > 0.5 || Wiimote2.Nunchuk.JoyY > 0.5
debug = F1 + " " + F2 + " " + F3 + " " + F4 + " " + F5
[edit] Two player script using two wiiguitars:
// 2-Player WiiGuitar script for FoF // Created by Mario Valenzuela // Adapted from Marc-Andre Larouche's ZNES script // Thanks to jlaudio7 for the key mapping // Feel free to modify this script to use the WiiGuitar for another purpose // Player 1 settings // WiiGuitar button mapping // Strumming Enter = Wiimote1.Classic.Down RightShift = Wiimote1.Classic.Up // Frets F1 = Wiimote1.Classic.a F2 = Wiimote1.Classic.b F3 = Wiimote1.Classic.x F4 = Wiimote1.Classic.y F5 = Wiimote1.Classic.ZL // Face buttons // Switch if you want the other button to be cancel Escape = Wiimote1.Classic.Plus //Escape = Wiimote1.Classic.Minus // Whammy bar // Only shows % depressed in the debug window var.rAnalog1 = Wiimote1.Classic.R * 100 // These don't map to anything on the WiiGuitar // = Wiimote1.Classic.Left // = Wiimote1.Classic.Right // = Wiimote1.Classic.Home // = Wiimote1.Classic.ZR // = Wiimote1.Classic.L // Right analog stick // Analog stick for movement in FoF Left = Wiimote1.Classic.Joy1X <= -25% Right = Wiimote1.Classic.Joy1X >= 25% Up = Wiimote1.Classic.Joy1Y <= -25% Down = Wiimote1.Classic.Joy1Y >= 25% // Wiimote button mapping // Glovepie uses Shift+P+I+E = Wiimote1.Home // Unused Wiimote buttons, if you want to map anything to them // = Wiimote1.Down // = Wiimote1.Left // = Wiimote1.Right // = Wiimote1.Up // = Wiimote1.A // = Wiimote1.B // = Wiimote1.Plus // = Wiimote1.Minus // = Wiimote1.One // = Wiimote1.Two // LEDs Wiimote1.LED1 = true; Wiimote1.LED2 = false; Wiimote1.LED3 = false; Wiimote1.LED4 = false; // Player 2 settings // WiiGuitar button mapping // Strumming PageDown = Wiimote2.Classic.Down PageUp = Wiimote2.Classic.Up // Frets F8 = Wiimote2.Classic.a F9 = Wiimote2.Classic.b F10 = Wiimote2.Classic.x F11 = Wiimote2.Classic.y F12 = Wiimote2.Classic.ZL // Face buttons // Switch if you want the other button to be cancel F7 = Wiimote2.Classic.Plus //F7 = Wiimote2.Classic.Minus // Whammy bar // Only shows % depressed in the debug window var.rAnalog2 = Wiimote2.Classic.R * 100 // These don't map to anything on the WiiGuitar // = Wiimote2.Classic.Left // = Wiimote2.Classic.Right // = Wiimote2.Classic.Home // = Wiimote2.Classic.ZR // = Wiimote2.Classic.L // Right analog stick // Analog stick for movement Left = Wiimote2.Classic.Joy1X <= -25% Right = Wiimote2.Classic.Joy1X >= 25% Up = Wiimote2.Classic.Joy1Y <= -25% Down = Wiimote2.Classic.Joy1Y >= 25% // Wiimote button mapping // Glovepie uses Shift+P+I+E = Wiimote2.Home // Unused Wiimote buttons, if you want to map anything to them // = Wiimote2.Down // = Wiimote2.Left // = Wiimote2.Right // = Wiimote2.Up // = Wiimote2.A // = Wiimote2.B // = Wiimote2.Plus // = Wiimote2.Minus // = Wiimote2.One // = Wiimote2.Two // LEDs Wiimote2.LED1 = false; Wiimote2.LED2 = true; Wiimote2.LED3 = false; Wiimote2.LED4 = false; Debug = var.rAnalog1 + " " + var.rAnalog2 // Possible additions // Accelerometer for activating star power if FoF adds the feature // Rumble for star power if FoF adds the feature // Rumble and sound for missed note // Whammy bar information going to outside program
[edit] Single Player Guitar
'''//Created By Joe Letizia''' //Question or Comments mustangman7723@hotmail.com //**********IMPORTANT NOTICE*********// //********************************// //******************************// //*****************************// //Pressing Up in a menu is the same as pressing green// //Sets Wiimote LEDs wiimote.leds= 9 //Fret Buttons keyboard.f1= wiimote.Classic.a keyboard.f2= wiimote.Classic.b keyboard.f3=wiimote.Classic.x keyboard.f4= wiimote.Classic.y keyboard.f5= wiimote.Classic.ZL //Face Buttons //Strums keyboard.return = wiimote.Classic.up keyboard.rightshift = wiimote.Classic.down //Knobs keyboard.esc= wiimote.classic.minus keyboard.esc= wiimote.classic.plus //analog stick movement keyboard.up = wiimote.classic.joy1Y<= - 25% keyboard.down= wiimote.classic.joy1Y>=25% keyboard.left= wiimote.classic.joy1X<= -25% keyboard.right= wiimote.classic.joy1X>=25%

