And yes, this is not a joke. It's the end product of this topic (thanks, ducharles)
What is needed is stated there, but I'll try to make a detailed tutorial here as well.
Latest standalone versions:
Latest releases of packages for loaders
Mod Loader packages:
- Now second mouse is exchanged with crosshair while in game window. And yes, it should not be flashy. And yes, you may change it. It is located in the graphics subfolder of your game (if you are using the standalone) or in the graphics subfolder of 2MiceMod folder (for loader users).
- Now premade packages available to be loaded with Mod Loader and Mari0 Modding System. Details are found under standalone install instructions (meaning bottom of post). 2 mice multiplayer is actually compatible with ANY mod that does not modify mario:updateangle method of base game. If you do not know how to load it without using mod loader, feel free to ask for help. It's as easy as downloading one premaid pack and adding one line of code.
- Now F12 captures (or releases) both cursors in the game
- You get two cursors only if Mari0 window is focused! (it's sometimes buggy. If you get two cursors no matter which window is focused, try editing the .bat file with Notepad and removing the "/run /tray" part. This way script will be loaded but you will have to run it manually.)
- Laptop users may use one external mouse and onboard device or two external mice (detected automatically)
- Support for two mice point and shoot interface.
- 18 March 2012 in version 2.3 the second (fake) Cursor is exchanged with new crosshair. You may change it, but please, use 16x16 image. The pointer is in the center of the used image.
- 17 March 2012 Mari0 1.6 is now supported. You know where to grab the new release.
- 16 March 2012 Mari0 1.5 is now supported. Standalone version of the mod may be grabbed from latest release section of this post. Loader packages are not changed but they support 1.5 version of the game. It's up to loaders' authors when their mods will support Mari0 1.5
- later on 12 March 2012 v2.2 - thanks to xPi's idea and code, and to TiagoTiago's demand, F12 now captures both real and fake cursors.
- 12 March 2012 v2.1 - thanks to user comments - no more "do not move the window" rule + 2 cursors only if you have mari0 on focus
- later on 11 March 2012 v2 - improved game logic
- 11 March 2012 v1 - First mod. Bugged and lame
This is a minor modification of the original code. It allows you to use two mice for two different characters in mari0, both of wich have point and shoot controls either with one of the mice. It uses PPJoy virtual joysticks driver and GlovePIE programmable emulator, so it's windows only solution. The main idea is reading two mice values and emulating two joysticks with axes. Code modification allows you to have point and click by recalculating the click point. However you will have to leave the game window centered and not move it (The "do not move the window" rule is back again). Laptop users with onboard pointing device or touchpad - I have your back covered. You may use onboard and one external mouse, or two external mice instead. However if you have two (or even more?) onboard mouse equivalents you will have to manually mod the pie script
Installing as standalone mod
- Download PPJoy. You may use the download link in their blog or install a newer version if you find one. The linked installer can bypass windows 7x64 mandatory driver signing
- Download GlovePIE. Yeah, we all know that their site has been hacked, but xPi stated that the direct download still works (click here). If you do not believe that hackers did not change the executable, read the linked topic or use google
- Download love2d. You need version 0.8.0 (if you don't have it already). You may grab the latest windows build from here
- Download my mod(Link for Mari0 1.4 version is provided in the latest standalone releases above). It's mari0 1.4 with a little modification in mario.lua > mario:updateangle(). You may find my modifications by searching for fakeuser in the comments. The linked file contains emulator configurations and batch scripts, so just posting the code won't do for you.
Installing 3rd party software
- The hardest part - installing PPjoy. If you are running windows 7 with mandatory signing, you will have to follow the next steps:
- open an elevated command propt (Start button > type cmd > right click the search result > Open as administrator)
Code: Select all
bcdedit -set testsigning on
- You should get a succeffully passed operation message. Reboot your OS. You should get a "Test mode Windows 7 Build x" text in the lower right corner of your desktop. Bear with it, as you need this testing mode to use the PPJoy drivers
- Now launch PPJoy installer and confirm that you want to install drivers even though windows is not the author (if asked).
- Install GlovePIE. Nothing really special here...
- Install Love. Easy
- Configure two joysticks. You may do this with launching Start > PPjoy joystick Driver > Configure Joysticks or from Control Panel. If you're too lazy to folow the attached doc in the linked forum in the linked topic, here's what you have to do:
- Click Add. Leave default options for virtual joysticks even if they are not greyed out. Add two controllers
- Select one of them and click mapping. Choose Set a custom mapping for this controller
- Choose 2 axes, 10 Buttons and 0 hats. Leave default names. Click Finish
- Do the same for the other controller. Click Done.
- Add Love to system path. What does this mean?! doh...
- Right click My computer Icon and Click properties
- Find and click Advanced system settings
- Click Environment variables. Under the system variables part of the window search for PATH (ignoring the case differences), select it and click edit
- DO NOT DELETE ANYTHING. Just go to the end of the string, add a semicolon (;)and add the path to the folder in wich is located love.exe (e.g. C:\Program Files (x86)\LOVE)
- Click OK everywhere
- Add GlovePIE to system path (Do the same for GlovePIE.exe directory)
What a long tutorial... Almost done though
Apply the mod
- Open the downloaded zip file (yes! finally the mod itself)
- Extract all the files where your mari0_1.4.exe is.
- You should end up with a structure like this
Code: Select all
Please reboot for all changes to be applied. This is windows after all...
And.. Thats it, you're ready. Do not forget to attach second mouse or else you will have to restart the pie script. Launch the two_mice_coop.bat. It should launch the mari0_1.4_coop.love (the moded game) and the GlovePIE emulator with two mice script - minimized to system tray. If you are running Vista or above it will be asking for admin permissions (probably in the background o.O). Be sure to grant them. If all went well you should get an extra cursor with number 2 in its lower right corner. Configure mari0 so none of the players is mouse owner - you see cursors, but mari0 sees two joysticks. When setting the AimX and AimY be sure to move the mouse in right (for x) and up (for y). After you've closed the game be sure to stop the pie script - open GlovePIE (it's still minimized to the system tray) and quit it. You should use your false mouse to do that. Why? Read the documentation of GlovePIE. Or simply - the other one will not do.
There was a bonus mentioned. What is it?!
I've packed my two-player pie script for single mouse. It's not as cool, but works if you have only one mouse. You may launch it with single_mouse_coop.bat. It however does not use the moded game and executes the original mari0_1.4.exe, so if you have renamed it or use source distribution, then you will have to manually edit the batch file. I believe you can.
Note:You should set one of the players as mouse owner and configure the other with the 2mice script. Then you may use / and * to increase and decrease the angle of the portal gun and as well control the rotation step with Del and Insert. These mappings may be changed in the pie script.
Installing with available mod system
Currently premade packages for Mod Loader and Mari0 Modding System are available. To use them:
- Follow all steps above before Apply the mod part.
- Download the appropriate package:
- both are zip files that contain a folder named 2MiceMod. Extract this folder at
- %appdata%/LOVE/mari0/customentities/ for Mod Loader
- %appdata%/LOVE/mari0/mods/ for Mari0 Modding System
- Open folder 2MiceMod and locate mari0_2mice.pie. Copy (or cut) this file to location you will remeber.
- Run glovePIE manually. File > Open > locate mari0_2mice.pie and open it.
- Run game from your mod loader .love file
- Hit Run button in GlovePIE
- Play. Remeber to attach the second mouse...
Bonus: Getting script to work with random compatible mod
- Follow above steps for one of the modpacks. Let's say you will use package made for Mod loader
- Get your mod source files (it's .love file), open it with WinZip or similar program, extract main.lua and open it with text editor (Notepad)
- Find the code
Code: Select all
http = require("socket.http")
http.TIMEOUT = 1
- change it to
Code: Select all
http = require("socket.http")
http.TIMEOUT = 1
- save main.lua and get it back in the love file (using... WinZip?) and overwrite the old one. Close the archive
- Proceed with starting glovepie, loading the pie script and launching the game from your mod