-
Posts
1484 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Stonehouse
-
Easy to fix bug AN26
Stonehouse replied to Stonehouse's topic in Release Version Bugs and Problems (Read only)
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- 1 reply
-
- 1
-
-
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
-
The Interesting Missions Generator
Stonehouse replied to emolina's topic in User Created Missions General
No that is ok, I understand your rationale now. Thanks. -
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
-
The Interesting Missions Generator
Stonehouse replied to emolina's topic in User Created Missions General
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? -
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
-
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.
-
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
-
[Ejection] Way to identify Ejectee position
Stonehouse replied to Thisdale's topic in Mission Editor
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. -
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
-
Beginners Guide to DCS World Aircraft Mods
Stonehouse replied to RedBeard2's topic in How To Mod for DCS World
That would be a great help! -
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()
-
[Ejection] Way to identify Ejectee position
Stonehouse replied to Thisdale's topic in Mission Editor
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 } -
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
-
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.
-
http://www.digitalcombatsimulator.com/en/files/1983132/ AI aircraft
-
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.
-
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.
-
Thanks for the confirmation Grimes. Lucky for me I am only really looking for the unit that is leading the group so I can use it to check for enemy units in a moving zone around the group (assuming that the individual units will be relatively close together as compared to the radius of the zone which is 8000m). Ok cool I can just do Group.getUnits()[1] then by the sounds of it as the other guys suggested. Cheers, Stonehouse
-
Did some more searching and came across http://forums.eagle.ru/showpost.php?p=2017253&postcount=491 This implies that the table returned by getUnits is actually static and that index =1 may start out as the leader but if it dies then index =2 inherits his command and so on. Don't know if the comments are still true or not being about 2 years ago.
-
Ok thanks. I was of that impression too but wondered if there was a short cut built into the various DCS functions so you could link directly from controller to the unit it was associated with. If no-one can offer alternatives then I will go ahead using the method you suggest. Thanks again. Cheers, Stonehouse <edit> PS is it always group:getUnits()[1] ? ie is the table rearranged after the original unit at index 1 is destroyed? or does the table stay static and [2] become controller?
-
Just wondering what is the best way to end up with the unit deemed as being the leader of a group of vehicles or ships? I know you can do a Group:getController but that returns a class of Controller not Unit and while it logically is representative of the group leader I don't think it equates to Unit from a script point of view. Is there an easy way of going from knowing the controller to getting the unit leading the group (which I believe changes according to units in the group being destroyed) ? Any other approach people use? Thanks, Stonehouse