Jump to content

Glloq

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Glloq

  1. Hello everyone, I'm trying to call missionCommands.addCommandForGroup for a function linked to a class I have created but without success CoalitionMissionManager = { --Some stuff here } CoalitionMissionManager.__index = CoalitionMissionManager function CoalitionMissionManager:new() local newTable = { } -- Create a new table and set the metatable setmetatable(newTable, self) return newTable end function CoalitionMissionManager:setMyMission(params) --do some stuff here with my parameters params.arg1, etc... end blueCoalitionMissionManager = CoalitionMissionManager:new() --later in the code missionCommands.addCommandForGroup(groupId, "Choose my mission", myCustomMainMenu, blueCoalitionMissionManager.setMyMission, {arg1 = 1, arg2 = 0, arg3 = aValue}) Unfortunately, i'm unable to read my parameters while the method setMyMission is called I think i mismanaged something with my instance of CoalitionMissionManager, what should I send to the addCommandForGroup ? I tried with CoalitionMissionManager.setMyMission without success too. Maybe I mismanaged with the self parameter to know which instance of CoalitionMissionManager I will use for this call I was able to call my method setMyMission when that was not a function of the CoalitionMissionManager class but I try to encapsulate that to use the method on the blue side and on the red side with two different CoalitionMissionManager. Is it possible or should I forget this idea and just stick with a function setMyMission() ? Any idea ?
  2. Thanks a lot, this works! I may have missed this in the release notes. It's been there for such a long time that I thought it was a feature not a bug ^^
  3. Hello everyone, In my mission, I used to monitor what kind of object launch an event like the event birth to do specific stuff if it is a unit, a scenery or a static object. Unfortunately since a few days (can't say if it's from the last patch or the previous one) event.initiator:getCategory() always return 0 Did something change? I guess i can still find if it's a unit, a static or a scenery by using Unit.getByName (almost same thing for static or scenery) with event.initiator:getName() if I have no other choice but I would rather find this using my event.initiator . What should I do to find my object category? Sincerely
  4. @heloguy : so I did redownload area 88 standalone mission and even if it's not easy there is a way to change units (it's mainly done by script so there is no way to change it using only the mission editor). You will have to unzip the .miz like a zip file, edit in \l10n\DEFAULT\scriptsARE88StandAlone.lua and zip again the .miz with the .miz extension instead of a zip The main methods you will have to look after: createComboyAttackers -change _groundtype and _groundtype2 ="whatever" by the unitname you want instead createComboy -change _groundtype and _groundtype2 ="whatever" by the unitname you want instead createHostileCampament -change _AAAtype , _AAAtype2, _AAAtype3 ="whatever" by the unitname you want instead for each camp type createHostilesBomberGroup -change _airtype by the unitname you want instead for each escort and bomber group and change the payload accordingly createHostilesAirGroup , createHostilesDefenderAirGroup , createHostilesSwarm and createHostilesAirGroupExtra -change _airtype by the unitname you want instead for each hostile group and change the payload accordingly The two last choices with airtype is obviously where you can change your opponents planes and payload. I will let you read the lua file since there is a lot of things that can be change further if you understand it.
  5. @heloguy : i don't remember the mission setup since I run an very heavily modified version but i would say check in the mission area18 lua for unit strings and replace them with the name of the unit you want. Ping me again in 15 days I'm in vacation right now
  6. Look for Area 18 mission and campaign on user files. I personnaly use for my squadron an own heavily reworked and improved version with all planes / helicopters and more missions types that I can switch to other maps with some work. I still use some original sounds so I will not share it.
  7. Hello everyone! It's been a long time but I've been busy with some IRL issues and the scope of my work has been a bit extended as you will see. Thanks to you I was able a script called Strategic Target Strike Dispatcher (lua provided as attached files and examples mission too (soon as a DCS user file) ). But let's start with some infos about this first: **** STRATEGIC TARGET STRIKE DISPATCHER by Glloq (Caucasus and Syria compatible) The strategic target strike dispatcher mission is more kind of a template mission you can customize than a mission. It will allow you to strike a group of scenery objets (like bridges, factories or buildings) already included in the map in circular zones you have selected (by default a single circular zone called "targetZone"). Selected targets area will be marked on the F10 minimap and the mission briefing will pop with coordinates and target list (You can ask for a summary anytime via the F10 radio menu) Feel free to move the zone or add more, add or change aircrafts/helicopters types or add enemy units. Don't forget to bring the heavy weapons because some targets are tough to destroy Thanks to toutenglisse for helping me to understand how to get full SceneryObject data Thanks to everyone behind MIST and MOOSE Frameworks that made this possible Thanks to everyone from my virtual squadron "8TH Rapaces" for being the boldest and greatest beta testers Using the F10 Radio Menu you will find the "Strategic targets strike" menu. Inside it you can : - ask for the mission briefing with target area coordinates and description of all the remaining targets to destroy - pop a smoke (Green, orange, red or white at will) - skip to next strategic targets. It will cancel the current strategic targets list and select after a few seconds another list of strategic targets to strike Restrictions: - Only work on the Caucasus and Syria map right now but there are enough debug tools to expand it to others maps - Menu is for blue coalition by default but you can change it by calling setDispatcherForBlueCoalition() or setDispatcherForRedCoalition() before the startDispatcher function - Once the lua file loaded you can use addCircularZone(zoneName) to add zones where you want to scan for "strategic targets" to strike. Then use startDispatcher() to launch the selection. It should be done in mission start due to how long the process take - Obviously the bigger the zone, the more time it will take to evaluate "strategic targets group" when a new one is requested - You can choose to strike only one scenery object of a time instead of a group around X meters from the first one to bypass the freeze at strategic target selection. For this you need to comment the call to getLocalStrategicTargetsInArea(strategicTarget, 1000). checkForAdditionalStrategicTargetsInArea method is then useless too. Known bugs: - {typeName = "PLATFORMA_AKACYA", description ="Railway wagon with artillery tank"}, --Railway wagon with artillery tank on it //FIXME WHY OTHER RAILWAY WAGON ARE NOT FOUND ? DCS Caucasus Issue ? - Scenery objetcs wih null typeName on Caucasus Scenery objects are grouped by custom theme and you can choose to pick from one or not in insertFoundUnitInStrategicTargetListIfNeeded method. Choose wisely and don't commit war crimes ! Scenery objects are only added in the list of available strategic targets only if they are valid targets. A scenery object has the validTarget property set to true if visible, can be destroyed, and visually identify it among others. If I keep improving this code next features would be adding defenses to target area (depending strategic value?) but don't expect anything before at least "Two weeks©" **** So, as said above with this I'm now able to make players strike any scenery objects already included on the map like bridges, warehouses, power plants, etc... I keep track of destroyed buildings and once all the targeted scenery objects in a area are destroyed the script will provide you another list of scenery objects to destroy. And if you feel it's not the right kind of targets or location you can skip this list and ask for another one. I use this script for a Vietnam-like mission (not the one provided here) on the Caucasus map to offer pilots some variety in targets choice over enemy territory. I don't provide a specific protection for those targets but there is already a lot of AAA, SAM and enemy aircrafts that can destroy then while flying to targets. Obviously they are still free to engage targets of opportunity but pilots from my squadron like shiny "All targets destroyed" and "Mission done" messages during our flying nights. There is room for tuning for the scripts since scenery objects are sorted by custom categories like hotels, airport stuff, railway stuff, warehouses, etc... So I put whatever appropriate targets I feel for my mission. Missions provided here are kind of templates to start a mission with this script on Caucasus and Syria maps. Since I use scenery objects typenames that means that for each map I have to identify and sort every type of scenery objects, check if they can be destroyed (lot of indestructible objects on Syria unlike the Caucasus map), and sort them by categories. That's why only Caucasus and Syria are supported right now (Syria took me one additional month but it was worth to see how I should sort scenery objects) and I will look to expand it in the future on the maps I own. Aside compatibility with other maps I don't know yet what else to do about it. I think a great step would be to provide an appropriate defense for those targets depending their strategic values but defense vary a lot whether you are flying in 1970 or 2020... Another think to do would be to check with some other scripts that allow you to progress with territory taken and how strategic targets can provide you bonus if you keep them safe or if you destroy the opponent ones. Lastly, I'm more an oriented object developer and my lua skills are still low so maybe I can find some ways to better sort all thoses scenery objects. Feel free if you have any question or suggestions and thanks again for your help ! Glloq StrategicTargetStrikeDispatcher.lua StrategicTargetStrikeDispatcherCaucasus_v1p0.miz StrategicTargetStrikeDispatcherSyria_v1p0.miz
  8. Check the topic linked by toutenglisse. I'm planning soon to release something that allow me to strike some sceneryObjects on Caucasus ( and have been starting work for Syria too ). I need some time to tune / clean the first version
  9. I barely use scenery object ID. I use the typeName of the unit found using the world.searchObject at the beginning of the mission to check if this is a valid target (bridge or warehouse for example) and then I only use its object id to check if its destroyed or not during the mission. So as long as the scenery object ID change during one instance of the mission I'm good. The downside of my solution is I have to check first ( I mean before running the mission with my friends) to check all the scenery objects typeName in the area I want to strike to know which one to use or which one to filter: I don't want to order a strike on light pole ^^ . So if i want to reuse this code on another map or area I will have to check all available scenery first and choose which I one to use or filter for the upcoming mission. I can't use the ME "assign as" since I want random target and the zone where I can select is too wide to add then all through the mission editor. I will try to post a working lua script once done but right now I'm trying to task those strike on scenery objets with Moose TASK_A2G_DISPATCHER but I can't get a way to add it in a Detection. If I can't I will add some radios menus to repeat the target coordinates and launch a smoke on them.
  10. Indeed using an eventHandler for world.event.S_EVENT_DEAD and checking that event.initiator['id_'] match the selected found unit name make me able to manage when the selected target is destroyed. I just need to tune my random target selection from the scenary objects found to have an appropriate target (like a bridge or warehouse or whatever) and I will finally be able to use this like I want for my mission. Thanks for your help! Glloq over
  11. Thanks! You were right I was using later after the world.searchObject a call to SceneryObject.getDescByName on one of the found object before trying to display its data so obviously I only have the object desc part. Changing the world.searchObject handler by something quite similar to what you send I'm now able to see more data and find some bridges (MOST in russian ) with those data : { y= 12.411687850952, x= -267516.02490234, name= 72450049, z= 606664.90625, desc= { life= 500, attributes= { Buildings= "true", }, _origin= "", category= 4, typeName= "MOST(ROAD)BIG", displayName= "", }, } So now I can filter bridge objects by looking for a typeName starting with "MOST", I know their location and for each bridge section its specific name ("72450049" here ). I can choose randomly between them, I just need to check when the bridge is destroyed for what I need. Do you feel I will have more luck with listening to a dead event or can I create by script a zone including this bridge and just check with mist.flagFunc.mapobjs_dead_zones ? Anyway thanks a lot and merci !
  12. Hello, I'm trying on the Caucasus map to get a list of scenery objects in a specific zone to choose randomly one of them to be the player ground target. Using world.searchObjects I was able to get the list of scenery objects in this zone. The problem is I have no way with those data to know what type of building or object my sceneryObject is, its location or if it's destroyed or not. Here is a sample of what I get for each sceneryObject: { life= 0, attributes= { Buildings= "true", }, _origin= "", category= 4, typeName= "146867008", displayName= "", } It's quite hard to check if it is a bridge, a specific building or whatever. Am I missing something? I can't get the object position in the zone I'm checking so I don't know where to strike to check the object life but I would guess that life = 0 is the default value for a scenery object? Thanks for your help
  13. Hey! Beau progrès! Faut qu'on se fasse un point à l'occasion si tu veux de l'aide
  14. Anubis Hercules Mod So fun to fly this Big monster, drop troops and some cargo and make it spawn on the ground ! Because logistics win wars
  15. Nice work! Need some help from an almost rookie in DCS modding?
  16. Unfortunately the mod has edm from previous version. If you want to fix this mod you need to have the original 3D model used and export it again to be compatible with latest DCS version. Hopefully a true A-7 module is in the pipe.
  17. Well, haven't tried yet with my newly bought Spitfire but there is an old through the inferno WW2 for Normandy / Channel Map : https://www.digitalcombatsimulator.com/en/files/3071826/
×
×
  • Create New...