Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Sogi-Ya on July 08, 2008, 11:58:52 pm

Title: WC4 mouse control request
Post by: Sogi-Ya on July 08, 2008, 11:58:52 pm
hay all!

first post here so i hope this hasn't already been covered, i don't know if any one remembers the mouse control system for WC4 but it was a bit different from most ... well ALL other space flight sims.

instead of mapping the ship controls to the direct movements of the mouse ( and thus forcing us to do the drag and slap of picking up the mouse and moving it back to where it started at ) it mapped the controls to a graph like a joystick, so that if you moved the mouse a set distance side to side / up and down the it would pitch / yaw the ship at a set rate.

the end effect was that on screen there would be a set of lines making a box similar to holding the  right mouse button and dragging to select multiple icons on your desktop.

uhm .... i suck at describing things!

with the mouse centered ( in relation to the ship on screen ) there would be a cross-hair looking thing in the center of the HUD and your ship would be fling straight forward. if you moved the mouse to the dead right you would get a horizontal line leading strait out from the center of the screen, it would be about 2 inches in length then stop. at that point you ship would turn to the right as fast at it could. if you moved the mouse dead up ( or forward toward your monitor if you prefer ) you would get a straight line up from the center of your screen and you ship pitch up or down ( depending on your preference of setup ). if you want to bank up and right, move the mouse forward and right ( duh ) but this time you get a square box with the lower right corner in the center of the screen and the upper right corner pointing in the direction you are banking. repeat the dame description ( but in inverse and applicable ) for all the other directions you want to turn!

there that was better!

anyway ... my joystick sucks. i cant get it to map how i want, to do what i want! ( despite being packaged with the demo for freespace 2 ) and the drag and slap really pisses me off, is there a way to implement this type of mouse control scheme into FSO?

once again i apologize if this is covered some ware else and i should have just used "search" to find it ...

Title: Re: WC4 mouse control request
Post by: Nuke on July 09, 2008, 12:58:09 am
i implemented that kind of mouse flight with my old mouse script. there was some concern that it borked the physics and possibly colision detection as well. but it worked pretty well. another bug is that it didnt do the normal freespace coordinated yaw. meaning when you yaw at rate x you would roll and rate x*0.5, and now theres a table flag to change how much roll you get when you yaw. i dont think i have a way to read that value so my script has an option to set it manually.

one of my main points at dissatisfaction about the script was the way it stored and saved settings. theres a basic gui that comes up in mission when you first use the script, lets you set the settings with the mouse and then save them, this would create a file in the mission folder. if the file is detected it will use the settings and not display the gui. you had to delete the file if you wanted the game to give you the menu again. you could edit it but for some reason if you used notepad it wouldnt load right. you could use something like ms edit (the old dos editor) or notepad++ to edit the settings directly.

what i should do is make a button show up when you are in the options state. clicking it brings up the menu. this way you can just use the gui to change the settings. only reason i haven't continued to work on the script was because of little interest by the community and because i had assumed that new input code was around the corner. the script is not overly complicated, merely setting your desired roll, pitch and yaw rates.

this should be the most recent version, there may or may not be a newer version on the wiki (in the sample scripts section). also it may or may not work right because of continuing scripting development. should be compatable with more builds by now. id pull a recent trunk build and try to run the script. if theres any errors let me know, and il tweak it so it works.

http://www.hard-light.net/forums/index.php/topic,44634.msg913829.html#msg913829
Title: Re: WC4 mouse control request
Post by: General Battuta on July 09, 2008, 01:28:06 am
Just use the keyboard -- it's not too bad once you get used to it.
Title: Re: WC4 mouse control request
Post by: Sogi-Ya on July 15, 2008, 11:20:05 pm
i'm kind of a noob .... how do i install this?

i'm not a programer but i am passably fluent at PC speak ....
Title: Re: WC4 mouse control request
Post by: Fenrir on July 15, 2008, 11:50:33 pm
I`ve been wanting a good mouse control solution as well...

Sogi, theoretically you should copy-paste that script into a text file and rename it "scripting.tbl" then you should put that file in c:/games/FreeSpace2/mediavps/data/. But when I did that it didn`t work. It probably has to do with build incompatibility. I`m using the latest trunk build. (http://www.hard-light.net/forums/index.php/topic,55095.0.html)

EDIT: I started a new pilot file, and it worked! Well, that is until I try to save the configurations. Then the game crashes.
Title: Re: WC4 mouse control request
Post by: Sogi-Ya on July 16, 2008, 03:00:14 pm
I`ve been wanting a good mouse control solution as well...

Sogi, theoretically you should copy-paste that script into a text file and rename it "scripting.tbl" then you should put that file in c:/games/FreeSpace2/mediavps/data/. But when I did that it didn`t work. It probably has to do with build incompatibility. I`m using the latest trunk build. (http://www.hard-light.net/forums/index.php/topic,55095.0.html)

EDIT: I started a new pilot file, and it worked! Well, that is until I try to save the configurations. Then the game crashes.

did all that but i still cant get it to work. I'm nor really sure how to start this script up .... does it do it automatically or is there something manual i need to do?

i guess I'm more noob than i thought, I've looked through the wiki but i cant find a section for how to implement someone else's scripts, only info on how to make your own ( and i don't really get all of that either )
Title: Re: WC4 mouse control request
Post by: Nuke on July 16, 2008, 08:28:41 pm
it might be the cfile upgrades. il debug when im less stoned.
Title: Re: WC4 mouse control request
Post by: Sogi-Ya on July 17, 2008, 01:05:59 pm
lol, take your time, i got other games i play.
Title: Re: WC4 mouse control request
Post by: Fenrir on July 18, 2008, 06:29:08 pm

did all that but i still cant get it to work. I'm nor really sure how to start this script up .... does it do it automatically or is there something manual i need to do?

i guess I'm more noob than i thought, I've looked through the wiki but i cant find a section for how to implement someone else's scripts, only info on how to make your own ( and i don't really get all of that either )

Did you start a new pilot? That`s what I had to do. But like I said it didn`t work completely.