Author Topic: Using two T16000 and T.A.R.G.E.T. in Diaspora  (Read 10103 times)

0 Members and 2 Guests are viewing this topic.

Using two T16000 and T.A.R.G.E.T. in Diaspora
Hello,

Been programming for a few months now, and read the script manual a few dozen times in the proces.
Got 97% on paper now on how I want my sticks to work, and for something for you and T.A.R.G.E.T. to work with.
Might have forgotten a few ; 's at the end of each line on the way and therefore things might not work yet, and not sure about the use of & to let the program use two command lines for the same axe. It's too C for me, but easy to trial and error..

In a few hours I will have it all posted here. Lot's of fluff stuff behind the //'s (the part the progam ignores) so you can understand why the line is written as it is, and what it should do.

First thing I did was...welll ofc read the manuals a dozen times...but in the proces it became clear that this was far superiour to using VJoy and PJoy. (well..if it works ofc, still need to test stuff).
While reading the manuals I could grasp how to write stuff so the T16kM's were going to do what they needed to do.

I wanted my right stick to be a never-let-go stick. All base buttons and the left youstick were all going to be have to be done with the left hand.
Therefore any unexpected immediate threat should have to be able to be dealt with by the right always-hand-holded joy only.

This is what I came up with...
T16000 (the right one)
X-axis = Bank axis
Y-axis = from middle to up:Absolute throttle-axis
         from middle to down: Also Absolute throttle-axis mirrored to up(yes, this is possible in TARGET!)
also Y-up = Forward Thrust
       Y-down = Reverse Thrust
You can see how this is stating: Push to go, and pull to go backwards! Easy as not eating pie :D. No seeking buttons to thrust stuff on this one.
Don't worry... Throttle (0, 1/3, 2/3 and full) will also be assigned to some right POV's for use with other Thrusts.
But linking the Dia Throttle Axis with the right Y-axis seemed too logical to ignore.
Z-rotate axis right-twist = Thrust up
Z-rotate exis left-twist = Thrust down.
Reason: I am doing stuff and suddenly someone starts shooting missiles at me from close range. This one has to save me! NOW!
Now the right POV -assigned full throttle- together with a quick twist will let this evil missile pass me by under or over me.

Left youstick T16001 :
X-Axis left= Left thrust
          right= Right Thrust
Y-Axis = Pitch axis
Z-rotate =Yaw (yawing is rotating anyways, cannot get more logical then this :))


And then did a lot of pencil and paper stuff. One of them is a sort of mapping of how I wanted things to be assigned.
Here's my scrablings..:)
(code will be here in a few hours. Lot's of typing to do. Only got code on paper)



[attachment deleted by an evil time traveler]
« Last Edit: February 12, 2014, 09:36:18 pm by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Code: [Select]
// everything behind two of these is always ignored by the program, and only for clarification purposes
include "target.tmh";
include "Diaspora_button_Macros.ttm"; // Telling the program to use this ttm. See next reply today or soon.

alias T16001;  // Second T16000M handle, and naming it. Since no testing yet, below you might have to switch 16000 and 16001 numberings if pc mixes them up.


int Cruise_Mode ; // I want three Axis-modes. Cruise, Combat and Docking. We will define next how axis should behave in Cruise Mode. The Combat and Docking Modes you can do for yourselves if below part here works. Just add SetSCurves to them. See page 27/60 in the Script Manual on howto of SetSCurve...
{
///////////
//T16000, The right, never-let-go stick. Forward/Reversed Thrust&Throttle Axis-in-one, Banking and Thrust UP/DOWN for evasion of incoming
///////////

MapAxis(&T16000, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // no need to Set Curve yet. Link X-axis ingame to Bank Axis. (just hit the right stick when you are into defining the bind in Dia)

KeyAxis(&T16000, JOYY, 0, AXMAP1 (2, 'PGUP', 'PGDN')); // Link Page Up and Down ingame to Forward and Reverse Thrust. Put two if these(//) before this line if you bind the axis ingame to the Absolute Throttle Axis. It might conflict with the PG buttons it creates here... or (my better guess on howto when fails) bind Forward Thrust and Reverse Thrust ingame to the page-keys áfter you have bound Absolute Throttle Axis that comes next..(the '2' chops the axis in half btw, and the next two state what it must do/keystroke there)
& SetCustomCurve(T16000, JOYY, LIST (0,100, 25,75, 50,50, 75,75, 100,100)); //  Both pull and push of Y-axis should behave the same. Link ingame to Absolute Throttle Axis. So you get Throttle going eather way :). Does it need an & in front of it?
//the above JOYY assignments should give you the handy push-to-go-forward, and pull-to-fly-backwards...

KeyAxis(&T16000, RUDDER, 0, AXMAP1(2, 'UARROW', 'DARROW'));
& KeyAxis(&T16000, RUDDER, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE; // Link arrows Up and DOWN ingame to Thrust Up and Down, and twisting the Z-Axis should do this. Ps: Don't forget the POV DL (downleft) clicking (see next reply that comes soon) or no full throttle :@P =nothing happening. Used to evade missiles. Does it need an & in front of it?

///////////////////
//T16001, the left one. Pitch, Yaw and left/right Thrust
///////////////////
KeyAxis(T16001, JOYX, 0, AXMAP1(2, 'LARROW', 'RARROW')); // link these arrows ingame to Left & Right Thrust.. then X-axis will do this
&MapAxis(T16001, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // does it need an & in front of it?

MapAxis(T16001, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // link left joy y-axis ingame to Pitch Axis.

MapAxis(&T16001, RUDDER, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); // link z-rotate ingame to Yaw Axis.

///////////
//making the other modes invalid (for obvious reasons)
///////////

COMBAT_MODE=0;  //(not sure these two work if not using FLAG)
&DOCKING_MODE=0;  //does it need an & in front of it?
}

int main()
{
if(Init(EventHandle)) return 1; //declare event handler, return on error
&T16001 = GetIndexJoy (SelectUsbDevice ("VID_044F&PID_B10A"));  // telling TARGET to get info from the second joy at given usb ID. The ID you see here is always this one for 2nd T16kM joy's, and T16001 was given this name by us so TARGET knows what we are talking about.
//here comes the MACRO key assigning. See next Reply to this thread. I will post script in parts. It's the least interesting and most easy part of this script...and the most typing I see :)

if 'SHIFT' + 'ALT' + '3'  // any T2, right j's T3 and left j's POV-right.
EXEC (Cruise_Mode;);  // this should result in going into Cruise_Mode, for now the only mode I did.

if 'SHIFT' + 'ALT' + '1'  // any T2, right j's T3 and left j's POV-up
EXEC (Combat_Mode;); // to be defined in a few weeks or by yourself with SCurving (page 27 script manual)

if 'SHIFT' + 'ALT' + '5'  // any T2, right j's T3 and left j's POV-down
EXEC (Docking_Mode;); // same story, better tweak it to your own liking :)

Cruise_Mode=1; // set initial Axis Mode to Cruise. If Mode switching doesn't work redo scripting writing with the use of 3 FLAG's for the Modes this time (page 43 script manual). Every mode should be told to unable the other two modes in the script. Or else some Axis might do two mixed modes :P. Not sure if it can be done without use of FLAG/EXEC. My guess is Combat_Mode=0 , Cruise_Mode=0 will just do the trick without defining these Modes in FLAG's.
}

I am very confident it is filled with syntax errors. Any corrections and comments/improvements are very welcome.
I am not an expert, and did this stuff more on assumptions then on knowto's.
I got twice the above more on paper to be posted here. 4 pages filled with define buttons. And got to write the whole part referring to the define part. Saved the boring part for last :). But the above...if it works...should give you 6 axis with some cut in half for improved functionality to top it off.


editted reason:
spelling in code wrong. :)
 :pimp: :pimp: there might be more...
« Last Edit: March 12, 2014, 09:42:05 pm by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
ummmm

okay

What is this for, exactly?
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Veers

  • 29
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Looks like some key mapping/binding? (for two sticks?)

I'm so rusty on my coding.
« Last Edit: February 13, 2014, 03:00:06 am by Veers »
Current Activities/Projects: Ideas and some storyline completed.

ArmA 2&3 Mission Designer and player.


WoD - I like Crystal. <3

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Indeed. It is coding for using two joysticks as one.
In TARGET software. The scripting part of it uses C a lot.
So I learned some basic C in 3 months, lol..

It's for using two joysticks as a virtual one. Diaspora only wants to see one. TARGET software (from Thrustmaster) lets you do that.
That way you can assign more axis and buttons then with just one joystick. I have assigned the entire keybord to the base buttons of my two joysticks. The idea was that I just don't need to use the entire keybord at all. I got every button and function on my joysticks. A few people want to know how this is possible including me. So I spend three months of programming in TARGET (which uses C) and now I am almost done. When done, it's just copy/paste for the rest of the gamers who use two T16000M joysticks. And not only in Diaspora. With minor adjustments it also works in other games.

It will help a lot of people out. On other sites they also want to knwo how this is done. There are a few threads on this (TARGET) but I seem to have stuff the other threads are lacking. (if it works is a second, but it is all trial and error anyway with this stuff)


Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
On this forum and at Roberts (Space Citizen) there are some people who have posted about this.
So I am not the only one with two T16000M's :)
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
First of all, it is really strange setup (I mean 2 similar sticks)

I think most preferable (by popularity) setup for freespace will be :

1) keyboard + mouse
2) keyboard only
3) flightstick
4) HOTAS (flightstick + throttle) <- which is the best (I mean "fun" factor). Except you don't get "shooter style aiming precision" as using mouse. And your joystick must be very very precise with 0 deadzone and very light load. My choice is slightly modified Defender Cobra M5. For lateral thrusters I have 3 hat switches to choose from - 2 on stick and 1 on throttle.
I use VJoy + Joystick curves + SVMapper  soft to link Hotas into 1 device.
5) and now there's the guy with 2  T16k ( I think it's bit complicated setup for Freespace, but if you wish... However it could be fun to have 2 sticks for Mechwarrior or Descent)

But wait - how T16000 fits your left hand?
« Last Edit: February 13, 2014, 03:35:55 am by Familiar »

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
It is not uncommon to use two sticks. (although I hear you get owned in MECHWARRIOR online if you fight a dude who uses a mouse, but it could be just a skill-thing :))
These were exactly made for this purpose.
They can be converted to left-side use by a little tinker-work with a screwdriver.
They got good rep on a few review sites.
They are also budget. :)
Quality budget. They don't flip over when taking a dive, and they also lack deadzone issues other expensive joy's tend to have.
I did some extensive homework before I descided that this was my horse to bet on. :)
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Hey, so long as it works for you.

We can possibly put in support for analog forward/reverse thrust. We've already got the digital keys, it would just be a matter of setting up a new control configuration and then wrestling it into the control config screen so that the user can actually use it.

We could also allow the relative throttle axis to engage in reverse thrust.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Code: [Select]
/////////////
//The second part of the 'main' part of the main script. The MapKeying part. copy-past it into main file.
/////////////

////////////
//First the right joystick MapKeys...:
////////////

//////////
// POV part. H1U= up, etc..
/////////

MapKey(&T16000, H1U, Match_Target_Speed); // T.A.R.G.E.T. has to find what defines Match_Target_Speed and finds it in the ttm file we made before if all is well :).  ''KP1''
MapKey(&T16000, H1UR, L_ALT + '2'); //this together with [shift] (any TS2) should give us 1/3 Throttle.. (see: this is the (my) Diaspora_button_Macros.ttm file. (part 2))
MapKey(&T16000, H1R, Toggle_Gliding); // ''KP3''
MapKey(&T16000, H1DR, L_ALT + '4'); // +[Sh]= 2/3 Thr
MapKey(&T16000, H1D, Launch_Countermeasures); // ''KP5''
MapKey(&T16000, H1DL, L_ALT + '6'); // +[Sh]= Thr Max
MapKey(&T16000, H1L, Afterburners); // ''KP7''
MapKey(&T16000, H1UL, L_ALT + '8'); // +[Sh]= Thr to zero
//above POV's edited!!! and therefore also gonna edit the main file that refers to it..

////////////////////////////////
//other top buttons MapKeyed:
////////////////////////////////
 
MapKey(&T16000, TS1, Fire_Primary_Weapon);
MapKey(&T16000, TS2, SHIFT);// Not sure if you get a shift here, or a search for what SHIFT is defined..
MapKey(&T16000, TS3, ALT); //same here. have to test.
MapKey(&T16000, TS4, Cycle_Forward_Primary_Weapon);

///////////////////////////////
// Base Buttons right joystick:
///////////////////////////////

MapKey(&T16000, B5, Rearm_Me);
MapKey(&T16000, B6, Augment_Forward_Shield);
MapKey(&T16000, B7, Equalize_Energy);

MapKey(&T16000, B10, Disarm_My_Target);
MapKey(&T16000, B9, Attack_My_Target);
MapKey(&T16000, B8, Capture_My_Target);
 
MapKey(&T16000, B13, Ignore_My_Target);
MapKey(&T16000, B12, Communication_Menu);
MapKey(&T16000, B11, Toggle_Auto_Speed_Matching);

MapKey(&T16000, B14, Engage_the_Enemy);
MapKey(&T16000, B15, Cover_Me);
MapKey(&T16000, B16, Return_To_Base);


/////////////////////////
/////////////////////////
//left joystick (T16001):
/////////////////////////


///////
//POV: (all views and modes)
///////
 
MapKey(&T16001, H1U, Center_View);
MapKey(&T16001, H1UR, View_Up);
MapKey(&T16001, H1R, View_Right);
MapKey(&T16001, H1DR, Free_Look);
MapKey(&T16001, H1D, View_Rear);
MapKey(&T16001, H1DL, External_View);
MapKey(&T16001, H1L, View_Left);
MapKey(&T16001, H1UL, Current_Target_View);

////////////
//the 4 other top buttons/trigger:
///////////

MapKey(&T16001, TS1, Fire_Secondary_Weapon);
MapKey(&T16001, TS2, SHIFT); // not sure if this will create a search or already giving the shift here..
MapKey(&T16001, TS3, Cycle_Secundary_Weapon_Bank);
MapKey(&T16001, TS4, Target_Next_Closest_Hostile_Ship);

//////////////
//The base buttons:
//////////////
MapKey(&T16001, B11, Target_Ship_In_Reticle);
MapKey(&T16001, B12, Target_subsystem_In_Reticle);
MapKey(&T16001, B13, Target_Targets_Nearest_Attacker);

MapKey(&T16001, B16, Toggle_Auto_Targeting);
MapKey(&T16001, B15, Target_Last_Ship_That_Transmitted);
MapKey(&T16001, B14, Target_Next_Live_Turret);

MapKey(&T16001, B7, Target_Next_Ship);
MapKey(&T16001, B6, Decreaee_View_Distance);
MapKey(&T16001, B5, Increase_View_Distance);

MapKey(&T16001, B8, Target_Closest_Friendly_Ship);
MapKey(&T16001, B9, Cycle_Radar_Range);
MapKey(&T16001, B10, Target_Newest_ship_In_Area);

////////
//done :) 4 moths work here, lol... So if any T16kM users like to test it out for me...;). If something doesn't work, and you come up with a solution, by all means, post it here.  Next come the other file. the .ttm file in where things of the above are defined.
////////


 :pimp: editted:
//////////
// POV part. H1U= up, etc..
/////////
 :pimp:


 :D extra note: You might wonder why at POV I use Keypad numbers and normal numbers at will. This is not without reason! I wanted [shift]-use with half of the POV clicks. To avoid activating stuff that shouldn't activate by accident if you're 1/8th off with clicking. And since shift+keypad numbers are not allowed as option in Dia, I came up with this creative solution that still made some sence  :eek2:

more editted: t16000's codings of the left one had to be be coded as t16001's ofc, lol...

*editted: closet=closest typo... (Target_Next_Closest_Hostile_Ship)
« Last Edit: March 13, 2014, 12:07:27 am by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Code: [Select]
// this is the (my) Diaspora_button_Macros.ttm  file.   (usage seen at page 19/60 of the TARGET script manual)
// to be used in conjunction with the mapkey part I will post in a few days. (how it works: T.A.R.G.E.T. script manual page19/60)
//feel free to adjust to your own pref. construction ofc. It's mainly here te help understand how T.A.R.G.E.T. can do stuff for you.

//everything behind at least two of these -untill the next line- is always ignored by the program. so an ideal place to clarify stuff.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////  here the handy layout POV/HAT/top of the (my) left T16001M joystick
///////////////                '9' [Trigger] (TS1)
///////////////                             1                                    H1U
///////////////                        8         2                           H1UL    H1UR
///////////////   'm' (TS3)        7        .        3   'r' (TS4)  =    H1L      .        H1R
///////////////                        6         4                           H1DL    H1DR
///////////////                             5                                    H1D
///////////////                   [SHIFT] (TS2)        (H1UL etc info not/hard to find in Thrustmaster/TARGET manuals,
///////////////                                                             so mentioning it for global benefit)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//note: my pc gave one USB the nr ''3'' (the left one T16001), and the other ''1'' (the right one T16000). In case of reference ..

//here comes the left joystick little thumbee POV's HAT definitions they way it made sence to me... And list below is going clockwise:

{
define Center_View '1' // When the game tells MapKey (soon to be posted) to execute 'Center_View' it gets redirected to this file and creates a ''1'' here.
//It starts working (doing the MapKey part) when quickkeyed ingame to ''1'' for Center View. linked to the POV-UP in the soon-to-be-seen MapKey code.
define View_Up '2' //  link View Up ingame to ''2''. linked to POV-UPRIGHT
define View_Right '3' // link View Right to ''3''. linked to POV-R
define Free_Look '4' // link to ''4'' ingame. linked to POV-DR
define View_Rear '5' // etc, see above how to proceed, POV-D
define External_View '6' // POV-DL
define View_Left '7' // POV-L
define Current_Target_View '8' // POV-UL

//also on left POV: joystick sensibility. The three modes. Defining them was done in the main script. They are in the [SHIFT]+[ALT] layer (only accessable by pushing two buttons with the right hand to prevent accidental activation.)

//TS1-TS4  trigger/buttons next:

define Fire_Secondary_Weapon '9' // quickkey ingame to ''9''. Mapkey will give this order to the trigger (TS1)

define SHIFT L_SHIFT // TS2 (easy to push with base of your thumb) does ''shift''-layer. Needed since I make use of Keybord obsolete by assigning entire alphabet to buttons on the two joystick.
//Some letters have to be used more then once to be able to assign all the Dia stuff :) .

define Cycle_Secundary_Weapon_Bank 'm' // TS3 (the left button) creates an ''m'' because when pushed in the MapKey part it orders TARGET to look for something that defines C_S_W_B, and TARGET finds that info over here. 
//''m'' needs to be linked ingame to C_S_W_B  ofc. as with all these defines!
//define Cycle_Secundary_Weapon_Firing_Rate. *//* Yes, this is not a //-typo. Target needs no info about this one, but you do...:
//Activated by using any TS2 (both will give you a [shift]) +left TS3. Bind ingame to [SHIFT]+ ''m''. 
//These not-completelly-used-by-TARGET lines are from here on marked by *//* after the define-part for easy comment-reading, and to avoid confusion.

define Target_Next_Closest_Hostile_Ship 'r' // TS4 (the right button) creates an 'r' here. bind ingame to T_N_C_H_S as usual
//define Target_Previous_Closest_Hostile_Ship. *//* The former/above created 'r' In the [ALT] layer this time. [ALT] gets created by pushing the right stick's TS3. So left TS4+ right TS3. Bind ingame to [ALT]+ ''r''

//define Target_Next_Hostile_Bomb_Bomber. *//* Any TS2 + left TS4. Bind ingame to [SHIFT]+ 'r'
//Define Target_Previous_Hostile_Bomb_Bomber. *//* Any TS2+ right TS3+ left TS4. Bind ingame to [SHIFT]+[ALT]+ 'r'  (=not difficult to push al these. the mental stuff is the hard part :) )

//end POV part

////////////////////////////////////////////////////////////////
// Base buttons lefthanded joystick. Assignment of alphabet.
////////////////////////////////////////////////////////////////
//                       ||
// B11   B12   B13       ||      B7   B6   B5
// B16   B15             <>           B9   B10
//             B14               B8
//
/////////////////////////////////////////
//                      ||
//   Q    W     E       ||       T     Y     U
//   A    S             <>             G     H
//              D                F
//
/////////////////////////////////////////

define Target_Ship_In_Reticle 'q'  // B11 button says: ''q''. (in the next to be posted MapKey part).  Bind ingame to ''q''
//define Target_Closest_Attacking_Ship. *//*  [SHIFT] (=anyTS2) + B11 (''q''). Bind ingame to [SHIFT]+ ''q''

define Target_subsystem_In_Reticle 'w' // B12. Bind ingame as usual
//define Target_Next_subsystem *//* [SHIFT] + ''w'' . Same proces here and below
//define Target_Previous_Subsystem *//* [SHIFT]+[ALT] + ''w''.

define Target_Targets_Nearest_Attacker 'e'  // B13
//define Target_Targets_Target *//* [SHIFt] + ''e''

define Toggle_Auto_Targeting 'a' // B16
//define Turn_Auto_Targeting_Off *//* [ALT]+ ''a''
//define Turn_Auto_targeting_Subsystem_Off *//* [SHIFT] + ''a''

define Target_Last_Ship_That_Transmitted 's' // B15

define Target_Next_Live_Turret 'd' // B14

define Target_Next_Ship  't' // B7
//define Target_Previous_Ship *//* [ALT] + ''t''

define Decreaee_View_Distance 'y' // B6

define Increase_View_Distance 'u' // B5

define Target_Closest_Friendly_Ship 'f' // B8
//define Target_Closest_Previous_Friendly_Ship *//* [ALT] + ''f''

define Cycle_Radar_Range 'g' // B9

define Target_Newest_ship_In_Area  'h' // B10



}

note: just before the } above; copy-paste the next reply-total code part.


-end part one of this file, the left joystick MapKey definitions-

Second part soon. Posting in parts so you can see work in progress. :). In a few days all is posted, and testing can begin. I hope people with also these two sticks will want to help me with this.
Maybe other T.A.R.G.E.T. file writers can see errors sooner then me. I am confident that this will help some of Thrustmaster stuff users out.
Copy-Pasting this and correcting (hopefully) only one or two syntax errors saves you 3 days typing and 3 months homework I find.
I hope my theorie of/in the code is as good as correct. I am no pro in finding out why stuff will/is not working yet, lol.. Haven't had time to test anything. Still got 1-2 days of programming the rest of the program ahead it seems...
ps: Sorry if with copy-paste the txt joy pic layout gets gurbled up. It's either looking ok here, or ok in your own file :P.

pps: the green code trick works :) looking nice!

The next page below needs adjusting, so I will go []code it when I got code that works. It seems that Diaspora hates F1-F12 buttons. So I need to adjust it. My idea is that since I cannot push two buttons (ALT is the left big button besides the POV) with one thumb top (we cán with the base of the tumb/palm which gives us the shift-button!), and I want to use the KeyPad numbers and the normal numbers without chance of activating other stuff linked to normal numbers.
I will use up, right, down and left POV = KP1, KP3, KP5 and KP7.
The in between POV's I will do in [SHIFT]+[ALT] + normal 2, 4, 6 and 8. This has to be done so cause Dia don't like [SHIFT] with KeyPad numbers. And [ALT] + POV is using your thumbtop for two things= not possible, lol.
I will code T.A.R.G.E.T. to give these four POV's an [ALT] and the number, and you will have to use the [SHIFt] TS3 in addition to these POV's. This to deny the possibility you slightly miss the POV you want to hit, and do stuff with your Throttle while you wanted to use countermeasure etc. The having to use of TS3 button for the in-between-buttons prevents unexpected stuff from happening. :)

The other left handed POV only does camera, and misswitching between them doesn't do other stuff to the ship. So it doesn't matter that much over there.. :)


*editted: closet=closest typo... (Target_Next_Closest_Hostile_Ship)

[attachment deleted by an evil time traveler]
« Last Edit: March 13, 2014, 12:03:14 am by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
// this is the (my) Diaspora_button_Macros.ttm  file.   (part 2)
//  just copy/paste it behind the first part of this file above.

Code: [Select]

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////  here the handy layout POV/HAT/top of the (my) right T16000M joystick
///////////////                       KP9[Trigger(TS1)]
///////////////                            KP1                                H1U
///////////////                 [S]+[A+8]      [S]+[A+2]                  H1UL    H1UR
///////////////   [ALT](TS3)  KP7          PoV       KP3 (TS4)[0] =    H1L     .       H1R
///////////////                 [S]+[A+6]      [S]+[A+4]                  H1DL    H1DR
///////////////                            KP5                                H1D
///////////////                           (TS2)       
///////////////                         [=SHIFT]                               
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//note: my pc gave one USB the nr ''3'' (the left one T16001), and the other ''1'' (the right one T16000). In case of reference ..

//////////////////
//here comes the right joystick little thumbee POV's HAT definitions ... And list below again going clockwise:
/////////////////

//beware: every half POV , I switch between Keypad numbers and normal+[alt]+[shift]. This is not without reason, and explained elsewhere.
define Match_Target_Speed KP1 // bind ingame to KeyPad button 1
//define Set_Throttle_to_One_third *//*  bind ingame to [SHIFt] + [ALT] + 2,  the [ALT]+2-part is going to be defined in the main file. Use UR-POV and TS2 to throttle 1/3 is what we've got here.
define Toggle_Gliding KP3 // H1R button. Up for battle en Right for cruise and gliding stuff... this was my idea of easy logic.
//define Set_Throttle_to_Two_Third *//* bind to [Shift] + [ALT] + 4
define Launch_Countermeasures KP5 // down button. dropping and down logic :)
//define Set_Throttle_to_Max *//* [Shift] + [ALT] +6 linked
define Afterburners KP7  // left button (sorry, I know Vipers has got the big red Fire here :), but triggering to shoot= :) too )
//define Set_Throttle_to_zero *//* [Shift] + [ALT] + 8 linked

//////////////////////////
//TS1-TS4  trigger/buttons next:
//////////////////////////

define Fire_Primary_Weapon KP9 // Trigger. Bind ingame to KeyPad 9
define SHIFT L_SHIFT // TS2. Not sure if SHIFT in the MapKey already gives me the shift. Might be obsolete.
define ALT L_ALT // TS3. Same story here as shift above..
define Cycle_Forward_Primary_Weapon '0' // TS4, the right button
//define Cycle_backward_Primary_Weapon *//* [Shift] (any TS2) + TS4 (0). Link this combo ingame to work

//end POV part

//editted F9=KP9 now!!!

////////////////////////////////////////////////////////////////
// Base buttons righthanded joystick. Assignment of alphabet.
////////////////////////////////////////////////////////////////
//                     ||
// B5    B6   B7       ||       B13   B12   B11
// B10   B9            <>             B15   B16
//            B8                B14
//
/////////////////////////////////////////
//                   ||
//  I    O    P      ||       J    K    L
//  Z    X           <>            B    N
//            C               V
//
/////////////////////////////////////////

define Rearm_Me 'i' // B5=i as you can see above. Link Rearm ingame to ''i''
//define Increase_Weapon_Energy *//* [Shift] + ''i''. Link all below as usual...
//define Decrease_weapon_Energy *//* [Shift] + [Alt] + ''i''

define Augment_Forward_Shield 'o' // B6
//define Equalize_Shield *//* [Alt] + ''o''. TS3 for 'Alting'+B6
//define Increase_Shield_Energy *//* [Shift] + ''o''
//define Decrease_Shield_Energy *//* [Shift] + [Alt] + ''o''

define Equalize_Energy 'p' // B7
//define Increase_Increase_Engine_Energy *//* [Shift] + ''p''
//define Decrease_Increase_Engine_Energy *//* [Shift] + [Alt] + ''p''

define Disarm_My_Target 'z' // B10
//define Disable_My_Target *//* [Shift] + ''z''

define Attack_My_Target 'x' // B9
//define Attack_My_Subsystem *//* [Shift] + ''x''

define Capture_My_Target 'c' // B8

define Ignore_My_Target 'j' // B13
//define Form_On_My_Wing *//* [Shift] + ''j''

define Communication_Menu 'k' // B12

define Toggle_Auto_Speed_Matching 'l' // B11 = L

define Engage_the_Enemy 'v' // B14

define Cover_Me 'b' // B15
/define Protect_My_Target *//* [Shift] + ''b''
 
define Return_To_Base 'n' // B16
//define Enter_Subspace_End_Mission *//* [Shift] + ''n''




-end final part of this file. -the right joystick MapKey definitions-


 :pimp:   editted:
//////////////////
//here comes the right joystick little thumbee POV's HAT definitions ... And list below again going clockwise:
/////////////////

//////////////////////////
//TS1-TS4  trigger/buttons next:
//////////////////////////

and editted the layout pics of the sticks POV's etc  :yes:  (not sure if firefox shows the same as IE)
 :pimp:

more editted: TS4 right=0 now. (F10 was forgotten while killing all the F's)

[attachment deleted by an evil time traveler]
« Last Edit: March 13, 2014, 12:40:56 am by Rakebuzz »
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
If you don't mind, would you please encase the .ttm code with the {code}{/code} tags (using square brackets instead of the braces)?
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Are you sure *.ttm files use these at all? I only did what the manual on page 19 sayed how it worked. It doesn't speak of these {}'s (as you can see in the attachment)
I haven't been in the T.A.R.G.E.T. script part of the software yet, so I only have on paper that in order for my joysticks to work like 'this' , the code should be 'that'. Been busy with other stuff this weekend also and two days of headache isn't working along too.
But you sound sure, so I will apply them.

It might seem foolish to post stuff that hasn't been tested, but the theory is there, people got a lot to work with (took me 4 months to read, and understand the manual, and come up with code that should do the job), and it might only take a few small adjustments to get the stuff working.
Posted it so it could save others weeks of work that are riding on the same boat as me... (I think even other Thrustmaster users could benefit)
Even posted a few comments to adjustments and reason why they might have to be applied.

Had to look Brackets and Bracers up on google. My English is ok, but not in the code-section...

BTW: Here you can find the manuals and the software. Not sure if I posted it above. Don't see it.

http://ts.thrustmaster.com/eng/index.php?pg=view_files&gid=1&fid=3&pid=285&cid=5



[attachment deleted by an evil time traveler]
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
I'm sure you didn't mean for me to do every indivudual line of
define: between []
and every
// define: not between []
?
If so...I would mind. for obvious reasons.. :P
Everything behind // is ignored by the program. But it still serves a purpose, cause you still need the info after it, to understand stuff and it can do no harm there for as long as it remains in the same line.. (according to the manual)
Scoundrilling gay
IT is what they say
Shoot from the hip,
Muggin tha sip
Beware of the Ray!
(The zapp I mean ofcc)

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
No no no, he meant that you should put the contents in a [code](stuff)[/code] block. So it would look like this:

Code: [Select]
(stuff)
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
No no no, he meant that you should put the contents in a [code](stuff)[/code] block. So it would look like this:

Code: [Select]
(stuff)

Yes this.

Huh, interesting trick there, Ralwood
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Huh, interesting trick there, Ralwood
I can't take the credit; I learned it from Goober5000.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
Rakebuzz to further clarify, I didn't mean for you to put the [code] [/code] tags on your script for T.A.R.G.E.T., just on your posts where you've pasted them.

And no, please don't do another paste with the tags in place, just edit your previous posts.  :rolleyes:
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Using two T16000 and T.A.R.G.E.T. in Diaspora
I did the first two posts for you, so you can see what they mean.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]