Jump to content

SilentSierra

Members
  • Posts

    317
  • Joined

  • Last visited

Everything posted by SilentSierra

  1. In this video, the HSD has moving map. But I don't know the Block. Start at 14:06:
  2. In the Steam there is a date, DCS F-16C pre-order ends September 25. https://store.steampowered.com/app/1090850/DCS_F16C_Viper/
  3. Yeah, it's too much code to learn how to use. Thanks, I'll patiently try to read all documentation about it.
  4. Thanks man! You are a genius! I'm a web developer, I don't understand the DCS World script environment. Now, I can send HTTP request to my Web API and create my statistics user interface like yours. How do you get the current coordinates of aircrafts and objectives to plot into Google Maps? Do you use scheduler to update for each minute the coordinates? How to get the connected players? How to detect if they are loading SRS? I'm sorry, it's too many questions. Best regards.
  5. Hi there, I have this piece of code that basically require a socket HTTP, but I received an error message that's the "require" doesn't exists. local http = require("socket.http") local ltn12 = require("ltn12") I would like to know how to require this socket in DCS World environment? PS: From this thread How to create statistics for your server Best regards.
  6. Yeah, we are dumb and spent money with eternals early access products. Thanks buddy. :thumbup:
  7. I pre-ordered the F-16C Viper and what's next? Wait 5 more years to finish. I'm so dumb. One more early access module to my collection.
  8. I thought I could work with the Lua libraries. I would not want to change the default scripts.
  9. Hi there, I added an HTTP request in the last piece of the code to send the event data, but I receive an error that global require call is a nil. Don't the DCS World script engine have this package in the library? How do I get the "socket.http" in the DCS World environment? Here is the code I added in the script: local stime = SecondsToClock(timer.getTime()) trigger.action.outText("stime="..stime.." WorldEvent="..WorldEvent.." InitID_="..InitID_.." InitCoa="..InitCoa.." InitGroupCat="..InitGroupCat.." InitType="..InitType.." InitPlayer="..InitPlayer.." eWeaponCat="..eWeaponCat.." eWeaponName="..eWeaponName.." TargID_="..TargID_.." TargCoa="..TargCoa.." TargGroupCat="..TargGroupCat.." TargType="..TargType.." TargPlayer="..TargPlayer, 20) local http = require("socket.http") local ltn12 = require("ltn12") local request_body = "stime="..stime.."&WorldEvent="..WorldEvent.."&InitID_="..InitID_.."&InitCoa="..InitCoa.."&InitGroupCat="..InitGroupCat.."&InitType="..InitType.."&InitPlayer="..InitPlayer.."&eWeaponCat="..eWeaponCat.."&eWeaponName="..eWeaponName.."&TargID_="..TargID_.."&TargCoa="..TargCoa.."&TargGroupCat="..TargGroupCat.."&TargType="..TargType.."&TargPlayer="..TargPlayer local response_body = {} local res, code, response_headers = http.request{ url = "http://httpbin.org/post", method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded"; ["Content-Length"] = #request_body; }, source = ltn12.source.string(request_body), sink = ltn12.sink.table(response_body), } trigger.action.outText("res="..res.." code="..code, 10) if type(response_headers) == "table" then for k, v in pairs(response_headers) do trigger.action.outText("k="..k.." v="..v, 10) end end trigger.action.outText("Response body: ", 10) if type(response_body) == "table" then trigger.action.outText(table.concat(response_body), 10) else trigger.action.outText("Not a table: "..type(response_body), 10) end --Handler table local eStatHandler = {} --Neccessary tables for string instead of intagers local SETCoalition = { [1] = "red", [2] = "blue", } local SETGroupCat = { [1] = "AIRPLANE", [2] = "HELICOPTER", [3] = "GROUND_UNIT", [4] = "SHIP", [5] = "STRUCTURE", } local SETWeaponCatName = { [0] = "SHELL", [1] = "MISSILE", [2] = "ROCKET", [3] = "BOMB", } local wEvent = { [0] = "S_EVENT_INVALID", [1] = "S_EVENT_SHOT", [2] = "S_EVENT_HIT", [3] = "S_EVENT_TAKEOFF", [4] = "S_EVENT_LAND", [5] = "S_EVENT_CRASH", [6] = "S_EVENT_EJECTION", [7] = "S_EVENT_REFUELING", [8] = "S_EVENT_DEAD", [9] = "S_EVENT_PILOT_DEAD", [10] = "S_EVENT_BASE_CAPTURED", [11] = "S_EVENT_MISSION_START", [12] = "S_EVENT_MISSION_END", [13] = "S_EVENT_TOOK_CONTROL", [14] = "S_EVENT_REFUELING_STOP", [15] = "S_EVENT_BIRTH", [16] = "S_EVENT_HUMAN_FAILURE", [17] = "S_EVENT_ENGINE_STARTUP", [18] = "S_EVENT_ENGINE_SHUTDOWN", [19] = "S_EVENT_PLAYER_ENTER_UNIT", [20] = "S_EVENT_PLAYER_LEAVE_UNIT", [21] = "S_EVENT_PLAYER_COMMENT", [22] = "S_EVENT_SHOOTING_START", [23] = "S_EVENT_SHOOTING_END", [24] = "S_EVENT_MAX", } statEventsTable = {} function SecondsToClock(sSeconds) local nSeconds = sSeconds if nSeconds == 0 then --return nil; return "00:00:00"; else nHours = string.format("%02.f", math.floor(nSeconds/3600)); nMins = string.format("%02.f", math.floor(nSeconds/60 - (nHours*60))); nSecs = string.format("%02.f", math.floor(nSeconds - nHours*3600 - nMins *60)); return nHours..":"..nMins..":"..nSecs end end function eStatHandler:onEvent(e) local InitID_ = "" local WorldEvent = wEvent[e.id] local InitCoa = "" local InitGroupCat = "" local InitType = "" local InitPlayer = "" local eWeaponCat = "" local eWeaponName = "" local TargID_ = "" local TargType = "" local TargPlayer = "" local TargCoa = "" local TargGroupCat = "" --Initiator variables if e.initiator and e.initiator~=nil and e.initiator~='' then if Object.getCategory(e.initiator) and Object.getCategory(e.initiator)==Object.Category.UNIT then if Unit.getCategory(e.initiator) and (Unit.getCategory(e.initiator)==Unit.Category.AIRPLANE or Unit.getCategory(e.initiator)==Unit.Category.HELICOPTER) then --get player name. if Unit.getPlayerName(e.initiator)~=nil then InitPlayer = Unit.getPlayerName(e.initiator) else InitPlayer = "AI" end end end --Check Category of object --If no category if not Object.getCategory(e.initiator) then InitID_ = e.initiator.id_ InitCoa = SETCoalition[e.initiator:getCoalition()] InitGroupCat = SETGroupCat[e.initiator:getCategory()] InitType = e.initiator:getTypeName() --if Category is UNIT elseif Object.getCategory(e.initiator) == Object.Category.UNIT then local InitGroup = e.initiator:getGroup() InitID_ = e.initiator.id_ InitCoa = SETCoalition[initGroup:getCoalition()] InitGroupCat = SETGroupCat[initGroup:getCategory() + 1] InitType = e.initiator:getTypeName() --if Category is STATIC elseif Object.getCategory(e.initiator) == Object.Category.STATIC then InitID_ = e.initiator.id_ InitCoa = SETCoalition[e.initiator:getCoalition()] InitGroupCat = SETGroupCat[e.initiator:getCategory()] InitType = e.initiator:getTypeName() end else InitID_ = "No Initiator" InitCoa = "No Initiator" InitGroupCat = "No Initiator" InitType = "No Initiator" InitPlayer = "No Initiator" end --Weapon variables if e.weapon == nil then eWeaponCat = "No Weapon" eWeaponName = "No Weapon" else local eWeaponDesc = e.weapon:getDesc() eWeaponCat = SETWeaponCatName[eWeaponDesc.category] eWeaponName = eWeaponDesc.displayName end --Target variables if e.target and e.target~=nil and e.target~='' and e.target:isExist() then if Object.getCategory(e.target) and Object.getCategory(e.target)==Object.Category.UNIT then if Unit.getCategory(e.target) and (Unit.getCategory(e.target)==Unit.Category.AIRPLANE or Unit.getCategory(e.target)==Unit.Category.HELICOPTER) then --get player name. if Unit.getPlayerName(e.target)~=nil then TargPlayer = Unit.getPlayerName(e.target) else TargPlayer = "AI" end end end --Check Category of object --If no category if not Object.getCategory(e.target) then TargID_ = e.target.id_ TargCoa = SETCoalition[e.target:getCoalition()] TargGroupCat = SETGroupCat[e.target:getCategory()] TargType = e.target:getTypeName() --if Category is UNIT elseif Object.getCategory(e.target) == Object.Category.UNIT then local TargGroup = e.target:getGroup() TargID_ = e.target.id_ TargCoa = SETCoalition[TargGroup:getCoalition()] TargGroupCat = SETGroupCat[TargGroup:getCategory() + 1] TargType = e.target:getTypeName() --if Category is STATIC elseif Object.getCategory(e.target) == Object.Category.STATIC then TargID_ = e.target.id_ TargCoa = SETCoalition[e.target:getCoalition()] TargGroupCat = SETGroupCat[e.target:getCategory()] TargType = e.target:getTypeName() end else TargID_ = "No target" TargCoa = "No target" TargGroupCat = "No target" TargType = "No target" TargPlayer = "No target" end --write events to table if e.id == world.event.S_EVENT_HIT or e.id == world.event.S_EVENT_SHOT or e.id == world.event.S_EVENT_EJECTION or e.id == world.event.S_EVENT_BIRTH or e.id == world.event.S_EVENT_CRASH or e.id == world.event.S_EVENT_DEAD or e.id == world.event.S_EVENT_PILOT_DEAD or e.id == world.event.S_EVENT_LAND or e.id == world.event.S_EVENT_TAKEOFF or e.id == world.event.S_EVENT_PLAYER_LEAVE_UNIT then local stime = SecondsToClock(timer.getTime()) trigger.action.outText("stime="..stime.." WorldEvent="..WorldEvent.." InitID_="..InitID_.." InitCoa="..InitCoa.." InitGroupCat="..InitGroupCat.." InitType="..InitType.." InitPlayer="..InitPlayer.." eWeaponCat="..eWeaponCat.." eWeaponName="..eWeaponName.." TargID_="..TargID_.." TargCoa="..TargCoa.." TargGroupCat="..TargGroupCat.." TargType="..TargType.." TargPlayer="..TargPlayer, 20) local http = require("socket.http") local ltn12 = require("ltn12") local request_body = "stime="..stime.."&WorldEvent="..WorldEvent.."&InitID_="..InitID_.."&InitCoa="..InitCoa.."&InitGroupCat="..InitGroupCat.."&InitType="..InitType.."&InitPlayer="..InitPlayer.."&eWeaponCat="..eWeaponCat.."&eWeaponName="..eWeaponName.."&TargID_="..TargID_.."&TargCoa="..TargCoa.."&TargGroupCat="..TargGroupCat.."&TargType="..TargType.."&TargPlayer="..TargPlayer local response_body = {} local res, code, response_headers = http.request{ url = "http://httpbin.org/post", method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded"; ["Content-Length"] = #request_body; }, source = ltn12.source.string(request_body), sink = ltn12.sink.table(response_body), } trigger.action.outText("res="..res.." code="..code, 10) if type(response_headers) == "table" then for k, v in pairs(response_headers) do trigger.action.outText("k="..k.." v="..v, 10) end end trigger.action.outText("Response body: ", 10) if type(response_body) == "table" then trigger.action.outText(table.concat(response_body), 10) else trigger.action.outText("Not a table: "..type(response_body), 10) end statEventsTable[#statEventsTable + 1] = { [1] = stime, [2] = WorldEvent, [3] = InitID_, [4] = InitCoa, [5] = InitGroupCat, [6] = InitType, [7] = InitPlayer, [8] = eWeaponCat, [9] = eWeaponName, [10] = TargID_, [11] = TargCoa, [12] = TargGroupCat, [13] = TargType, [14] = TargPlayer, } end end world.addEventHandler(eStatHandler)
  10. If you leave the server in the briefing window, it don't auto close after leave the server.
  11. Is there a way to slave the TGP on current steerpoint like the A-10C does?
  12. Yeah, I expect they'll announce the date before release to schedule my vacation.
  13. I have the Ka-50, UH-1H, Mi-8MTV2, except the Gazelle. I probably will purchase the AH-1 and Mi-24 from ED/Belsimtek. I'll reconsider the purchase. Thanks for the answer.
  14. I would like to schedule my 30 days vacation during the DCS F-16C Viper early access release. So, can I really consider the release in the end of September or beginning of October?
  15. I watched some test flight videos about Gazelle from Bunyap channel.
  16. Hi there, I would like to know if the Polychop-Simulations and MilTech-5 were the same company? I heard something about, but I don't know the real history. I'm interested in purchase the Gazelle using my bonus, but I'm don't know the project status, the last change log update was last year and I'm afraid the Polychop-Simulations is dead. I watched some videos about the module and it looks good for me, but I don't know if it reproduces very well the real thing. Can some subject-matter expert recommend this module? Best regards.
  17. I scheduled my vacation to March expecting this release. I expect don't be disappointed.
  18. I would like to know if it's possible to refound a pre-order purchase? PS: I purchased in the ED shop. Best regards.
  19. The F/A-18C Hornet is the best module available, you can do almost all tasks in the battlefield, but it's still WIP. You have step by step videos explaining everything of the plane and the Chuck's Guide helps a lot.
  20. I don't know what these two fixes mean in the change log, but could be about the black flickering?
  21. I thought it was a defect on my VGA with some artifacts issue. Good to know that's only a DCS problem.
  22. I don't know the Hornet systems like a pro, but I was expecting some indication on the HUD to shoot the missile, like range to the target or a fire solution indexer.
  23. If you search for F-14 on Periscope Channel, you'll find many more videos.
  24. If you need some parameters to drop your bombs, I did some videos to remember my self how to release different bomb types. In the video description you find all info.
  25. This info is on the product page. https://belsimtek.com/projects/53/ https://belsimtek.com/projects/52/ https://www.digitalcombatsimulator.com/en/products/helicopters/huey/ https://www.digitalcombatsimulator.com/en/products/helicopters/magnificent_eight/
×
×
  • Create New...