Hosted Projects - Standalone > Diaspora Tech Help

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

<< < (3/5) > >>


--- Code: ---// 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


--- End code ---

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]

// this is the (my) Diaspora_button_Macros.ttm  file.   (part 2)
//  just copy/paste it behind the first part of this file above.

--- Code: ---
///////////////  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 code ---

-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)

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

[attachment deleted by an evil time traveler]

If you don't mind, would you please encase the .ttm code with the {code}{/code} tags (using square brackets instead of the braces)?

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.

[attachment deleted by an evil time traveler]

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)


[0] Message Index

[#] Next page

[*] Previous page

Go to full version