Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by JB47394

  1. I have always found the AI to be infuriating in their preference to engage enemies versus going where they're told. They just don't prioritize as I'd like them to. If you can't ever seem to get the AI to go where you need them, try the following. _group setSpeedMode "full"; { private _soldier = _x; _soldier setUnitPos "up"; { _soldier disableAI _x } foreach ["cover", "suppression", "target", "autotarget", "autocombat"]; } foreach units _group; This is the most aggressive form of this technique. It says "don't worry about getting shot, and don't engage anyone, just move". There may well be more refined versions of this. Note that this makes sure they run to their waypoint. They will ignore everything and just run. If you try this in the editor, you'll see them running right past enemies who will turn and shoot them dead. It's "careless" at a run. The more advanced use of this has the AI reacting to serious threats such that they revert to their normal behavior - which I certainly want. That involves the use of event handlers to turn those AI capabilities back. Some of the event handlers of interest are: 1. FiredNear - when there is gunfire close to the soldier 2. Hit - when the soldier is wounded. This can be filtered to determine if the damage comes from friend, foe or environment. 3. Killed - when the soldier is killed. Again, filtering can be used. If you want your AI to abandon their waypoint fairly easily, use FiredNear or Hit. Hit can be tuned for specific levels of damage, right down to specific body parts. If you want the group to be pretty hardcore about reaching their waypoint, used Killed. If you want them to be mindless zealots, don't enable the AI capabilities until they reach the waypoint via setWaypointStatements . This can also be handy for getting soldiers to flee when you want them to - because they prioritize their waypoints above all else. This is the code I use to get a group of infantry moving until one of them is killed by enemy fire. GroupAdvance = { params ["_group"]; private _soldier = objNull; private _handler = -1; _group setSpeedMode "full"; { _soldier = _x; { _soldier disableAI _x } foreach ["cover", "suppression", "target", "autotarget", "autocombat"]; _soldier setUnitPos "up"; _handler = _soldier addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator"]; if (not isNull _instigator && { side group _instigator != side group _unit }) then { [group _unit] call GroupEngage }; }]; _soldier setVariable ["AdvanceHandler", _handler]; } foreach units _group; }; GroupEngage = { params ["_group"]; private _soldier = objNull; { _soldier = _x; { _soldier enableAI _x } foreach ["cover", "suppression", "target", "autotarget", "autocombat"]; _soldier removeEventHandler ["Killed", _soldier getVariable ["AdvanceHandler", -1]]; } foreach units _group; }; For novices, you would use the following on a group that you have a reference to in the variable "_group"; [_group] call GroupAdvance; Once you do that, that group will follow their waypoints until one of their members is shot dead. I leave it to the reader to figure out how to have them react to FiredNear, Hit or any other event.
  2. JB47394

    Detect weapon reloading

    Unrelated to Taylor's work, I'm trying to reload AI when they're dry on their primaryWeapon. The sequence for a unit loading its final magazine is as follows: 1. Unit runs out of ammo in the weapon. "ammo" returns 0. 2. Unit starts reloading animation. "magazines" returns []. 3. Unit stays at "ammo" 0 and "magazines" [] until the reloading animation is completed. 4. Unit completes reloading animation. "ammo" return N. During step 3, the unit appears to be out of ammo because the scripts cannot observe the magazine in its limbo state. I don't know the implications internal to ARMA, but leaving the magazine in "magazines" until the moment that "ammo" changes would be preferred over the current behavior. Note that this isn't an issue in my use case because I have an infinite supply of ammunition to give my units. In an attempt to locate a rigorous solution, I looked at weapon data and saw a reloadTime (which is always 0.15), as well as a reloadAction that references something in CfgGestures, but none of the data seems to match the reload duration.
  3. I've got a CUP CDF transport. CDF is a west faction. I have a driver group for the driver, and a passenger group for the back, both from CDF units. They are each created in turn and the units are moved into the transport. If both of those groups are side west, then everyone loads up and the vehicle drives off happily. If both of those groups are side east, then about 50% of the time, the leader of the group in back will dismount almost immediately. As it doesn't always happen, I'm assuming that there's some kind of timing issue within ARMA. Has anyone seen this, and does anyone have a workaround for it that doesn't involve modding CDF into an east faction or creating east units with CDF gear or anything else draconian like that? The mount process involves createGroup east, createUnit into the group, addVehicle the transport to the group, and the appropriate assignAs and moveIn commands to load the units.
  4. Yeah, that's always been in there. I went through a long list of possibilities, including allowGetIn, orderGetIn, allowCrewInImmobile, seat locking and even disableAI "all". Even disabling the AI doesn't slow them down at all; they go through a dismount animation anyway, then freeze. I eventually got the passengers to stay in the vehicle. The way that was not working was to create a unit in the group, joinSilent the group, stuff the unit into the vehicle, repeat. The way that now works is to create a unit in the group, joinSilent the group, repeat. When I have the entire group assembled, sleep for 0.1s * number units in the group, then stuff all the units into the vehicle. This is only done if the unit faction is not the same side as the group. If the sides are the same, the sleep is skipped. The sleep delay was determined experimentally. I have a one-unit driver group and a 10-unit passenger group. I noticed that the driver group was never dismounting, while the large group required at least a 0.9 second delay. So I tried the 0.1s per unit and it worked in my editor tests for a few different sized groups. I detest the heebie-jeebie incantation approach to making this work, so if anyone knows what condition I need to actually wait for, I'd appreciate a reply here.
  5. The source code for BIS_fnc_unitCapture is available through the functions viewer. The code that does the actual capture is about 20 lines long, but here's the line you want: [[(_timeCur + _timeOffset), (getPosASL _unit), vectorDir _unit, vectorUp _unit, velocity _unit]]
  6. Does anyone know if the ability to draw circles onto the terrain (not the map) is available to scripts? Zeus does this when placing fire support, and I'd love to use that same ability to demarcate interesting regions. I've seen it done on one of Quicksilver's servers, but the mission file was encrypted so I don't know the technique that was used. Perhaps it was a server-side mod.
  7. JB47394

    AI Discussion (dev branch)

    Here's the list, updated as of January 1, 2020. That doesn't mean that they tested everything on the list on that day. It means that they're still tracking AI behavior to some degree in an effort to reflect the latest behaviors. I just ran a smoke test against a fire team group of CSAT, all on a vanilla dedicated server. The distance was about 15 meters and I used three white smoke grenades to create a pretty healthy amount of smoke. There was a light breeze that caused the smoke to work like a low wall. My character was prone, stationary and not firing. I watched in Zeus. In that test, the AI that could see through the smoke fired at me. The ones that could not did not fire and wouldn't even track me. One AI that moved up into the middle of the smoke was able to see me because the breeze was preventing the smoke from rising up into his line of sight. As the smoke blew this way and that, the AI would start and stop firing at me, appropriate to whether the smoke was in the way. So my above theory about AI telling each other where the players are seems to be rubbish, at least according to my latest test. Possible explanations for why AI can hit you when you have smoke out. 1. You're firing or otherwise making noise that they use to locate you 2. You're moving, which the AI might be able to use to locate you. 3. The AI might perceive smoke differently than we do on the screen, allowing them to 'see' us under certain circumstances. 4. The AI that you thought shot you wasn't actually the one that shot you. Note that I ran the test with the AI running on the server. Both server and client processes were on the same machine, but they were separate processes. I also ran this test in an editor multiplayer setup and got the same results. All this said, AI do seem to get erratic when the server is heavily loaded. They won't head out to a distant waypoint because they can't seem to get enough computes to figure out a path. Or they're sluggish in responding to enemy fire. And so on. I'd be surprised if they saw through smoke as a result of server load, but if Bohemia coded it wrong then it could certainly happen. For example, if they don't have enough computes to check smoke and just decide to skip that step then you'd have AI firing through smoke. Or perhaps they reduce the number of smoke "puffs" that they check. Who knows?
  8. JB47394

    AI Discussion (dev branch)

    I apologize for not having a link, but somebody did a survey of AI behaviors and my recollection is that a single AI will not see through smoke. However, with the ARMA "group think" behavior, if one AI knows about your location, all AI in the group knows about it. So it works a bit like this. AI 1: He's at [10711.4,5301.1,110.6]. AI 2: I can't see him. There's smoke. AI 1: Just trust me. He's there. AI 2: Okay. AI 2: <headshots player through smoke> If you mess with the "commanding" skill, it should slow down the rate at which any given AI shares information with other AI, but I have no idea what the impact might be. The wiki only says that the skill "Affects how quickly recognized targets are shared with the group" You could also put every AI into its own group, but that would come at a higher computational cost.
  9. I'd appreciate some help with a problem that has vexed me intermittently for months. I'm running vanilla ARMA 3 through the editor in multiplayer with my own scripts. I'm spawning vehicles for a variety of purposes. Spawn one up, give it a waypoint and off it goes. But not always. I have one staring at me right now that has the problem of never moving from its spawn location (a road). My scripts ran to spawn it, give it a crew and doMove it. It didn't move. I've relocated it via Zeus, removed the AI crew and have been poking and prodding it via Zeus and the console, trying to figure out how to get it to move, but with no success. The vehicle in question is the Tempest (Device), but it really doesn't matter which vehicle I spawn. Ifrits seem to be the worst for this problem, and Marids almost never have a problem. The real problem is that the engine refuses to start. It has fuel. It is undamaged. (getAllHitPointsDamage and damage) I checked the rpt file and there are no messages from ARMA at the point where I spawn the vehicle. What works: I can get in as driver or passenger. I can change seats while in the vehicle I can look at the vehicle inventory both when in or out of the vehicle I can Get out and Eject I can see the Device fans turning. I can get the Engine on option, but it does not start the engine and no Engine off option ever appears. cursortarget engineon true also does not start the engine. I've done each of the following, subsequently trying to start the engine. None have had an effect. I've lifted the vehicle off the ground a meter and dropped it I've used Zeus to damage it to half health I've used Zeus to restore it to full health I've manually shot out the engine such that it was at damage level 1 (via getAllHitPointsDamage) I've used the console to restore the engine to full health (via setDamage) I've used the console to run a little script that keeps turning the engine on every 0.1 seconds (engineOn), while kicking out a systemchat message showing the isEngineOn state of the vehicle. Checking immediately after the engineOn call shows that the engine is on. Sleeping 0.1 second and checking it again shows that the engine is off. What other things can I look at on a vanilla ARMA vehicle using Zeus and the console? Any suggestions would be appreciated because I'd really like to nail this while I've got the malfunctioning vehicle. One more data point is that while I've been doing all this testing and what-not, an AI decided to walk the 10km from the mission site, get in the vehicle and try to drive it off. He couldn't get it started either.
  10. I'm trying to reuse the RscDisplayConfigure dialog box. It's the one that lets players change keyboard bindings. I'm using it as a basis for setting mission-specific keybindings in a package that players will be familiar with. I don't actually use it for much other than showing the lists of mission-specific actions that players can bind. The complication comes in when trying to load the list box showing the actions and their current key bindings. It's a straight listbox, not a listnbox, and it appears to use an ancient capability of list boxes to have two columns. This is configured via the attributes mainCollumW [sic] and secndCollumW [sic]. My problem is loading the control. A straight lbAdd isn't going to get anything loaded into the second column. I've tried all sorts of notation silliness such as a comma-separated list, a tab-separated list, an array (syntax error), and even a string of an array (both single and double quote versions). Does anyone know how to work with a two-column listbox? I can hack things up and swap out the listbox for a listnbox, but it doesn't look the same. A listnbox will select the entire row while the two-column listbox only selects the first column. So I'm trying to find an old timer who figured this out.
  11. Thanks for the information, Larrow. The resulting "right" text is right justified and, as you pointed out, the entire row is selected on a click. As I cannot seem to duplicate the interface, I'll just build one around ListNBox.
  12. Released. The new update produced the change. 1.96.146070
  13. I cannot use createVehicleLocal in a multiplayer game run through the editor. The command returns objNull. To test this, I ran an empty VR world with one character of type "B_G_Survivor_F" and used the debug console to LOCAL EXEC the command typeOf player createVehicleLocal (player modelToWorld [5,0,0]) In single player that works. In multiplayer that does not. Each mission system that I have that relies on createVehicleLocal has stopped functioning in editor multiplayer sessions but continues to work normally in dedicated server multiplayer sessions. Needless to say, having to reload a dedicated server for every code change won't do much for my productivity.
  14. As development appears to be winding down, there's one thing that I'd really like to see from ARMA in the realm of audio changes. The volume of the Direct channel. It's not usable as it is. If you're standing next to someone in a calm area, then yes, you can speak to them. But the volume needs to be much higher - or tunable by script. As a reference go by the radio mods available. Their direct volume is much higher and it works. Those of us unable to use radio mods are relying on the game channels, and that means that we must use the Group channel because Direct is unusable. I fear this is one of those things where the ARMA code just won't allow such a change without breaking other things, but it's something that I'd really like to see fixed before the product finally lapses into a development coma. Naturally, if there's some existing means of boosting the volume of Direct without affecting anything else, I'd love to hear about it. EDIT: It looks like there's a way to increase the volume of the Direct channel. It is accomplished by having each player increase their game's EFFECTS volume, and then using fadeSound in the mission scripts. Because fadeSound doesn't appear to affect the volume of the Direct channel, the net effect of doing these two things is to raise the volume of the Direct channel. We were playing with this last night and by setting the EFFECTS volume to 50% and using a fadeSound of 0.2 (80% reduction in volume), both direct channel and world volume levels seems to be pretty reasonable. This was while using the JSRS sound mod, which I think is even louder than the vanilla sound effects. Putting earplugs in calls for an even more severe fadeSound. If anyone knows of any hitches in doing things like this (other than deafening players when they move to a different server), please let me know.
  15. JB47394

    Make all DLC Maps Free

    The base post is pointing out a real problem, which is that the current DLC system contributes to a fracturing of the player community. Everyone wants those who build content to be compensated, but there are other fee structures possible. Server operators could pay for the right to host a Livonia map, transferring the cost of map development to multiplayer operators. If you want to play solo, you pay only for the cost of the base game, which includes all future content. If you want to run a game with your buddy, you pay for 2 Livonia slots at perhaps $5 per slot. You can play with that buddy, or with a different buddy, but never more than 2 players on that map. If you want to play with 4 other friends on Tanoa, you pay for 5 Tanoa slots at perhaps $4 per slot - whatever is appropriate to the map. Stratis slots are cheap, at $1 per slot. Big operators drop a few hundred dollars to configure the server so that a hundred players can connect. None of those players has to pay for the map because they already have all standard maps available to them for fee on the client side. This would mean that if there are 10,000 total multiplayer slots for Livonia maps, then Bohemia would see $50,000 as payment for Livonia. I'm just making up numbers. In contrast, if there are 50,000 players and they all buy the Livonia DLC, then Bohemia sees $250,000. But all 50,000 players won't pay for the DLC. Perhaps only 10,000 pay, meaning that Bohemia would see the same revenue either way - but the player community wouldn't be as fractured as it is with the current DLC payment system. Instead of fracturing, there would be an additional headwind to server sizes (server operators would have to pay more for larger servers). But server operators already have to pay more for a larger computer to handle a larger number of slots, so having server operators pay for slots would be a natural tie-in. And the slot payments would be one-time instead of monthly or annual - though that's another possible fee structure. I'm sure there are many other possible ways to fund development of maps, including the equivalent of a Kickstarter system where Bohemia puts up suggested environments, and players pledge money to get those environments built. Done that way, modders might be able to run some Kickstarters of their own. Then there's the blackmail approach, which is to remind the player about payment, as Bohemia does with various DLC content. Perhaps paid server slots aren't the solution either, but the current DLC system does have consequences for the player experience.
  16. JB47394

    AI Discussion (dev branch)

    I'm not permitted to use mods on this server, and I'm unaware of any way for a mission PBO to modify config entries. If there's a way, I'd love to hear about it.
  17. JB47394

    AI Discussion (dev branch)

    My vanilla configFile entry for that path has no values or subkeys. Should I expect values to be listed, or are the vanilla brains using the internal defaults of the engine? And are the values you show the engine defaults? Only the AIBrainCountermeasuresComponent entry has any values. maxReactionTime, etc.
  18. This is where I need to be really careful not to rant. I've reported some fundamental bugs, and the reports go unheeded. For example, an unclosed curly brace will cause an SQF file to not load, and to produce no error. I hate to think how many hours of my life were wasted chasing down that one before I figured out the underlying problem. Also, if you end a code block with an assignment statement, the result of that code block is undefined. Not nil, but undefined. Another needless waste of a chunk of my life. Then there's the parser wigging out if you attempt to create a quote string with single-quote-double-quote-single-quote. It needs to be four double-quotes. There are also some trivial ones that would really help with our mission gameplay such as the T-100 Varsuk not being able to fly a flag. We rely on those to avoid friendly fire incidents. The only response was "We'll look at it". That was a year ago. Just too many bugs.
  19. Heh. I'd prefer to see "ainvpknlmstpslaywnondnon_medicother" not have the medic reach through his body with his left hand to hold the rifle slung on his right side. The animation is fine if no rifle is slung and it's also fine if the medic is holding a pistol while a rifle is slung. It's just being unarmed with a rifle slung that throws it off. Then there's switching to a pistol from no weapon while kneeling, which goes through a launcher animation before drawing the pistol. Ironically, if healing someone with a pistol out while kneeling, the medic will holster the pistol, perform the heal, and smoothly draw the pistol again. No launcher animation. Drawing a pistol while standing or prone works fine. Oh, and add the multiplayer aspect of getting into the back of a truck. The player getting in will see the mounting animation, but everyone else just sees him standing until his character teleports into the vehicle. That's just off the top of my head. I better stop before I start ranting.
  20. Yes. Once or twice I've been one-shot by AI at close range without a sound, and I've certainly had times when my suppressed CAR-95-1 is firing on full auto without making a sound. I can only imagine that this is a result of some recent fix or performance improvement because the bulk of the sound dropouts on my suppressed weapon occur when the sounds of battle are raging. I consider it a bug because the dropout is abrupt and I always do a double take to make sure that I'm actually firing. There's just not enough visual recoil on that weapon to use that as a cue. I certainly can't rely on the tactile feedback of recoil.
  21. I also see units going unresponsive to waypoints from time to time when they have AI features disabled. I disable "cover", "suppression", "target", "autotarget" and "autocombat". I'll have to play with enabling different permutations of those features to see if that gets them moving again. Occasionally I can move their waypoint with Zeus and they'll get moving.
  22. When a weapon is removed (removeWeaponTurret), ARMA leaves the weapon's magazines in place, complete with partial ammunition counts. So when you add the weapon back (addWeaponTurret), the original magazine is instantly loaded. If a player is in the turret, all they see is that they either have or don't have access to a particular weapon. There's no need to fiddle with magazines or ammunition counts. For anyone fooling with this, remember that those two commands must be run locally to the turret. Use turretOwner to figure out where to remoteExec the commands. So the real complexity of weapon control systems is in the user interface and knowing how to get the commands executed on the right computer. For single player, the latter can be ignored.
  23. Remove the weapons. We have a weapon control system that works that way and it sure seems like the simplest solution. Part of the appeal of fiddling with the weapons directly is that when they're put back they're instantly loaded.
  24. Can the ScrollBar on an RscNListBox be accessed as a control such that I can use commands like sliderPosition? Alternately, is there any way to find out where the list box's slider is positioned, or even which set of list box items are visible? I want to be able to figure out which list item is under the mouse cursor. Straight math can tell me which row of the control the mouse is over, but not which row of the items. I've tried hunting down the ScrollBar without luck. allControls on my display doesn't turn anything up. I'm assuming that ScrollBar on RscNListBox is just a notation and is unrelated to controls. Throwing slider commands at the RscNListBox didn't appear to work either.
  25. If I turn off simulation for a boat while a player is nearby, the sound of lapping water follows the player around, even through respawns. 1. I've deleted all (getPos player) nearestObject -1 objects 2. Nothing is attached to the player (attachedObjects player) 3. diag_activeSQFScripts shows only my own scripts 4. allMissionObjects "" shows only normally-typed mission objects or roads (typeof == ""). Does anyone know where this sound is coming from and whether scripts can get access to it to turn it off?