-
Posts
149 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Toumal
-
Doesn't appear for me either.
-
Splash Damage 2.0 script (make explosions better!)
Toumal replied to Grimm's topic in Scripting Tips, Tricks & Issues
I don't think so. -
Splash Damage 2.0 script (make explosions better!)
Toumal replied to Grimm's topic in Scripting Tips, Tricks & Issues
Sure! function blastWave(_point, _radius, weapon, power, launchingUnit, launchingCoalition, launchingPlayer) local foundUnits = {} local volS = { id = world.VolumeType.SPHERE, params = { point = _point, radius = _radius } } local ifFound = function(foundObject, val) if foundObject:getDesc().category == Unit.Category.GROUND_UNIT and foundObject:getCategory() == Object.Category.UNIT then foundUnits[#foundUnits + 1] = foundObject end if foundObject:getDesc().category == Unit.Category.GROUND_UNIT then --if ground unit if splash_damage_options.blast_stun == true then --suppressUnit(foundObject, 2, weapon) end end if splash_damage_options.wave_explosions == true then local obj = foundObject local obj_location = obj:getPoint() local distance = getDistance(_point, obj_location) local timing = distance/500 if obj:isExist() then if tableHasKey(obj:getDesc(), "box") then local length = (obj:getDesc().box.max.x + math.abs(obj:getDesc().box.min.x)) local height = (obj:getDesc().box.max.y + math.abs(obj:getDesc().box.min.y)) local depth = (obj:getDesc().box.max.z + math.abs(obj:getDesc().box.min.z)) local _length = length local _depth = depth if depth > length then _length = depth _depth = length end local surface_distance = distance - _depth/2 local scaled_power_factor = 0.006 * power + 1 --this could be reduced into the calc on the next line local intensity = (power * scaled_power_factor) / (4 * 3.14 * surface_distance * surface_distance ) local surface_area = _length * height --Ideally we should roughly calculate the surface area facing the blast point, but we'll just find the largest side of the object for now local damage_for_surface = intensity * surface_area --debugMsg(obj:getTypeName().." sa:"..surface_area.." distance:"..surface_distance.." dfs:"..damage_for_surface) if damage_for_surface > splash_damage_options.cascade_damage_threshold then local explosion_size = damage_for_surface if obj:getDesc().category == Unit.Category.STRUCTURE then explosion_size = intensity * splash_damage_options.static_damage_boost --apply an extra damage boost for static objects. should we factor in surface_area? --debugMsg("static obj :"..obj:getTypeName()) end if explosion_size > power then explosion_size = power end --secondary explosions should not be larger than the explosion that created it local id = timer.scheduleFunction(explodeObject, {obj_location, distance, explosion_size, obj, launchingUnit, launchingCoalition, launchingPlayer}, timer.getTime() + timing) --create the explosion on the object location end else --debugMsg(obj:getTypeName().." object does not have box property") end end end return true end You will also want the explodeObject function here: function explodeObject(table) local point = table[1] local distance = table[2] local power = table[3] local unit = table[4] local launchingUnit = table[5] local coalition = table[6] local player = table[7] trigger.action.explosion(point, power) if (player ~= nil) then MyScoringInstance:DamageUnitFromSplashdamage(player, launchingUnit, coalition, unit) end end Finally in MOOSE I added this, which allows proper scoring of units destroyed by the blast wave: function SCORING:DamageUnitFromSplashdamage(InitPlayerName, InitUnit, InitUnitCoalition, TargetUnit) if InitPlayerName ~= nil then -- It is a player that is hitting something -- trigger.action.outText("InitPlayerName: "..InitPlayerName, 30) -- trigger.action.outText("InitUnit: "..InitUnit:getName(), 30) -- trigger.action.outText("InitUnitCoalition: "..InitUnitCoalition, 30) -- trigger.action.outText("TargetUnit: "..TargetUnit:getName(), 30) local initUNIT = UNIT:FindByName(InitUnit:getName()) if (initUNIT == nil) then trigger.action.outText("InitUNIT was nil", 30) end self:_AddPlayerFromUnit( InitUNIT ) if self.Players[InitPlayerName] then -- This should normally not happen, but i'll test it anyway. -- A target got hit, score it. -- Player contains the score data from self.Players[InitPlayerName] local Player = self.Players[InitPlayerName] local TargetCategory = TargetUnit:getDesc().category local TargetUnitName = TargetUnit:getName() local TargetType = TargetUnit:getTypeName() local TargetUnitCategory = _SCORINGCategory[TargetCategory] local TargetCoalition = TargetUnit:getCoalition() local TargetUnitCoalition = _SCORINGCoalition[TargetCoalition] local TargetUnitType = TargetUnit:getTypeName() local TargetPlayerName = "" local InitCoalition = InitUnitCoalition local InitUnitName = "Splash Damage" local InitUnitCategory = "Splash Damage" local InitUnitType = "Splash Damage" -- Ensure there is a hit table per TargetCategory and TargetUnitName. Player.Hit[TargetCategory] = Player.Hit[TargetCategory] or {} Player.Hit[TargetCategory][TargetUnitName] = Player.Hit[TargetCategory][TargetUnitName] or {} -- PlayerHit contains the score counters and data per unit that was hit. local PlayerHit = Player.Hit[TargetCategory][TargetUnitName] PlayerHit.Score = PlayerHit.Score or 0 PlayerHit.Penalty = PlayerHit.Penalty or 0 PlayerHit.ScoreHit = PlayerHit.ScoreHit or 0 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0 PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0 PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel() -- Only grant hit scores if there was more than one second between the last hit. if timer.getTime() - PlayerHit.TimeStamp > 1 then PlayerHit.TimeStamp = timer.getTime() local Score = 0 if InitCoalition then -- A coalition object was hit. if InitCoalition == TargetCoalition then Player.Penalty = Player.Penalty + 10 PlayerHit.Penalty = PlayerHit.Penalty + 10 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1 -- MESSAGE -- :NewType( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit friendly target " .. -- TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " .. -- "Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty, -- MESSAGE.Type.Update -- ) -- :ToAllIf( self:IfMessage<profanity>() and self:IfMessagesToAll() ) -- :ToCoalitionIf( InitCoalition, self:IfMessage<profanity>() and self:IfMessagesToCoalition() ) self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType ) else Player.Score = Player.Score + 1 PlayerHit.Score = PlayerHit.Score + 1 PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1 -- MESSAGE -- :NewType( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit enemy target " .. -- TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " .. -- "Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty, -- MESSAGE.Type.Update -- ) -- :ToAllIf( self:IfMessage<profanity>() and self:IfMessagesToAll() ) -- :ToCoalitionIf( InitCoalition, self:IfMessage<profanity>() and self:IfMessagesToCoalition() ) self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType ) end end end end end end Messages were commented out to reduce the message spam. EDIT: If you want the whole thing, look up and download my mission "Caucasus Dynamic Conflict" on the DCS website. -
Hi, I'm trying to get information about the damage state of the player's aircraft from within Export.lua, and can't seem to get this to work. In essence, I want to know if the player's aircraft has sustained *any* damage, or if it's undamaged. local playerPlaneId = LoGetPlayerPlaneId() local playerUnit = LoGetObjectById(playerPlaneId) if (playerUnit == false) then return end if (playerUnit:getLife() < playerUnit:getLife0()) then return end This doesn't work because playerUnit doesn't have a function called getLife. This is probably the completely wrong way to try, I'd appreciate any help!
-
This. I'm going to look into options for that in the future, once the YawVR2 is here. And I'm going to do exactly what you proposed once the dampener is installed: More or less completely unscrew the clutch, because then it's not needed anymore.
-
Search amazon for "adhesive steel wheel weights". You need about 450-500 grams. I think for the ultimate realism you need to do both - the dampener alone won't stop the collective from drooping I flew with the counterweights yesterday and, yeah, I am not going back. Much better fine-grained control, you end up using the collective a lot more actively.
-
Thanks, the carpet used to be quite expensive. Carpets lose value faster than a car. I'm satisfied overall. Some things could be improved, like the up/down toggle on the Sharka grip. I guess they could've also built a counter-force spring system into that relatively large box. Maybe in a future product.
-
Parts list: 1 aluminium L beam, thickness can be between 1 and 4mm, length 36cm / 14in 420g adhesive balancing weights Drill holes to match the cover plate. Result: One balanced boi. Yes some form of oil dampener would be nice but this is like a few $ in parts and the collective stays where you left it because let's face it no burglar would steal a virpil vollective that has janky stuff screwed onto it. Next week: ECM manufacturers hate this simple trick! How to avoid missiles by shooting a flare pistol out the window.
-
Splash Damage 2.0 script (make explosions better!)
Toumal replied to Grimm's topic in Scripting Tips, Tricks & Issues
If you haven't already, you might wanna add the AGM-84E SLAM-ER: ["AGM_84E"] = 488 This is based on the warhead size compared to similar sized bombs. You might want to lower that a bit if you think the damage is too extreme. -
DCS takes the simulations too literally to be fun or practical.
Toumal replied to gotit's topic in New User Briefing Room
I for one desire the complexity because... 1) There's "game mode" for the people who want a more casual experience 2) Complexity brings depth and raises the skill ceiling, as there's more to learn and experience. 3) Complexity brings satisfaction as you eventually not just master them, but become *good* at it. (How good, YMMV of course) 4) The systems simulation literally is the content in this game. You don't just buy an aircraft mesh, you purchase a complete cockpit and most of the systems in it, along with the documentation and all that. In short, DCS is not for everyone. It's a niche product that enjoys a loyal and growing audience. Use game mode if you don't want ALL that much detail, it's definitely an option and there for a reason. But turning this into War Thunder would mean I stop playing and look for something else, something like... DCS -
Oh I completely agree. The solution would be to render the IHADSS in 2D without any depth during boresighting, which would solve it both for 2D and VR, and regardless of what eye you've set the IHADSS to render for. That's something ED would have to implement.
-
I showed half a dozen people this screenshot and each and every one of them now has no problem aligning in VR anymore: The only caveat is that you need IHADSS on both eyes, and if you have a strong single eye dominance, you might have to close one eye at a time to align the crosshairs as shown. My guess is that with right eye only rendering, you would need to align the right crosshair as shown on the image, instead of onto the center of the alignment bullseye.
-
That does sound like IHADSS alignment issue? Are you sure you're aligned properly? If you put Aquisition Source to TADSS, does the cross in your IHADSS slave to where you tell him to? FYI, with the latest update I am getting much more consistent behavior. I haven't had George refuse to fire yet. The only thing I noticed is that sometimes after repeated shots, the hellfire doesn't seem to immediately pick up the laser (no obstruction, no vegetation, range < 7000). In those cases I just have to be patient, and the box becomes large after a few seconds. Since I don't know if this is an actual limitation of the sensor, I don't know if it's a bug or just how things should be. Plus it fixes itself so... I am no longer frustrated
-
Are there any plans to implement the articulation of the Hellfire laser seeker?
-
- 5
-
-
Hmm... Well he did say "Engaging..." and he did see the target and had the TADS pointing at it. If he has LOS issues, it would be helpful if he said something to that effect, just like he says when out of range.
-
investigating Engine RPM stuck at 210% after getting shot
Toumal replied to FalcoGer's topic in Bugs and Problems
@BIGNEWYIf the track file doesn't download for you, please go to http://hoxdna.org/dcstracks/ and download the "PVE Syria" track file from the file list. -
Sorry, something doesn't work with the forum link. But can you visit http://hoxdna.org/dcstracks/ and download the track file Caucasus_Dynamic_Conflict_v1.8.5_BW-20220322-140331.trk from the file listing please?
-
My track file starts with LOBL, then I switched to LOAL, and I also tried cycling master arm, no joy. The only thing he eventually fired was the cannon when I got close enough for that. I'm still not sure whether it's a bug or just something I missed.
-
I can NOT confirm this. In fact, I know it's not the case. I used to do this and the result is that George doesn't look where you tell him to and the gun doesn't fire where you aim. I initially thought that George is bugged but no, it was just wrong alignment. If you're lucky he's just off by a little bit, but if you're unlucky he aims way low or way high relative to your crosshair. I have to agree, though personally I don't have that problem I had people on my server say they saw only one crosshair. That threw me for a loop for quite a bit, until we all realized that it was an eye dominance issue. Closing one eye at time helps, but it makes alignment even harder since in VR, you have to aim left and right of the outer circles, at equal distances. It's really fiddly if you have a major eye dominance. A solution could be that during alignment, the IHADDS is rendered in 2D without any depth, so you can just put a single crosshair into the very center and press cursor enter. Then it could switch back to 3d depth rendering.
-
Well in my track the target wasn't really that low, and it wasn't super close. I started trying to engage at 8000.
-
investigating Engine RPM stuck at 210% after getting shot
Toumal replied to FalcoGer's topic in Bugs and Problems
I experienced this as well, wasn't able to shut down the engine at all. I simply switched to another bird. Track file: http://hoxdna.org/dcstracks/PVE Syria---by Stix-20220320-133755.trk I get shot up somewhere on a hill, then RTB with one engine, and then I could not shut it off. -
I have a track file for you! http://hoxdna.org/dcstracks/Caucasus_Dynamic_Conflict_v1.8.5_BW-20220322-140331.trk In it, George has a solid big box, hellfires are WASd up, weapons armed, we are 5000 meters away, and George goes "engaging target".... then nothing happens. I try manual consent, ROE free, etc. no joy. Eventually I fire rockets manually from the pilot seat in frustration, and then try George to use guns which he then does. The track file has the complete cold startup too.