Jump to content

Stonehouse

Members
  • Posts

    1484
  • Joined

  • Last visited

Everything posted by Stonehouse

  1. Someone PM'd me to ask about fireobjects and their use so I thought I would post the response here in case it helps people. Please remember to credit Lilkiki if you use the fireobjects mod. <response> It's a bit of both a mod and scripting sort of. First main point though is that anyone who uses a mission with the fireobjects must have the mod installed to see them. It was one of the reasons I suggested in other places that it be included in the base set of DCS objects as a tribute to Lilkiki - who was the person who made it and unfortunately recently passed away. All I did was tweak some lua files to create different size fires. Probably won't happen but I guess ED may build their own version of fires and smokes that can be placed and triggered. Anyway install the fireobjects mod via JSGME or GME as you prefer and that makes a small, medium and large fire object available in the mission editor. You will find them under static objects / structures. It doesn't really matter about which coalition owns them unless the presence of the wrong side's objects in the wrong spot causes a problem with other scripts you are running but generally I keep the coalition of the fires consistent with the territorial owner of the map location I am placing them at. eg Blue airfield put blue fires. So place the fireobjects in and around points you regard as targets. These objects have a very small life value so any damage will make them explode and trigger the fire and smoke column you want. You have a couple of ways to trigger this event. You can use a mission trigger to do an explode unit and select the fireobject of interest. This is useful is you want fires and smoke at the start of a mission - which you do with a mission start trigger (because many objects exploding at once causes a tiny pause so it is best done before the players get into the mission) to explode all the ones you want for initial effects. The second way is to just use normal weapon damage to trigger the fireobject. eg a bomb going off nearby will cause the fireobject to trigger the fire and smoke. Old vid of it being used. vaYvTgr46Uk PS In the video weapon damage is used to trigger the effects and something I forgot to mention above, because they are statics you want to tick the hidden box on each fireobject once you are happy with where they are or else they show up on the map in game depending on your settings. You can always find them again in the unit's list in the editor
  2. Best wishes Sven. I have followed your project even though with helping Markindel with bringing some mods into being I haven't had time to really try much of it out which is a real shame and no reflection on your work. I know exactly where you are at as I reached the same place with GCICAP where I began to feel guilty when I didn't work on it and you are right it isn't good for you. I can only suggest as some others here that you take a break and then if you feel like it come back and continue but have a realistic timeline for the work that gives you space for normal life and turns Moose into the interest and hobby it was meant to be rather than a job you are not paid for. Best regards, Stonehouse
  3. guess you could edit the script so that the lines like gcicap.red.cap.groups_count = 3 gcicap.red.gci.groups_count = 2 become gcicap.red.cap.groups_count = mist.random(some number) gcicap.red.gci.groups_count = mist.random(some number) repeat for the blue cap and gci counts. The above assumes a random number between 1 and the number entered. You could also do something like mist.random(2,5) if you wanted a minimum of 2 groups. I am assuming you don't wish to change this mid mission but simply want to be surprised each time you run a mission you've built. Changing it mid mission might cause hiccups (they are global variables I believe so theoretically you could use a M-E trigger to alter the counts).
  4. I've been testing a new version of my flak script and have been noticing that what I think are fuel leak trails are acting a bit odd. Getting quite angular kinks in them rather than the curve you'd expect and just looking a bit odd especially as the aircraft descends. No mods in use by the way. Anyone else see something similar or is it just a problem with my install? Some pics to show you what I mean.
  5. Ditto for the An30. DCS is looking for AN-30M-OBLOMOK-WING-R.EDM AN-30M-OBLOMOK-WING-L.EDM but files are named AN-30-OBLOMOK-WING-R.EDM AN-30-OBLOMOK-WING-L.EDM A file rename fixes the issue
  6. Try this thread for a mod by Lilkiki https://forums.eagle.ru/showthread.php?t=138241 and in particular posts for a variant that gives you small, medium and large smoke columns and fires. https://forums.eagle.ru/showpost.php?p=2311051&postcount=18 https://forums.eagle.ru/showpost.php?p=2545192&postcount=39
  7. Ok thanks. Got it all working using a pairs loop. Cheers, Stonehouse
  8. No that is ok, I understand your rationale now. Thanks.
  9. Sorry Grimes. The flu I have at present must be making me too stupid to understand. I tried the serialise as you suggested and as you said it would the table written to the file in the logs folder matches the example DB. It appears as a nice simple table where the high level group data is easily accessible. However I am confused then as to why I get a "attempt to index field "?" " error on the following concatenation line: [color=black]local grouptable = _mist.DBs.groupsById[/color] [color=black]for i = 1, #grouptable do[/color] [color=black] [b]local msg2 = "group name: " .. grouptable[i].groupName [/b] trigger.action.outText(msg2, 60000000) env.info(msg2)[/color] [color=black]end[/color] It does output the names of the two groups in the test mission but then bombs with the aforementioned error. Can you provide any clues or insight into why it fails after working ok for the two groups? Is it actually not just a nice simple numerically indexed table after all? <edit> apologies the flu is really making me stupid. There are actually 4 groups in the test mission. 2 of aircraft and 1 vehicles and 1 ships. The vehicle and ship group are reported but the aircraft are not. However looking at the output of the serialise I can see that there are gaps in the index. So you get 1,2,5,6 as indexes. Not sure about 3 and 4 - are they groups that I have placed and then deleted and because the index is the group id and not just a numerical sequence this is the result? Therefore I can't really use #grouptable and must use a pairs for loop? Thanks, Stonehouse
  10. Sorry about the wall of text it did actually cross my mind after I posted it that it wasn't very readable apologies. Thank you as always for your responses and help.
  11. Great idea! Very good for virtual squadron training activity. There were some scripts lying around to generate random air traffic from and to selected airfields as well if you want to add some background activity. Could you also package the missions up in a zip file too when you have a sec?
  12. Some of the ww2 vehicles are Markindel's http://www.digitalcombatsimulator.com/en/files/index.php?arrFilter_pf%5Bfiletype%5D=&arrFilter_pf%5Bgameversion%5D=&arrFilter_pf%5Bfilelang%5D=&arrFilter_pf%5Baircraft%5D=&arrFilter_DATE_CREATE_1_DAYS_TO_BACK=&CREATED_BY=Markindel&sort_by_order=TIMESTAMP_X_DESC&set_filter=Filter&PAGEN_1=3
  13. I have been doing some scripting today and therefore been looking at dcs.log quite a bit. I've noticed a consistent error the files for the damaged left and right wing for the An26 cannot be opened. This is because DCS is looking for: AN-26B-OBLOMOK-WING-L.EDM AN-26B-OBLOMOK-WING-R.EDM But the files themselves are named: AN-26-OBLOMOK-WING-L.EDM AN-26-OBLOMOK-WING-R.EDM I've tested this can be fixed by renaming the files. Once done the error no longer appears.
  14. Fiddled around some more with it, doing this: for i = 1, #grouptable do local groupelements = grouptable[i] local Table3 = _mist.utils.tableShow(groupelements) local msg1 = "groupelements: " .. Table3 trigger.action.outText(msg1, 60000000) env.info(msg1) Gave me a concatenation error for Table3 being nil but I still produced a listing of the first two groupelements table in dcs.log etc (only two groups of ground units one ships and one tanks) so doesn't that imply that there is one or more nil entries at the end of table grouptable aka the table built by mist.DBs.groupsById ? Anyway the below avoided the error and got what I was trying to do working. Probably can do a pairs type loop instead but the below works. I guess I do want to know if the table returned from mist.DBs.groupsById is going to remain as it is now or not so I know how long my code will be good for. for i = 1, #grouptable do local groupelements = grouptable[i] if groupelements then local Table3 = _mist.utils.tableShow(groupelements) local msg1 = "groupelements: " .. Table3 trigger.action.outText(msg1, 60000000) env.info(msg1) Thanks, Stonehouse
  15. just to clarify the event.initiator value is the unit id. So as an example a code snippet from the old GCI CAP script where for a unit spawning the script is getting the name of the unit and then it went on to do other stuff for supply tracking: function arrivaltableINT:onEvent(event) --CAP or GCI units spawning reduce supply if (world.event.S_EVENT_BIRTH == event.id) then if event.initiator ~= nil then local airspawnname = Unit.getName(event.initiator) . blah blah . . end --function Then you need to tell DCS about the event handler with something like the line below: world.addEventHandler(arrivaltableINT) So the above tells DCS that when an event happens to call the handler function arrivaltableINT You can do something similar for the ejection event but then as Matador suggested get the Vec 3 position of the unit at the time of the event and then do what you want to translate it to MGRS or lat/long. There are various mist functions to do this and I am sure moose does the same thing. Possibly there are even DCS native functions to translate vec3 co-ords.
  16. I'm having some trouble using mist.DBs.groupsById from mist 4.3.73 I'm doing local grouptable = mist.DBs.groupsById but then the table returned is a table of tables looking like: grouptable: { [1] = table: 000000004C368030 { [1]["country"] = "usa", [1]["groupName"] = "D_FLAK_HI_06_001", [1]["units"] = table: 0000000015C15B38 { [1]["units"][1] = table: 0000000015C15AE8 { [1]["units"][1]["heading"] = -3.038170561594, [1]["units"][1]["point"] = table: 0000000015C15C18 { [1]["units"][1]["point"]["y"] = 637200, [1]["units"][1]["point"]["x"] = -289828.57142857, }, [1]["units"][1]["groupId"] = 1, [1]["units"][1]["y"] = 637200, [1]["units"][1]["coalition"] = "blue", [1]["units"][1]["groupName"] = "D_FLAK_HI_06_001", [1]["units"][1]["type"] = "AAV7", [1]["units"][1]["countryId"] = 2, [1]["units"][1]["x"] = -289828.57142857, [1]["units"][1]["unitId"] = 1, [1]["units"][1]["category"] = "vehicle", [1]["units"][1]["unitName"] = "Unit #1", [1]["units"][1]["playerCanDrive"] = true, [1]["units"][1]["country"] = "usa", [1]["units"][1]["skill"] = "Average", }, [1]["units"][2] = table: 0000000015C15D48 { [1]["units"][2]["heading"] = -3.038170561594, [1]["units"][2]["point"] = table: 0000000015C15DD8 { [1]["units"][2]["point"]["y"] = 637200, [1]["units"][2]["point"]["x"] = -289868.57142857, }, [1]["units"][2]["groupId"] = 1, [1]["units"][2]["y"] = 637200, [1]["units"][2]["coalition"] = "blue", [1]["units"][2]["groupName"] = "D_FLAK_HI_06_001", [1]["units"][2]["type"] = "AAV7", [1]["units"][2]["countryId"] = 2, [1]["units"][2]["x"] = -289868.57142857, [1]["units"][2]["unitId"] = 2, [1]["units"][2]["category"] = "vehicle", [1]["units"][2]["unitName"] = "Unit #001", [1]["units"][2]["playerCanDrive"] = true, [1]["units"][2]["country"] = "usa", [1]["units"][2]["skill"] = "Average", }, [1]["units"][3] = table: 0000000015C15C68 { [1]["units"][3]["heading"] = -3.038170561594, [1]["units"][3]["point"] = table: 0000000015C15B88 { [1]["units"][3]["point"]["y"] = 637200, [1]["units"][3]["point"]["x"] = -289908.57142857, }, [1]["units"][3]["groupId"] = 1, [1]["units"][3]["y"] = 637200, [1]["units"][3]["coalition"] = "blue", [1]["units"][3]["groupName"] = "D_FLAK_HI_06_001", [1]["units"][3]["type"] = "AAV7", [1]["units"][3]["countryId"] = 2, [1]["units"][3]["x"] = -289908.57142857, [1]["units"][3]["unitId"] = 3, [1]["units"][3]["category"] = "vehicle", [1]["units"][3]["unitName"] = "Unit #002", [1]["units"][3]["playerCanDrive"] = true, [1]["units"][3]["country"] = "usa", [1]["units"][3]["skill"] = "Average", }, }, [1]["coalition"] = "blue", [1]["groupId"] = 1, [1]["category"] = "vehicle", [1]["countryId"] = 2, [1]["startTime"] = 0, [1]["task"] = "Ground Nothing", [1]["hidden"] = false, }, [2] = table: 0000000032ED7848 { [2]["groupId"] = 2, [2]["groupName"] = "E_FLAK_HI_06_001", [2]["units"] = table: 0000000032ED78E8 { [2]["units"][1] = table: 0000000032ED7898 { [2]["units"][1]["type"] = "Dry-cargo ship-1", [2]["units"][1]["point"] = table: 000000004D3EF6F0 { [2]["units"][1]["point"]["y"] = 584650, [2]["units"][1]["point"]["x"] = -315407.14285714, }, [2]["units"][1]["groupId"] = 2, [2]["units"][1]["y"] = 584650, [2]["units"][1]["skill"] = "Average", [2]["units"][1]["coalition"] = "blue", where in the example DBs it looks like a simple table where each entry is a group: groupsById = { [1] = { ["modulation"] = 0, ["country"] = "usa", ["uncontrolled"] = false, ["groupId"] = 1, ["groupName"] = "AH-1s_1", ["units"] = { [1] = { ["alt"] = 500, ["point"] = { ["y"] = 631857.14285714, ["x"] = -297857.14285714, }, -- end of ["point"] ["alt_type"] = "BARO", ["livery_id"] = "standard", ["onboard_num"] = "50", ["category"] = "helicopter", ["speed"] = 55.555555555556, ["type"] = "AH-1W", ["country"] = "usa", ["psi"] = -0.017389551289373, ["unitName"] = "AH-1s_1_1", ["groupName"] = "AH-1s_1", Is there a bug with mist.DBs.groupsById? is the example table returned out of date? or much more likely have I done something wrong? Thanks, Stonehouse
  17. That would be a great help!
  18. I seem to recall it all works except the sound as they are pre 1.5 setup. Getting very late here for me but I think this would work assuming the usual mod/tech/etc install. Just leave out the lines for things you don't have. declare_plugin(" WW2 Objects", { image = "SOO.bmp", installed = true, dirName = current_mod_path, fileMenuName = _("SOO"), version = "1.5", state = "installed", info = _("WW2 Objects"), encyclopedia_path = current_mod_path .. '/Encyclopedia', }) ---------------------------------------------------------------------------------------- dofile(current_mod_path..'/flak37.lua') dofile(current_mod_path..'/bunker.lua') dofile(current_mod_path..'/horch.lua') dofile(current_mod_path..'/king-tiger.lua') dofile(current_mod_path..'/kub.lua') dofile(current_mod_path..'/ladder.lua') dofile(current_mod_path..'/M4_Sherman.lua') dofile(current_mod_path..'/mercedes.lua') dofile(current_mod_path..'/mercedes-aaa.lua') dofile(current_mod_path..'/mercedes-barrels.lua') dofile(current_mod_path..'/N3D_Jeep.lua') dofile(current_mod_path..'/N3D_TruckGMC.lua') dofile(current_mod_path..'/panther.lua') dofile(current_mod_path..'/Panzer_IV.lua') dofile(current_mod_path..'/sdkfx.lua') dofile(current_mod_path..'/tiger.lua') dofile(current_mod_path..'/uboat.lua') dofile(current_mod_path..'/u-boat_7c41.lua') plugin_done()
  19. You might be able to capture something close using events maybe. If you got the position of the event initiator it would be roughly in the same neighbourhood at least. world.event = { S_EVENT_INVALID = 0, S_EVENT_SHOT = 1, S_EVENT_HIT = 2, S_EVENT_TAKEOFF = 3, S_EVENT_LAND = 4, S_EVENT_CRASH = 5, S_EVENT_EJECTION = 6, S_EVENT_REFUELING = 7, S_EVENT_DEAD = 8, S_EVENT_PILOT_DEAD = 9, S_EVENT_BASE_CAPTURED = 10, S_EVENT_MISSION_START = 11, S_EVENT_MISSION_END = 12, S_EVENT_TOOK_CONTROL = 13, S_EVENT_REFUELING_STOP = 14, S_EVENT_BIRTH = 15, S_EVENT_HUMAN_FAILURE = 16, S_EVENT_ENGINE_STARTUP = 17, S_EVENT_ENGINE_SHUTDOWN = 18, S_EVENT_PLAYER_ENTER_UNIT = 19, S_EVENT_PLAYER_LEAVE_UNIT = 20, S_EVENT_PLAYER_COMMENT = 21, S_EVENT_SHOOTING_START = 22, S_EVENT_SHOOTING_END = 23, S_EVENT_MAX = 24 }
  20. Wow is an understatement, crikey those look good
  21. Is there any chance of getting a specific "Scripts" section in User files? It would make it a lot easier for people (and authors) to keep things up to date and organised Thanks, Stonehouse
  22. Actually I want to update that description in user files but unfortunately ED don't have a scripts section in user files so it's Mod or Other. The flak is actually a script that you use via triggers in your mission to generate flak bursts either within a static zone or within a moving zone centred on a unit eg a ship. So it is not installed per se as you would an aircraft or tank mod but is simply used when you build a mission. I am currently doing a rewrite - which is taking a long time because there isn't much spare time these days - to make it easier to use and improve performance (hopefully) in MP.
  23. http://www.digitalcombatsimulator.com/en/files/1983132/ AI aircraft
  24. Doing some rewrites of the flak script to hopefully improve performance in MP and also remove the need for M-E triggers for each flak site. It's been very on and off as I only have time in between helping with Markindel's mods. It is getting somewhere though which is good, no ETA I'm sorry as getting time for it is very unpredictable.
  25. Don't discount the idea of using the road network. For those that remember it Lowengrin's DCG used a system where the road system was defined by the path of waypoints a vehicle would take to go from one strategic location to the next. A similar thing could probably be done with a collection of late activation units that never spawn to give you a "good" path that avoids issues from one location to the next. Groups could inherit these template paths. Similar things were done with the rail network and sea routes. FYI see http://members.shaw.ca/lowengrin/ and http://forum.jg1.org/forum/8-lowengrins-dynamic-campaign-generators-dcg-for-il-2-cfs2/ and in particular some (slightly out dated but good enough to give you the idea) info about how it worked from the campaign designers viewpoint http://forum.jg1.org/topic/3793-dcg-download-site/#entry20855 I'm not saying duplicate it verbatim but some of the ideas do transfer I think once translated to a DCS World equivalent concept. Many a fantastic co-op/PvP/mixed campaign was flown using this system. I can remember building a fictional invasion of Darwin by the Japanese based around the premise that the IJN had caught the USN carriers at Pearl and then won Midway causing the US fleet to pull back for home defence which was quite popular at the time. The strength of the lua scripting engine within DCS probably means something much better could be built.
×
×
  • Create New...