Theory Crafting for an Application

Ripcord33

Grand Admiral
May 2, 2016
217
668
1,210
RSI Handle
Ripcord03
Alright, so Im throwing this up because that darn @Blind Owl brought up an something, and it gave me an idea of something for people that may want a printable Control Map for their stick/throttle, but either are too lazy, or dont own, or dont have the skills, or being TESTies, too drunk.

I've got a rough idea of what i need/want to do. So here goes the explanation.

The Star Citizen Controls are saved in an encrypted file, unless you export them from the in-game option menu. From there they are exported to an XML File. However, the structure of this file is complex, and it doesnt want to cooperate properly with simpleXML for PHP.

My Initial idea was to create a webpage that you could upload your XML too, the PHP then parses the XML, Assigns each designated "Value" with a name, and value of its own, storing that into a database table temporarily until the user selects their joystick (which would then show a base image map.) Then it would run another PHP script that Overlays text onto the base image, basically the script would call from the table, the column, and it value, then insert that at preassigned coordinates based on the Image selected.

However, Because of how Star Citizen/CIG Formated this XML, simpleXML doesnt cut it when it comes to trying to parse it properly, and im having problems finding a simple way to do this. So Below in the spoiler i've added my XML file, my current PHP code for parsing, and a link to my demo page to show whats happening when trying to use simplePHP.

What I am looking for: I need ideas/example code/reference links on how i could do this, or how i could come up with a Windows Application that not only can take that XML and Simplify it, but also then do what i was going to do with the webapp (yes its possible, i looked up some example codes of writing text to an image from a program, just nothing designed how i would use it yet (open market? ;) ).

So anyone with experience that might be able to help me come up with ideas on how to solve my issue please dont hesitate to let me know.


Code:
<ActionMaps version="1" optionsVersion="2" rebindVersion="2" profileName="test_export">
<CustomisationUIHeader label="test_export" description="" image="">
  <devices>
   <keyboard instance="1"/>
   <mouse instance="1"/>
   <joystick instance="1"/>
   <joystick instance="2"/>
  </devices>
  <categories>
   <category label="@ui_CCSpaceFlight"/>
  </categories>
</CustomisationUIHeader>
<deviceoptions name="Joystick - HOTAS Warthog">
  <option input="x" deadzone="0.015"/>
  <option input="y" deadzone="0.015"/>
</deviceoptions>
<options type="keyboard" instance="1"/>
<options type="joystick" instance="1"/>
<options type="joystick" instance="2"/>
<modifiers />
<actionmap name="spaceship_general">
  <action name="v_self_destruct">
   <rebind input="js2_button22" multiTap="2"/>
  </action>
  <action name="v_exit">
   <rebind input="js2_button23"/>
  </action>
  <action name="v_eject">
   <rebind input="js1_button19"/>
  </action>
  <action name="v_toggle_cabin_lights">
   <rebind input="js1_button3"/>
  </action>
</actionmap>
<actionmap name="spaceship_view">
  <action name="v_view_cycle_fwd">
   <rebind input="js2_button15"/>
  </action>
</actionmap>
<actionmap name="spaceship_movement">
  <action name="v_decoupled_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_decoupled_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_decoupled_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_decoupled_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_decoupled_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_decoupled_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_ifcs_toggle_comstab">
   <rebind input="js2_button11"/>
  </action>
  <action name="v_ifcs_toggle_gforce_safety">
   <rebind input="js2_button12"/>
  </action>
  <action name="v_ifcs_toggle_vector_decoupling">
   <rebind input="js2_button9"/>
  </action>
  <action name="v_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_toggle_landing_system">
   <rebind input="js2_button16"/>
  </action>
  <action name="v_cycle_landing_mode">
   <rebind input="js2_button26"/>
  </action>
  <action name="v_landing_target_lock">
   <rebind input="js2_button21"/>
  </action>
  <action name="v_toggle_qdrive_system">
   <rebind input="js2_button24"/>
  </action>
  <action name="v_toggle_qdrive_engagement">
   <rebind input="js2_button25"/>
  </action>
  <action name="v_decoupled_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_decoupled_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_afterburner">
   <rebind input="js2_button2"/>
  </action>
  <action name="v_decoupled_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_ifcs_mode_shift">
   <rebind input="js2_button32"/>
  </action>
  <action name="v_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_target_match_vel">
   <rebind input="js2_button7"/>
  </action>
  <action name="v_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_throttle_abs">
   <rebind input="js2_z"/>
  </action>
</actionmap>
<actionmap name="spaceship_targeting">
  <action name="v_toggle_weapon_gimbal_lock">
   <rebind input="js2_button13"/>
  </action>
  <action name="v_target_reticle_focus">
   <rebind input="js1_ "/>
  </action>
  <action name="v_target_cycle_all_fwd">
   <rebind input="js2_hat1_down"/>
  </action>
  <action name="v_target_cycle_friendly_fwd">
   <rebind input="js2_hat1_up"/>
  </action>
  <action name="v_target_head_tracking">
   <rebind input="js1_button9"/>
  </action>
  <action name="v_target_nearest_hostile">
   <rebind input="js1_button5"/>
  </action>
  <action name="v_target_cycle_hostile_fwd">
   <rebind input="js2_hat1_left"/>
  </action>
  <action name="v_target_missile_lock_focused">
   <rebind input="js1_button2"/>
  </action>
  <action name="v_target_cycle_pinned_fwd">
   <rebind input="js2_hat1_right"/>
  </action>
  <action name="v_target_toggle_pinned_focused">
   <rebind input="js2_button14"/>
  </action>
  <action name="v_aim_pitch_down">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_pitch_up">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_right">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_left">
   <rebind input="js1_ "/>
  </action>
</actionmap>
<actionmap name="spaceship_weapons">
  <action name="v_attack1_group2">
   <rebind input="js1_button6"/>
  </action>
</actionmap>
<actionmap name="spaceship_missiles">
  <action name="v_weapon_launch_missile">
   <rebind input="js1_button2"/>
  </action>
</actionmap>
<actionmap name="spaceship_defensive">
  <action name="v_weapon_cycle_countermeasure_fwd">
   <rebind input="js1_button17"/>
  </action>
  <action name="v_weapon_launch_countermeasure">
   <rebind input="js1_button15"/>
  </action>
</actionmap>
</ActionMaps>

Code:
<html>
<body>

<?php if ($_SERVER['REQUEST_METHOD'] == 'GET') { ?>

        <form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>"
        enctype="multipart/form-data">
        <input type="file" name="doc"/>
        <input type="submit" value="Send File"/>
        </form>

<?php } else {
                if (isset($_FILES['doc']) && ($_FILES['doc']['error'] == UPLOAD_ERR_OK)) {
                    $xml = simplexml_load_file($_FILES['doc']['tmp_name']);
                    foreach($xml->children() as $actions) {
                    echo $actions->action[0]['name'] . ", ";
                    echo $actions->action[1]['name'] . ", <br>";
                    echo $actions->action[2]['name'] . ", ";
                    }
                } else {
                        print "No valid file uploaded.";
                }
        }
?>

</body>
</html>

Test Weblink:
http://ripcord-test_squadron.site88.net/xml_parse_test.php

Note: Right now, you can just hit "Send File" i have my XML uploaded for testing and example purposes.
 

Blind Owl

Hallucinogenic Owl
Donor
Nov 27, 2015
20,938
74,084
3,160
RSI Handle
BlindOwl
Alright, so Im throwing this up because that darn @Blind Owl brought up an something, and it gave me an idea of something for people that may want a printable Control Map for their stick/throttle, but either are too lazy, or dont own, or dont have the skills, or being TESTies, too drunk.

I've got a rough idea of what i need/want to do. So here goes the explanation.

The Star Citizen Controls are saved in an encrypted file, unless you export them from the in-game option menu. From there they are exported to an XML File. However, the structure of this file is complex, and it doesnt want to cooperate properly with simpleXML for PHP.

My Initial idea was to create a webpage that you could upload your XML too, the PHP then parses the XML, Assigns each designated "Value" with a name, and value of its own, storing that into a database table temporarily until the user selects their joystick (which would then show a base image map.) Then it would run another PHP script that Overlays text onto the base image, basically the script would call from the table, the column, and it value, then insert that at preassigned coordinates based on the Image selected.

However, Because of how Star Citizen/CIG Formated this XML, simpleXML doesnt cut it when it comes to trying to parse it properly, and im having problems finding a simple way to do this. So Below in the spoiler i've added my XML file, my current PHP code for parsing, and a link to my demo page to show whats happening when trying to use simplePHP.

What I am looking for: I need ideas/example code/reference links on how i could do this, or how i could come up with a Windows Application that not only can take that XML and Simplify it, but also then do what i was going to do with the webapp (yes its possible, i looked up some example codes of writing text to an image from a program, just nothing designed how i would use it yet (open market? ;) ).

So anyone with experience that might be able to help me come up with ideas on how to solve my issue please dont hesitate to let me know.


Code:
<ActionMaps version="1" optionsVersion="2" rebindVersion="2" profileName="test_export">
<CustomisationUIHeader label="test_export" description="" image="">
  <devices>
   <keyboard instance="1"/>
   <mouse instance="1"/>
   <joystick instance="1"/>
   <joystick instance="2"/>
  </devices>
  <categories>
   <category label="@ui_CCSpaceFlight"/>
  </categories>
</CustomisationUIHeader>
<deviceoptions name="Joystick - HOTAS Warthog">
  <option input="x" deadzone="0.015"/>
  <option input="y" deadzone="0.015"/>
</deviceoptions>
<options type="keyboard" instance="1"/>
<options type="joystick" instance="1"/>
<options type="joystick" instance="2"/>
<modifiers />
<actionmap name="spaceship_general">
  <action name="v_self_destruct">
   <rebind input="js2_button22" multiTap="2"/>
  </action>
  <action name="v_exit">
   <rebind input="js2_button23"/>
  </action>
  <action name="v_eject">
   <rebind input="js1_button19"/>
  </action>
  <action name="v_toggle_cabin_lights">
   <rebind input="js1_button3"/>
  </action>
</actionmap>
<actionmap name="spaceship_view">
  <action name="v_view_cycle_fwd">
   <rebind input="js2_button15"/>
  </action>
</actionmap>
<actionmap name="spaceship_movement">
  <action name="v_decoupled_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_decoupled_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_decoupled_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_decoupled_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_decoupled_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_decoupled_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_ifcs_toggle_comstab">
   <rebind input="js2_button11"/>
  </action>
  <action name="v_ifcs_toggle_gforce_safety">
   <rebind input="js2_button12"/>
  </action>
  <action name="v_ifcs_toggle_vector_decoupling">
   <rebind input="js2_button9"/>
  </action>
  <action name="v_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_toggle_landing_system">
   <rebind input="js2_button16"/>
  </action>
  <action name="v_cycle_landing_mode">
   <rebind input="js2_button26"/>
  </action>
  <action name="v_landing_target_lock">
   <rebind input="js2_button21"/>
  </action>
  <action name="v_toggle_qdrive_system">
   <rebind input="js2_button24"/>
  </action>
  <action name="v_toggle_qdrive_engagement">
   <rebind input="js2_button25"/>
  </action>
  <action name="v_decoupled_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_decoupled_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_afterburner">
   <rebind input="js2_button2"/>
  </action>
  <action name="v_decoupled_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_ifcs_mode_shift">
   <rebind input="js2_button32"/>
  </action>
  <action name="v_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_target_match_vel">
   <rebind input="js2_button7"/>
  </action>
  <action name="v_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_throttle_abs">
   <rebind input="js2_z"/>
  </action>
</actionmap>
<actionmap name="spaceship_targeting">
  <action name="v_toggle_weapon_gimbal_lock">
   <rebind input="js2_button13"/>
  </action>
  <action name="v_target_reticle_focus">
   <rebind input="js1_ "/>
  </action>
  <action name="v_target_cycle_all_fwd">
   <rebind input="js2_hat1_down"/>
  </action>
  <action name="v_target_cycle_friendly_fwd">
   <rebind input="js2_hat1_up"/>
  </action>
  <action name="v_target_head_tracking">
   <rebind input="js1_button9"/>
  </action>
  <action name="v_target_nearest_hostile">
   <rebind input="js1_button5"/>
  </action>
  <action name="v_target_cycle_hostile_fwd">
   <rebind input="js2_hat1_left"/>
  </action>
  <action name="v_target_missile_lock_focused">
   <rebind input="js1_button2"/>
  </action>
  <action name="v_target_cycle_pinned_fwd">
   <rebind input="js2_hat1_right"/>
  </action>
  <action name="v_target_toggle_pinned_focused">
   <rebind input="js2_button14"/>
  </action>
  <action name="v_aim_pitch_down">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_pitch_up">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_right">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_left">
   <rebind input="js1_ "/>
  </action>
</actionmap>
<actionmap name="spaceship_weapons">
  <action name="v_attack1_group2">
   <rebind input="js1_button6"/>
  </action>
</actionmap>
<actionmap name="spaceship_missiles">
  <action name="v_weapon_launch_missile">
   <rebind input="js1_button2"/>
  </action>
</actionmap>
<actionmap name="spaceship_defensive">
  <action name="v_weapon_cycle_countermeasure_fwd">
   <rebind input="js1_button17"/>
  </action>
  <action name="v_weapon_launch_countermeasure">
   <rebind input="js1_button15"/>
  </action>
</actionmap>
</ActionMaps>

Code:
<html>
<body>

<?php if ($_SERVER['REQUEST_METHOD'] == 'GET') { ?>

        <form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>"
        enctype="multipart/form-data">
        <input type="file" name="doc"/>
        <input type="submit" value="Send File"/>
        </form>

<?php } else {
                if (isset($_FILES['doc']) && ($_FILES['doc']['error'] == UPLOAD_ERR_OK)) {
                    $xml = simplexml_load_file($_FILES['doc']['tmp_name']);
                    foreach($xml->children() as $actions) {
                    echo $actions->action[0]['name'] . ", ";
                    echo $actions->action[1]['name'] . ", <br>";
                    echo $actions->action[2]['name'] . ", ";
                    }
                } else {
                        print "No valid file uploaded.";
                }
        }
?>

</body>
</html>

Test Weblink:
http://ripcord-test_squadron.site88.net/xml_parse_test.php

Note: Right now, you can just hit "Send File" i have my XML uploaded for testing and example purposes.
Thanks for doing this. I highly approve. I wish I spoke Russian/French/ancient Greek, because that's what a majority of this post looks like to me. Ha.
So thank you. Very much.
 
  • Like
Reactions: marcsand2

Ripcord33

Grand Admiral
May 2, 2016
217
668
1,210
RSI Handle
Ripcord03
I'm working on it, still searching the web for the simplest way to go about it, but from what im finding, even though this is all theoretically possible, its going to take a ton of work, and while of me brushing back up on my coding skills, been about 2 years since i've done anything website wise, and about 5 since i've done any programming lol
 

Blind Owl

Hallucinogenic Owl
Donor
Nov 27, 2015
20,938
74,084
3,160
RSI Handle
BlindOwl
I'm working on it, still searching the web for the simplest way to go about it, but from what im finding, even though this is all theoretically possible, its going to take a ton of work, and while of me brushing back up on my coding skills, been about 2 years since i've done anything website wise, and about 5 since i've done any programming lol
Either way, whether you're successful or you TEST it, I commend you on your efforts.

It's been never years since I did either website or programming. ;)
 

Murderer

Space Marshal
Jun 28, 2014
648
1,575
1,520
RSI Handle
Murderer
i am one of the lazy ones. If anyone would like to upload control schemes and implementation I would be happier to learn something than adopt my own doctrine,
 

Ripcord33

Grand Admiral
May 2, 2016
217
668
1,210
RSI Handle
Ripcord03
A little update and bump for @Blind Owl:

Gave up on the PHP Web app for now, its been too long, and it requires a lot of research as i cant find any record of what im attempting to do ever being done. Each individual thing has been done (eg reading an XML and extracting specific parts, and writing text to an image) but to complicate things, CIG's exportable Control XML is nothing but nodes and attributes, making it hard for me to work with in PHP (Been almost 6 years since i touched PHP).

So i've moved on to a Windows Form Application using C# and its going alot better, and the documentation for the systems that i need to use is A. easier to find, and B. easier to understand.

Laymans tl;dr; I gave up on option 1 and switched to option 2.

Brief overview/checklist of what i have and what i need:

  • Base Application - Check
  • Ability to have user load personal XML - Check
  • Can Open and Read the XML - Check
  • Automatically Searches through the XML for the required keybinds - In-Progress
  • As it finds the keybinds, store them to individual variables to be accessed later. - To Do
  • User can select what joystick setup they have - To Do
  • Once user selects joystick, application loads control template image as the base image along with the variables containing the coordinates for the text to be written to the image - To Do
  • Writes text to the image using the stored values from the xml. - To Do


controlmapapp.png
 

marcsand2

Space Marshal
Staff member
Officer
Donor
Mar 15, 2016
7,007
22,018
3,025
RSI Handle
marcsand2
If you are using the SC exported xml, then the parser won't be the problem. Every modified mapping has an unique actionmap+action identifier. This can be mapped directly to an image of the HOTAS with text fields for every button. The big problem is: only modified mapping are in the SC exported xml. No default mappings. You must find a complete xml of all actionmap+action. Things you like as they are supplied by SC must also be mapped.
Next thing would be getting all mappings in an image. Best would be to use a layered image, where you can put the image of controller on the background and put mappings on the foreground.
 

Blind Owl

Hallucinogenic Owl
Donor
Nov 27, 2015
20,938
74,084
3,160
RSI Handle
BlindOwl
A little update and bump for @Blind Owl:

Gave up on the PHP Web app for now, its been too long, and it requires a lot of research as i cant find any record of what im attempting to do ever being done. Each individual thing has been done (eg reading an XML and extracting specific parts, and writing text to an image) but to complicate things, CIG's exportable Control XML is nothing but nodes and attributes, making it hard for me to work with in PHP (Been almost 6 years since i touched PHP).

So i've moved on to a Windows Form Application using C# and its going alot better, and the documentation for the systems that i need to use is A. easier to find, and B. easier to understand.

Laymans tl;dr; I gave up on option 1 and switched to option 2.

Brief overview/checklist of what i have and what i need:

  • Base Application - Check
  • Ability to have user load personal XML - Check
  • Can Open and Read the XML - Check
  • Automatically Searches through the XML for the required keybinds - In-Progress
  • As it finds the keybinds, store them to individual variables to be accessed later. - To Do
  • User can select what joystick setup they have - To Do
  • Once user selects joystick, application loads control template image as the base image along with the variables containing the coordinates for the text to be written to the image - To Do
  • Writes text to the image using the stored values from the xml. - To Do


View attachment 2758
Holy crap. Good work. I commend the effort you're putting into this.
 
  • Like
Reactions: marcsand2

Maxgerber5250

Grand Admiral
Apr 2, 2015
338
933
1,350
RSI Handle
Capt-Spicer
Alright, so Im throwing this up because that darn @Blind Owl brought up an something, and it gave me an idea of something for people that may want a printable Control Map for their stick/throttle, but either are too lazy, or dont own, or dont have the skills, or being TESTies, too drunk.

I've got a rough idea of what i need/want to do. So here goes the explanation.

The Star Citizen Controls are saved in an encrypted file, unless you export them from the in-game option menu. From there they are exported to an XML File. However, the structure of this file is complex, and it doesnt want to cooperate properly with simpleXML for PHP.

My Initial idea was to create a webpage that you could upload your XML too, the PHP then parses the XML, Assigns each designated "Value" with a name, and value of its own, storing that into a database table temporarily until the user selects their joystick (which would then show a base image map.) Then it would run another PHP script that Overlays text onto the base image, basically the script would call from the table, the column, and it value, then insert that at preassigned coordinates based on the Image selected.

However, Because of how Star Citizen/CIG Formated this XML, simpleXML doesnt cut it when it comes to trying to parse it properly, and im having problems finding a simple way to do this. So Below in the spoiler i've added my XML file, my current PHP code for parsing, and a link to my demo page to show whats happening when trying to use simplePHP.

What I am looking for: I need ideas/example code/reference links on how i could do this, or how i could come up with a Windows Application that not only can take that XML and Simplify it, but also then do what i was going to do with the webapp (yes its possible, i looked up some example codes of writing text to an image from a program, just nothing designed how i would use it yet (open market? ;) ).

So anyone with experience that might be able to help me come up with ideas on how to solve my issue please dont hesitate to let me know.


Code:
<ActionMaps version="1" optionsVersion="2" rebindVersion="2" profileName="test_export">
<CustomisationUIHeader label="test_export" description="" image="">
  <devices>
   <keyboard instance="1"/>
   <mouse instance="1"/>
   <joystick instance="1"/>
   <joystick instance="2"/>
  </devices>
  <categories>
   <category label="@ui_CCSpaceFlight"/>
  </categories>
</CustomisationUIHeader>
<deviceoptions name="Joystick - HOTAS Warthog">
  <option input="x" deadzone="0.015"/>
  <option input="y" deadzone="0.015"/>
</deviceoptions>
<options type="keyboard" instance="1"/>
<options type="joystick" instance="1"/>
<options type="joystick" instance="2"/>
<modifiers />
<actionmap name="spaceship_general">
  <action name="v_self_destruct">
   <rebind input="js2_button22" multiTap="2"/>
  </action>
  <action name="v_exit">
   <rebind input="js2_button23"/>
  </action>
  <action name="v_eject">
   <rebind input="js1_button19"/>
  </action>
  <action name="v_toggle_cabin_lights">
   <rebind input="js1_button3"/>
  </action>
</actionmap>
<actionmap name="spaceship_view">
  <action name="v_view_cycle_fwd">
   <rebind input="js2_button15"/>
  </action>
</actionmap>
<actionmap name="spaceship_movement">
  <action name="v_decoupled_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_decoupled_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_decoupled_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_decoupled_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_decoupled_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_decoupled_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_ifcs_toggle_comstab">
   <rebind input="js2_button11"/>
  </action>
  <action name="v_ifcs_toggle_gforce_safety">
   <rebind input="js2_button12"/>
  </action>
  <action name="v_ifcs_toggle_vector_decoupling">
   <rebind input="js2_button9"/>
  </action>
  <action name="v_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_toggle_landing_system">
   <rebind input="js2_button16"/>
  </action>
  <action name="v_cycle_landing_mode">
   <rebind input="js2_button26"/>
  </action>
  <action name="v_landing_target_lock">
   <rebind input="js2_button21"/>
  </action>
  <action name="v_toggle_qdrive_system">
   <rebind input="js2_button24"/>
  </action>
  <action name="v_toggle_qdrive_engagement">
   <rebind input="js2_button25"/>
  </action>
  <action name="v_decoupled_roll_right">
   <rebind input="js1_button12"/>
  </action>
  <action name="v_decoupled_roll_left">
   <rebind input="js1_button14"/>
  </action>
  <action name="v_afterburner">
   <rebind input="js2_button2"/>
  </action>
  <action name="v_decoupled_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_ifcs_mode_shift">
   <rebind input="js2_button32"/>
  </action>
  <action name="v_strafe_back">
   <rebind input="js1_button13"/>
  </action>
  <action name="v_strafe_forward">
   <rebind input="js1_button11"/>
  </action>
  <action name="v_strafe_right">
   <rebind input="js1_hat1_right"/>
  </action>
  <action name="v_strafe_left">
   <rebind input="js1_hat1_left"/>
  </action>
  <action name="v_strafe_down">
   <rebind input="js1_hat1_down"/>
  </action>
  <action name="v_strafe_up">
   <rebind input="js1_hat1_up"/>
  </action>
  <action name="v_target_match_vel">
   <rebind input="js2_button7"/>
  </action>
  <action name="v_brake">
   <rebind input="js2_button1"/>
  </action>
  <action name="v_throttle_abs">
   <rebind input="js2_z"/>
  </action>
</actionmap>
<actionmap name="spaceship_targeting">
  <action name="v_toggle_weapon_gimbal_lock">
   <rebind input="js2_button13"/>
  </action>
  <action name="v_target_reticle_focus">
   <rebind input="js1_ "/>
  </action>
  <action name="v_target_cycle_all_fwd">
   <rebind input="js2_hat1_down"/>
  </action>
  <action name="v_target_cycle_friendly_fwd">
   <rebind input="js2_hat1_up"/>
  </action>
  <action name="v_target_head_tracking">
   <rebind input="js1_button9"/>
  </action>
  <action name="v_target_nearest_hostile">
   <rebind input="js1_button5"/>
  </action>
  <action name="v_target_cycle_hostile_fwd">
   <rebind input="js2_hat1_left"/>
  </action>
  <action name="v_target_missile_lock_focused">
   <rebind input="js1_button2"/>
  </action>
  <action name="v_target_cycle_pinned_fwd">
   <rebind input="js2_hat1_right"/>
  </action>
  <action name="v_target_toggle_pinned_focused">
   <rebind input="js2_button14"/>
  </action>
  <action name="v_aim_pitch_down">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_pitch_up">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_right">
   <rebind input="js1_ "/>
  </action>
  <action name="v_aim_yaw_left">
   <rebind input="js1_ "/>
  </action>
</actionmap>
<actionmap name="spaceship_weapons">
  <action name="v_attack1_group2">
   <rebind input="js1_button6"/>
  </action>
</actionmap>
<actionmap name="spaceship_missiles">
  <action name="v_weapon_launch_missile">
   <rebind input="js1_button2"/>
  </action>
</actionmap>
<actionmap name="spaceship_defensive">
  <action name="v_weapon_cycle_countermeasure_fwd">
   <rebind input="js1_button17"/>
  </action>
  <action name="v_weapon_launch_countermeasure">
   <rebind input="js1_button15"/>
  </action>
</actionmap>
</ActionMaps>

Code:
<html>
<body>

<?php if ($_SERVER['REQUEST_METHOD'] == 'GET') { ?>

        <form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>"
        enctype="multipart/form-data">
        <input type="file" name="doc"/>
        <input type="submit" value="Send File"/>
        </form>

<?php } else {
                if (isset($_FILES['doc']) && ($_FILES['doc']['error'] == UPLOAD_ERR_OK)) {
                    $xml = simplexml_load_file($_FILES['doc']['tmp_name']);
                    foreach($xml->children() as $actions) {
                    echo $actions->action[0]['name'] . ", ";
                    echo $actions->action[1]['name'] . ", <br>";
                    echo $actions->action[2]['name'] . ", ";
                    }
                } else {
                        print "No valid file uploaded.";
                }
        }
?>

</body>
</html>

Test Weblink:
http://ripcord-test_squadron.site88.net/xml_parse_test.php

Note: Right now, you can just hit "Send File" i have my XML uploaded for testing and example purposes.
I`m lost. what movie did we come here to see?
 

Ripcord33

Grand Admiral
May 2, 2016
217
668
1,210
RSI Handle
Ripcord03
If you are using the SC exported xml, then the parser won't be the problem. Every modified mapping has an unique actionmap+action identifier. This can be mapped directly to an image of the HOTAS with text fields for every button. The big problem is: only modified mapping are in the SC exported xml. No default mappings. You must find a complete xml of all actionmap+action. Things you like as they are supplied by SC must also be mapped.
Next thing would be getting all mappings in an image. Best would be to use a layered image, where you can put the image of controller on the background and put mappings on the foreground.
I am aware, and when it comes to the controller from what i can tell, even when using a "preset" for the hotas warthog they all show as "modified" and therefore showup in the xml, im still doing testing on this, and have contacted CIG requesting more information on the control schema and how i would go about getting a full xml with all listings in it for testing.

Also, i already have the image generation code in place and functioning for the TM Hotas, that was simple, it calls from 2 arrays, one gives the input which is link to a coordinate set on the image using a multidimensional array, the other array will list the command names from the xml which will define text output, for testing this i simply used simple numbers linked to the text output in the array, it worked like a charm, now its just a matter of fixing my abort error my application is giving me with my Linq2XML code that im trying to use, might have to switch back to XMLReader or XMLDocument instead if i cant figure out this error
 
Forgot your password?