ACI XCIX-0001 0 Posted June 4, 2023 Afternoon ! Is there a command to find the weapon classname from the drone turret currently connect to the terminal ? As an example to find the weapon turret classname used by the current praetorian. vehicle player currentWeaponTurret [-1]; vehicle player currentWeaponTurret [0]; apparently doesen t return anything. Share this post Link to post Share on other sites
Harzach 2517 Posted June 4, 2023 UAVs (including connectable automated turrets like the Praetorian) work a little differently. _uav = getConnectedUAV player; _curWeapD = _uav currentWeaponTurret [-1]; // driver turret _curWeapG = _uav currentWeaponTurret [0]; // gunner turret hint format ["%1 | %2", _curWeapD, _curWeapG]; Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 4, 2023 Thank for your Answer ! Typing getConnectedUAV player; Returns "Eror Invalid number in expression in the Debug Console". Share this post Link to post Share on other sites
Harzach 2517 Posted June 5, 2023 Check your spelling, it works fine. Share this post Link to post Share on other sites
pierremgi 4852 Posted June 5, 2023 Yes. And, btw, some UAVs like Sentinel (B_UAV_05_F) don't have turret on driver. Check allTurrets getConnectedUAV player or simply allTurrets nameOfYourUAV Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 Thank @Harzach and @pierremgi for your answers. The spelling for "getConnectedUAV player;" is correct, still the same error. "allTurrets getConnectedUAV player;" returns [[0]] : What does it means ? Share this post Link to post Share on other sites
pierremgi 4852 Posted June 5, 2023 40 minutes ago, ACI XCIX-0001 said: Thank Harzach and pierremgi for your answers. The spelling for "getConnectedUAV player;" is correct, still the same error. "allTurrets getConnectedUAV player;" returns [[0]] : What does it means ? You have only one turret "path": [0] , usually for gunner. In this case, there is no pilot's "turret path" (weapon turret). Turret's paths are for selecting turrets on a vehicle, working with the turrets' commands. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted June 5, 2023 not something like currentMuzzle (getConnectedUAVUnit player); Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 Thank @pierremgi and @fn_Quiksilver for your answers ! So can you you suggest what do you write in the debug console when your are in the gunner praetorian gun turret to get the current turret weapon classname in use ? Share this post Link to post Share on other sites
Harzach 2517 Posted June 5, 2023 The code I provided does that. You can edit out the part that checks the driver turret. _uav = getConnectedUAV player; _curWeap = _uav currentWeaponTurret [0]; hint str _curWeap; Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 Thank for your patience @Harzach ! Nothing in the resulting returning box when the code is copied/pasted in the console. Can I provide you a screenshot. How to upload a screenshot in ATTM ? Share this post Link to post Share on other sites
Harzach 2517 Posted June 5, 2023 That's what the "hint" line is doing, close the console and you'll see it. To see the result in the debug return field, do this: _uav = getConnectedUAV player; _uav currentWeaponTurret [0]; 1 Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 Thank it Works ! Just another question.... What is the difference between "cursorobject;" and "cursorObject call BIS_fnc_objectVar;" because "cursorobject "returns "B Alpha 1-4:1" and once you applied "cursorObject call BIS_fnc_objectVar;" it returns "bis_o2" and afterwards it will now always return "bis_o2" if you reenter "cursorobject", what is happening here ? Do you give it a variable name when you apply "cursorObject call BIS_fnc_objectVar;" and what is "B Alpha 1-4:1", is it a variable of the object. Also what is "1cbca0080# 1675186: usaf_ac130u.p3d" What independently these 3 strings represents : 1cbca0080# | 1675186 | usaf_ac130u.p3d ? Share this post Link to post Share on other sites
Harzach 2517 Posted June 5, 2023 13 minutes ago, ACI XCIX-0001 said: Thank it Works ! You're welcome, it worked yesterday, too! 13 minutes ago, ACI XCIX-0001 said: Do you give it a variable name when you apply "cursorObject call BIS_fnc_objectVar Yes. 13 minutes ago, ACI XCIX-0001 said: what is "B Alpha 1-4:1" SIDE - GROUPID - UNITGROUPID B Alpha 1-4:1 BLUFOR Alpha 1-4 1 (leader) 13 minutes ago, ACI XCIX-0001 said: What independently these 3 strings represents : 1cbca0080# | 1675186 | usaf_ac130u.p3d ? the last bit is the object's .p3d filename - the actual 3D model. Not sure about the rest. 1 Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 21 hours ago, Harzach said: SIDE - GROUPID - UNITGROUPID B Alpha 1-4:1 BLUFOR Alpha 1-4 1 (leader) So you can by the way call the object in any function with this "B Alpha 1-4:1" ? Is it considered as a variable ? Is it better to apply a new variable with "cursorObject call BIS_fnc_objectVar;" and use "bis_o2" ? What is the difference between "B Alpha 1-4:1" and "bis_o2" ? Also does "currentWeaponTurret [0];" goes in the splendid config viewer to get these informations ? Is there a way to do a Ctrl + F in the Splendid Config viewer ? [object, varNameRoot] call BIS_fnc_objectVar is the syntax so is varNameRoot the custom variable name that you can give ? "[cursorObject, plane1] call BIS_fnc_objectVar;" give the same default generated name ""bis_o3"" for instance. Thank you again ! Share this post Link to post Share on other sites
Harzach 2517 Posted June 5, 2023 1 hour ago, ACI XCIX-0001 said: Is it considered as a variable No, it's a groupID. 1 hour ago, ACI XCIX-0001 said: What is the difference between "B Alpha 1-4:1" and "bis_o2" First is groupID, second is variable name. 1 hour ago, ACI XCIX-0001 said: does "currentWeaponTurret [0];" goes in the splendid config viewer to get these informations ? Is there a way to do a Ctrl + F in the Splendid Config viewer ? No and no. However: place object in editor right-click object select "Find in Config Viewer" drill down through config from there Or if you know what you are looking for, just open the relevant configFile and find it directly. For example, to find the Praetorian's weapon, open it in config viewer, then drill down to the "weapons" entry: Quote configfile >> "CfgVehicles" >> "B_AAA_System_01_F" >> "Turrets" >> "MainTurret" >> "weapons" where you will find: Quote weapons[] = {"weapon_Cannon_Phalanx"}; 1 hour ago, ACI XCIX-0001 said: so is varNameRoot the custom variable name that you can give ? Yes. 1 hour ago, ACI XCIX-0001 said: "[cursorObject, plane1] call BIS_fnc_objectVar;" give the same default generated name ""bis_o3"" for instance. Well, no. If your object is named "plane1", BIS_fnc_objectVar will return "plane1." If your object does not have a varName, BIS_fnc_objectVar will create one. By default, the root of that varName is "bis_o" and each new varName is incremented up from "1," so "bis_o1," "bis_o2," "bis_o3," etc. You can customize this varName using the full syntax: [cursorObject, "plane_"] call BIS_fnc_objectVar;" This will return "plane_1." 1 Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 5, 2023 Thank you for such a detailled answer and your commitment. Trying to understand something in your last answer. Ok it works ! But only the 1st time you name via the function, the var name will be attributed but you cannot rename it after that ? Can you change the var name of an already named object by the "BIS_fnc_objectVar" ? Also for ITC Land Mod Turret it Gives "weapons[] = {"FakeWeapon"};". What does it means ? Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 6, 2023 Morning ! Actually there is a strange thing with the config viewer...... Let s say you want "configfile >> "CfgVehicles" >> "B_AAA_System_01_F" >> "Turrets" >> "MainTurret" >> "weapons"". So, you Enter on "configfile >> "CfgVehicles" >> "B_AAA_System_01_F" >>" and once you get "+Turrets", youn Enter of this and , it s very surprising, it lowers you all the way down the list, making you loose your previously higlighted category toward a whole new path where there is absoluetly nothing on the right side as classes : this new path is the following : configfile >> "Turrets". So you have to scroll all the way up again and find back the category where you were towards the actual : "configfile >> "CfgVehicles" >> "B_AAA_System_01_F" >> "Turrets"". If you want to explore "MainTurret" now, the same very anoying things happens, it sends you to a path specially created for this that didnt existed previously ""configfile >> "MainTurret" and you have, and you have to scroll back all the way up again and find back the correct path wich is """configfile >> "CfgVehicles" >> "B_AAA_System_01_F" >> "Turrets" >> "MainTurret" >>"....... Does it works the same way on your side ? This is very counter productive ? Is there something to do to make the categories tree works the right way ? Maybe you need to bookmark or to copy the path each time it before Enter the category ? Also how does the "Parens" field works ? Also how do you send ATTM screenchots on the forum ? Share this post Link to post Share on other sites
Harzach 2517 Posted June 6, 2023 49 minutes ago, ACI XCIX-0001 said: Is there something to do to make the categories tree works the right way ? Not sure what you mean. You are just expanding the tree. It just reloads the page when you do. 58 minutes ago, ACI XCIX-0001 said: Also how does the "Parens" field works ? It displays the parent classes of the currently selected class: Each class inherits properties from the class above it, hence "parent." 1 hour ago, ACI XCIX-0001 said: Also how do you send ATTM screenchots on the forum ? I don't know what ATTM is, but you can share links to your Steam screenshots. Otherwise, you need to upload them to a third-party image hosting site and then share from there. Paste a direct image link here: Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 6, 2023 Thank for your answer. 1 hour ago, Harzach said: Not sure what you mean. You are just expanding the tree. It just reloads the page when you do. Asking this because it doesen t worked like a supposed tree should work. Comming to a point in the path where it jumps all the way down with an empty category and sometimes it works. Very strange behavior. 1 hour ago, Harzach said: Each class inherits properties from the class above it, hence "parent." Above it ? Where ? Screenshot Link For instance for "configfile >> "CfgWeapons" >> "RHS_weap_gau8" >> "magazines"", there isn t "["Gatling_30mm_Plane_CAS_01_F","CannonCore","Default"]" either ""Gatling_30mm_Plane_CAS_01_F"" or ""CannonCore"" in the tree above it ? Also what is "Default" ? 1 hour ago, Harzach said: I don't know what ATTM is, but you can share links to your Steam screenshots. Otherwise, you need to upload them to a third-party image hosting site and then share from there. Paste a direct image link here: ATTM is the short for Attachement. OK ! So you can upload attachment on your prifile, these are preview of embeded links towards files in the cloud like OneDrive or online images on the forum. Insert into post and it gives a red field where nothing is uploaded. Red Field Share this post Link to post Share on other sites
Harzach 2517 Posted June 6, 2023 44 minutes ago, ACI XCIX-0001 said: Above it ? Where ? In the parents field, "up" is to the right. So in my screenshot above, you can see that "All" is the highest-level parent class. These parent classes are not necessarily up one level in the config tree, however. The structure of the config tree and the structure of parent/inheritance are not the same. They are two different things. 44 minutes ago, ACI XCIX-0001 said: Insert into post and it gives a red field where nothing is uploaded. You can only insert a direct image link. OneDrive/GDrive/etc. will not work. An image host like Imgur/Lensdump/etc. is required. Or, you can just paste the link as you did for your "Red Field" image. 1 Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 6, 2023 Thank ! 1 hour ago, Harzach said: The structure of the config tree and the structure of parent/inheritance are not the same. They are two different things. And is there any way to get an inheritance structure as a tree or you need to check on each classes and determine it individually ? 1 hour ago, Harzach said: You can only insert a direct image link. OneDrive/GDrive/etc. will not work. An image host like Imgur/Lensdump/etc. is required. Or, you can just paste the link as you did for your "Red Field" image. Ok Got It. Also why is there the same class in CfgVehicles and CfgWeapons and Why are there Weapons in CfgVehicles sometimes ? Why are there things that are unsorted and disordered like that ? Is there a way to duplicate a class and edit a specific attribute or a command just for the current game session ? Is there a way to find the Camera Modes on the specific turret and to add Black and Whit or Green and Black Thermal for Instance ? Share this post Link to post Share on other sites
Harzach 2517 Posted June 6, 2023 1 hour ago, ACI XCIX-0001 said: is there any way to get an inheritance structure as a tree Not that I'm aware of, no. See signature. 1 hour ago, ACI XCIX-0001 said: Why are there things that are unsorted and disordered like that ? We can only assume that everything is where BI wants it to be. 1 hour ago, ACI XCIX-0001 said: Is there a way to duplicate a class and edit a specific attribute or a command just for the current game session ? You would need to make a mod. You can't edit a config via scripting. 1 hour ago, ACI XCIX-0001 said: Is there a way to find the Camera Modes on the specific turret Via scripting, (and we are at the limit of my proficiency working with configs) you can use getArray, but you need the full path: _array = getArray (configfile >> "CfgVehicles" >> "AAA_System_01_base_F" >> "Turrets" >> "MainTurret" >> "OpticsIn" >> "Medium" >> "visionMode"); hint str _array; There may be an easier, more dynamic way to get that array from any given vehicle, but I don't know how. Via the config viewer, you can drill down to the visionMode array in a turret's OpticsIn property: configfile >> "CfgVehicles" >> "AAA_System_01_base_F" >> "Turrets" >> "MainTurret" >> "OpticsIn" 2 hours ago, ACI XCIX-0001 said: and to add Black and Whit or Green and Black Thermal for Instance ? As above, this would require a mod to edit the config. 1 1 Share this post Link to post Share on other sites
ACI XCIX-0001 0 Posted June 6, 2023 45 minutes ago, Harzach said: (and we are at the limit of my proficiency working with configs) It s already very informative ! Thank you for all this answer and support and your comitment on this thread ! Got it ! Do you how to determine if the "Ti" for Thermal is relative to Black White or Green and Black ? OK got it from another thread. Apparently it s the thermalMode[] = {0,1};TeRp_[OA] New config values, who has info about? On 7/8/2010 at 1:15 PM, TeRp said: thermalMode defines which thermal vision modes can be used. There are at least 6, though I haven't tried all of them yet. 0: Black and White, White = Hot 1: Black and White, Black = Hot 2: Green and White, White = Hot 3: Green and Black, Black = Hot 4: Red 5: Red Example: If you want your tank to have Black and White with White = Hot and Green and White with White being hot, you'd use: thermalMode[]={0,2}. Share this post Link to post Share on other sites
pierremgi 4852 Posted June 7, 2023 See also: setCamUseTI currentVisionMode And the useful: Event_Handler VisionModeChanged 1 Share this post Link to post Share on other sites