Mistermann Posted September 18, 2024 Posted September 18, 2024 Congratulations @WirtsLegs! 1 System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 35 Into The Jungle (MP Mission) F18: Scorpion's Sting Apache Campaign - Griffins Kiowa Campaign - Assassins
WirtsLegs Posted November 5, 2024 Author Posted November 5, 2024 Alright update on this, I have incorporated @jumphigh's proposed changes, thanks again jump! and have moved WIrtsTools to a new home on github instead of gitlab, new link is edited into the original post, or just visit https://github.com/WirtsLegs/WirtsTools/ 1 1
WirtsLegs Posted January 23 Author Posted January 23 (edited) WirtsTools 2.2.0 is out Finally You can get the full docs on the readme there BUT in short it... Adds the following features: Weapon In Zone: Sets a flag equal to a count of the weapons currently in a zone that match your criteria (works for quad point and circular zones) Weapon Near: Sets a flag equal to a count of the weapons currently within a defined range of a given target that meet your criteria Weapon Hit: Increments a flag each time a weapon that meets your criteria hits a given unit (def read the docs on this one, there are some gotchas) Weapon system overhaul: Massive change to how existing functions Impact In Zone and Impact Near work, they and the above all use my new weapon filter system that lets you simply define criteria for weapons you want to match as a filter to pass to these functions You can do things like match on weapons that are missiles, are NOT IR guided and have a shaped warhead, and so on, full details in the readme Enjoy! Edited January 23 by WirtsLegs 2
Rudel_chw Posted January 23 Posted January 23 10 minutes ago, WirtsLegs said: full details in the readme thanks a lot for maintaining this script current, I will test the new functions on a rocket training mission that I’m editing for the mig-21 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Mistermann Posted January 23 Posted January 23 Awesome news, Wirt! Thank you. 1 System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 35 Into The Jungle (MP Mission) F18: Scorpion's Sting Apache Campaign - Griffins Kiowa Campaign - Assassins
Rudel_chw Posted January 29 Posted January 29 On 1/23/2025 at 2:22 PM, WirtsLegs said: Weapon Near: Sets a flag equal to a count of the weapons currently within a defined range of a given target that meet your criteria Hi @WirtsLegs .. I have not been able to have this function work for me, can you please clarify for me if it is able to detect rockets? or just missiles and bombs? I load the tools like this: then I define a filter like this: But when firing the rockets I get a value 0: This is a video of my test .. where I write on the screen the value of the rocketsNear flag: Hopefully you can spot what I'm doing wrong here Eduardo For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
WirtsLegs Posted January 29 Author Posted January 29 3 hours ago, Rudel_chw said: Hi @WirtsLegs .. I have not been able to have this function work for me, can you please clarify for me if it is able to detect rockets? or just missiles and bombs? Hey Eduardo, The error is here you have myFilters.rockets_S5M:addTerm("Name",Weapon.Name,"S-5M") the addTerm() function takes 3 arguments field: what field do you want the term to match on, in this case you picked "Name" so no issues here term: this is the value you expect in the field to have, you put Weapon.Name, what you should put is the actual typename of the weapon like "S-5M" match: This is meant to be a boolean value, so true or false, if true the filter will match when the term is matched, if false you are setting it to say i explicitly DONT want this value So all together you should try: myFilters.rockets_S5M:addTerm("Name","S-5M",true) That should work IF "S-5M" is the actual typename of the weapon note that the typename is rarely the same as what you see in the loadout editor, if you want to check the typename an easy way is to use the debug function i include, to do so run WT.weapon.Debug() after loading WirtsTools and otherwise setup your filter and instance as normal then ingame when you fire that rocket a whole bunch of info will appear on your screen, one of the lines will be the typename just have to copy that name and use it to define your filter Finally another option could be to simply match on all rockets fired by your coalition if making sure its that specific rocket type isn't important you would do that like this: myFilters={} myFilters.rockets=WT.weapon.newFilter() myFilters.rockets:addTerm("Category",Weapon.Category.ROCKET,true) myFilters.rockets:addTerm("Coalition",coalition.side.BLUE,true) --obviously change this if you are flying as redfor Let me know if you need any more help!
Rudel_chw Posted January 29 Posted January 29 21 minutes ago, WirtsLegs said: So all together you should try: myFilters.rockets_S5M:addTerm("Name","S-5M",true) That should work IF "S-5M" is the actual typename of the weapon Thank you so much for the help .. will try it out tonight, as well as the debug tip ... will let you know how it went Cheers, eduardo For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Rudel_chw Posted January 30 Posted January 30 23 hours ago, WirtsLegs said: So all together you should try: myFilters.rockets_S5M:addTerm("Name","S-5M",true) That should work IF "S-5M" is the actual typename of the weapon Hello, I tried it, but for some reason it didn't count the rockets, on this next screengrab, the "Rockets fired" line displays the current value of the flag (rocketsNear), and it is at 0 in spite of having fired 32 rockets I will now edit a simpler test mission (the one I'm using as testbed is the actual mission where I need to count how many rockets I've fired, since the MiG-21 does not have any in-cockpit display with the remaining rocket quantity still available) .. hopefully I will find my error, but in any case a simpler mission set at Caucasus will allow me to share it here if I'm still having trouble best regards Eduardo For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Rudel_chw Posted January 31 Posted January 31 16 hours ago, Rudel_chw said: I tried it, but for some reason it didn't count the rockets, Hello, I found it was an error of mine, I ended up using this sentences: Defining the Weapon Filter: myFilters={} myFilters.rockets_S5M = WT.weapon.newFilter() myFilters.rockets_S5M:addTerm("Name","S-5M",true) To detect the rockets near my aircraft: WT.weapon.near("MyAircraft",myFilters.rockets_S5M,1200,"RocketsNear") I use the RocketsNear value to update a counter of how many rockets I've fired so far ... I will use this to have my triggers detect the moment I run out of Rockets. Below is my test mission. Thanks a lot for all your help and for sharing these tools. Eduardo Test Weapon Near.miz For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
WirtsLegs Posted February 7 Author Posted February 7 On 1/31/2025 at 8:15 AM, Rudel_chw said: Hello, I found it was an error of mine, I ended up using this sentences: Defining the Weapon Filter: myFilters={} myFilters.rockets_S5M = WT.weapon.newFilter() myFilters.rockets_S5M:addTerm("Name","S-5M",true) To detect the rockets near my aircraft: WT.weapon.near("MyAircraft",myFilters.rockets_S5M,1200,"RocketsNear") I use the RocketsNear value to update a counter of how many rockets I've fired so far ... I will use this to have my triggers detect the moment I run out of Rockets. Below is my test mission. Thanks a lot for all your help and for sharing these tools. Eduardo Test Weapon Near.miz 26.33 kB · 0 downloads All you are aiming to do is count how many are fired in total? If you want I can easily add a quick function for that which will do that for you Note that weaponNear will only count the amount nearby in total at any given time, if say you fire 5 then 10 min later 5 more the flag will at most have a value of 5
Rudel_chw Posted February 8 Posted February 8 (edited) 26 minutes ago, WirtsLegs said: All you are aiming to do is count how many are fired in total? Hi, Yes, I was editing a training mission for the MiG-21 and wanted to detect the moment where all rockets are expended. The MiG-21 has no parameter nor indicator that could provide this information, so your Script came in handy for this. 26 minutes ago, WirtsLegs said: If you want I can easily add a quick function for that which will do that for you Thanks a lot for the very kind offer, but it is not really necessary .. the current script handled this nicely. The sentences I used are these: 26 minutes ago, WirtsLegs said: Note that weaponNear will only count the amount nearby in total at any given time, if say you fire 5 then 10 min later 5 more the flag will at most have a value of 5 That's what I believed too, and was prepared to add the rockets fired on each attack pass myself, but in practice I found that the Flag is not reset by the script and so it actually accumulates all rockets that match the filter irrespective of the firing moment. Here you can see on each attack pass how the flag (that I display on a message) goes from 32, to 64 and to 96 rockets, with me never having to worry about adding the values myself: Thanks a lot for the very useful Script, I'm sure i will be using it on a lot of my future missions Eduardo Edited February 8 by Rudel_chw fixed typos For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
WirtsLegs Posted February 8 Author Posted February 8 15 minutes ago, Rudel_chw said: Here you can see on each attack pass how the flag (that I display on a message) goes from 32, to 64 and to 96 rockets, with me never having to worry about adding the values myself: I'll look into this If it is indeed not resetting to 0 as the amount of rockets near the unit in question reaches 0 then you have found a bug as hat is not how it's meant to work If there is a bug I'll add a simple shot count feature as well to replace this function for you
Rudel_chw Posted February 8 Posted February 8 15 minutes ago, WirtsLegs said: I'll look into this If it is indeed not resetting to 0 as the amount of rockets near the unit in question reaches 0 then you have found a bug as hat is not how it's meant to work If there is a bug I'll add a simple shot count feature as well to replace this function for you I understand, thanks a lot for looking into this For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
WirtsLegs Posted February 10 Author Posted February 10 Update on this, bug found affecting weapon near and in zone functions, basically if the weapons are destroyed while still satisfying the conditions then they won't be removed from the count I have put together a fix and added a simple shot detection feature that will be pushed once I have a chance to properly test it, hopefully tonight but we will see 1
Rudel_chw Posted February 10 Posted February 10 21 minutes ago, WirtsLegs said: ... basically if the weapons are destroyed while still satisfying the conditions then they won't be removed from the count That was my use-case .. I counted the rockets fired around my aircraft to a range of 1,500 meters, so all of them hit the target while still being within that range For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
WirtsLegs Posted February 14 Author Posted February 14 (edited) Update pushed https://github.com/WirtsLegs/WirtsTools/releases/tag/v2.2.1 fixed bugs in Weapon Near and Weapon in Zone, added Weapon Shot feature @Rudel_chw the weapon shot feature should do what you wanted and be more performant/reliable than relying on the old bugged weapon near Edited February 14 by WirtsLegs 1
Rudel_chw Posted February 14 Posted February 14 1 hour ago, WirtsLegs said: Update pushed https://github.com/WirtsLegs/WirtsTools/releases/tag/v2.2.1 fixed bugs in Weapon Near and Weapon in Zone, added Weapon Shot feature @Rudel_chw the weapon shot feature should do what you wanted and be more performant/reliable than relying on the old bugged weapon near Thank you, I will test it tonight and then let you know how it went 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Recommended Posts