#arma3_feedback_tracker
1 messages ยท Page 5 of 1
compile
yeah.
Or just have "funcname" and the script could detect it and resolve that through to the real function
no syntax highlight ๐
Well if you want to deal with config, you'll have to deal with config no matter what
btw about the destruction, does the game destroy the missionNamespace first then objects, etc.?
or if it wants to destroy an object, ctrl, display, etc., does it destroy its variables list first?
I don't think that is.. properly defined
We added a.. destructor eventhandler for displays? or controls? smth like that?
recently and it made stuff crash quite a bit because of the ordering
So in general, the order of destruction will be 
Also because of ref counting. A hashmap might be referenced in missionnamespace, there might also be a reference in a spawned script or on an object or on a control.
Even if you know that namespace is destructed before objects. You don't know if there is an object that also holds a reference
Simple solution, don't call destructor at all on mission end.
Only call it when
_value = nil makes it be deleted
But again, you'll have that references mess, unlike object/location/config there is no way to have a weak reference (without introducing a whole new datatype)
if you take care where you store references to the map, and how you null it out, it'll be fine.
But if you, or any mod/script grabbing your map doesn't... welp
Now you know why I said destructor will be hard ๐
_value call ["destructor", []] and remove anything you need in the destructor 
Well.. tru you could "null" it out, by just doing a "delete" by calling destructor manually :x
But that kinda defeats the purpose of having the cool "ah this went out of scope" thing
I will try to implement destructor like you imagined, we will see where it dies.
Worst case I disable the destruct on mission end thing, and you'll have to live with everything collapsing if other scripts grab and store a reference to your object. Already added stuff to do the same with that control/display whateveritwas
destructor will be unscheduled 
Well it'll be documented so gonna be fine
will it now
_class = [
["Method", {diag_log "Oh I'm a method!"; _thisObj set ["identifier", _this];}],
["destructor", {diag_log ["goodbye", _thisObj get "identifier"]}]
];
call {
_myObject = createHashMapFromArray _class;
_myObject call ["Method", "hello"];
}
14:47:13 "Oh I'm a method!"
14:47:22 ["goodbye","hello"]
This was already chaos XD
When a refcount goes to zero it gets destructed.
Inside destructor, I call the destructor script, which gets the object as argument, meaning the refcount increases.
When the destructor call is done, the refcount decreases again, tries to delete again... ๐
Also, after the destructor call, the map will be gone.
If you save it into a variable, from inside the destructor call, and that variable survives outside the destructor.. omg
I'll probably have to workaround that, end result being that destructor can run multiple times, if you let the object value escape
If you save it into a variable, from inside the destructor call
force it to no copy before calling destructor?
_x = _y
is not a copy
Like... ๐ if anyone does this.. but.. it works.. ish..
_class = [
["Method", {diag_log "Oh I'm a method!"; _thisObj set ["identifier", _this];}],
["destructor", {diag_log ["goodbye", _thisObj get "identifier"]; _dangerEscape = _thisObj;}]
];
_dangerEscape = 0;
call {
_myObject = createHashMapFromArray _class;
_myObject call ["Method", "hello"];
}
14:57:10 "Oh I'm a method!"
14:57:10 ["goodbye","hello"]
14:57:10 ["goodbye","hello"]
Also thinking about it. Spawning a new copy from destructor should be valid right? ๐ค
I don't think that does any harm (besides on mission end. But I now disabled destructors on mission end)
I'm trying to think of a way to get away from this without having to add a new command to create object ๐คฃ
But probably bad idea anyway, also its easier to add hashmap commands :3
you still need one to call constructor :\
yes that later
Giv description for call command
"Calls hashmap value with CODE type."
sounds sad
my brain can't
Calls the code value that corresponds to the provided hashmap key. The magic variable _thisObj can be used to access the hashmap inside the code 
hashmap call [key, args]
idk I can't think of anything good either
btw it will work with any key type right? not just string? _hashmap call [0, []]?
Well its just for the ingame. So the first sentence looks good.
yes.. if you really wish to do that xD
oh nvm it doesn't, I did a string type check.
Fixed now though
Wouldn't it be more in line with what we already have to do _args call [_hashmap, _key]?
I suggested the other one because it's like set and get
and thus looks more consistent
true.. but.. we're building a new hot thing but..
"object call X with args"
makes more sense to me than
"args call object's x"
it doesn't fit to old call usage, but it fits to general OOP'ness and hashmap usage
Yeah maybe. Somehow I don't like the whole idea of this.
_class = [
["Method", {diag_log "Oh I'm a method!"; _thisObj set ["identifier", _this];}],
["constructor", {diag_log ["Hello!", _this];}],
["destructor", {diag_log ["goodbye", _thisObj get "identifier"]; _dangerEscape = _thisObj;}]
];
_dangerEscape = 0;
call {
_myObject = createHashMapObject [_class, "args"];
_myObject call ["Method", "hello"];
}
16:33:45 ["Hello!","args"]
16:33:45 "Oh I'm a method!"
16:33:45 ["goodbye","hello"]
16:33:45 ["goodbye","hello"]
I'm done for today so... Discuss!
is constructor scheduled?
I guess inherits current environment.
imo constr and destr should be unschd
btw _thisObj is private right?! ๐
same as _this
constructor is currently unscheduled. But I can easily make it scheduled
call supports scheduled
destructor must be unscheduled
no unschd constructor is fine imo
as long as the c.....
the create function must return a value, so I cannot make it scheduled (unless I do way more work that I don't want to do)
all scheduled commands return nothing.. though I maybe can leave something on the stack and make the call discard the return value.. huff
if anyone wants schd they can call a method afterwards 
I cannot make it scheduled
by scheduled, I meant same as current environment, likecall
no I mean I cannot
unless the unless i wrote
because commands that support scheduled (like then, call, while) all return nil and cannot return a value. And need extra stuff that pushes result on stack and bla bla bla
I have to implement alot more code to support that. I will probably do that for constructor, we'll see
nah just leave the constructor unschd
^
that makes it ugly. And that means the caller has to consider a "internal" implementation detail inside the class
though tbf if it requires scheduled, calling from unscheduled would also mean you need to consider that detail.. so eh
I'm fine with unscheduled too, but more support would always be nicer
createHashMapObject [_class, "args", _isScheduled]; 
if i support scheduled.
You can have the class be done initializing after the creation (which may suspend). And you can handle call from unscheduled by checking for it.
If i don't support it, you'd need to have everyone basically manually call the real constructor after creating the object.
Mh you could cheat it...
_this pushBack [] spawn {...};
WaitUntilDone (_args select 3)
but again, implementation detail leaking into usage is crusty
My brain is confident that scheduled support is better
what if you have two scheduled scripts setting same variables at the same time, is that possible to happen?
No. Scheduled scripts don't run in parallel, there is always ever only one script executing
If i don't support it, you'd need to have everyone basically manually call the real constructor after creating the object.
I do not understand this part. Why not supporting scheduled means that.
You expect that construction is finished after object is created.
Constructor //1
CreateObject //2
//3
You expect 2/1/3 ordering.
But if you need scheduled...
Constructor: [] spawn {//1}
createObject //2
//3
You will get 2/3/1
At 3 you will use the object and expect it to be initialized
If you need scheduled you still need to check for canSuspend in case you're created in unscheduled.
But at least you can use scheduled at all, and let's be frank, most code runs scheduled, which is generally a good thing
But if you support only unscheduled the construction will be finished once object is created, right? Did I understood it backwards?
Yes, but you loose the option of being able to do scheduled wait things
Like.. hey i know it's probably stoop but.
What if you wanted to implement a mutex in scheduled, it has to wait in constructor for slot to be free
_constructor = {
_thisObj set ["constructScript", _this spawn {}];
};
waitUntil {scriptDone (_obj get "constructScript")};

sleeping in like an initialization of an object seems weird.
It doesn't do any harm to support it besides annoying my brain that i have to write code.
And it makes it more versatile so no contra arguments allowed
But then somebody does sleep 1 in object constructor.
I run this in unsched.
What happens?
Yeah again, then you need to respect implementation detail on every usage.
Might as well not use an object if you manually call a func anyway
Same as a call in unsched, that's not new
There is a difference between "you can only use this object in scheduled" and "you need to call this thing every time you create this object because we couldn't put it in the constructor oh and btw you can only use this object in scheduled"
Both sucks.
But one sucks less
TBH I'm bigger fan of your first idea about the "EH" for variable destruction. Feeling like it would be enough, if somebody needs OOP he will create one with this.
This current idea... I feel like it will only result in even more spaghetti code being around.
This whole OOP feels weird in SQF with scheduled/unscheduled and all its quirks.
๐ซ
I mean..
If we already have a flag for NoCopy, i can also add a flag to force the constructor to run unscheduled
If you want to be unscheduled and don't want to pay for a canSuspend check
isNil {} is cheap ;D
But it's cheaper to not do it at all :3
And it could also handle all methods too
Maybe we also need a disable serialization flag or so :3
I have 62 bits to spare so.. whatever you can come up with that might make sense
canDeployWeapon exists. by chance is the deployment position already calculated, and hopefully easily made accessible?
not a bad request @tropic jewel , even if its just to know how its calculated so we can run our own "lineIntersectsSurfaces"
Is possible to have an alt syntax of "setvehiclecargo" which doesnt apply the after-effect scripting? my use is to unload a "vehicle cargo" child object directly from the parent object. if we just use "detach" then there are mass issues on the parent vehicle (setvehiclecargo applies mass)
so for instance to unload, we need to go objnull setvehiclecargo <child> first
but doing that applies some scripting, like setting the position and if above terrain level, adding a parachute
i want a syntax for setvehiclecargo to detach the object, do its mass calc, and then nothing else (no pos setting and no parachute)
also an "attach/detach" event handler would be great
Yes! FT ticket please
with script command syntax, bonus points if you can fit it without creating a new command ๐
inb4 setDammage overload
u seem to love that jok
it's still a strong one inside BI
Can imagine
Scheduled scripts are fun
_a = [];
_b = _a;
_a pushBack 1;
_a // [1]
_b // [1]
```right?
Well. Unless
```sqf
_a = [];
_b = _a;
// Save game, and reload
_a pushBack 1;
_a // [1]
_b // []
oh no
_class = [
["Method", {diag_log "Oh I'm a method!"; _thisObj set ["identifier", _this];}],
["constructor", {diag_log ["Hello!", _this]; sleep 2; diag_log "done constructing";}],
["destructor", {diag_log ["goodbye", _thisObj get "identifier"];}]
];
call {
_myObject = createHashMapObject [_class, "args"];
_myObject call ["Method", "hello"];
}
``` ```11:55:09 ["Hello!","args"]
11:55:11 "done constructing"
11:55:11 "Oh I'm a method!"
11:55:11 ["goodbye","hello"]
๐ซ
About the nocopy thing, I'd say +_object throws an error (that doesn't kill the script) and returns a reference instead ๐ค
I'd say kill the script ๐
anyone who wants to copy something probably wants to do something bad
ClassDef = [
["Method", {diag_log ["Method", canSuspend];}],
["constructor", {diag_log ["Hello!", canSuspend];}],
["destructor", {diag_log ["goodbye", canSuspend];}]
];
[] spawn {
_myObject = createHashMapObject [ClassDef, "args"];
_myObject call ["Method", "hello"];
}
````12:44:15 ["Hello!",true]`
`12:44:15 ["Method",true]`
`12:44:15 ["goodbye",false]`
```sqf
ClassDef = [
["Method", {diag_log ["Method", canSuspend];}],
["constructor", {diag_log ["Hello!", canSuspend];}],
["destructor", {diag_log ["goodbye", canSuspend];}],
["flags", ["unscheduled"]]
];
[] spawn {
_myObject = createHashMapObject [ClassDef, "args"];
_myObject call ["Method", "hello"];
}
````12:45:06 ["Hello!",false]`
`12:45:06 ["Method",false]`
`12:45:06 ["goodbye",false]`
why did you make everything unschd?!
because people may want that
For example ACE/TFAR have quite a few places where they need to check if call is scheduled, and then transform it into unscheduled.
So if you know you want unscheduled, you can get it with simple flag.
If you only want specific methods to be unscheduled, you can use isNil in there, but if you need alot you can solve it with flag and don't need to add code everywhere
ACE/TFAR have quite a few places where they need to check if call is scheduled, and then transform it into unscheduled.
putting a simple isNil is faster than checking
yes, but you can also not do it at all if you need it everywhere
So there, flag
Don't have to use it if you don't want, we have 60 flags remaining so doesn't hurt
Interesting, i wouldn't have expected _b to also update when _a is updated (first case)
When we create a readOnly hashmap.. That has arrays or other hashmaps as values.
Need to deepcopy these values too and make them readOnly too 
That's why I didn't do it back then
I think readOnly should only apply to its keys, i.e. not adding anything new to it or removing any keys 
But when you have
["value", [1,2,3]]
you can
(_map get "value") pushBack 4
even on a readonly map, you can modify the contents of a readonly map then
texts can be modified by ref too ๐ฅฒ

Deepcopy doesn't actually copy text types.
Not for array deepcopy either
the engine can't even do it ๐
Text copy method, returns reference to same text, it doesn't even copy
I shall leave that bug be bugged
wait but does it mean the hashmap class can't modify itself anymore?!
what would be the point?
anyway I think a new flag can be added called "sealed" that does this
btw do you think it's possible to prevent member access from outside?! 
or I guess it should be done via wrapper functions...
In theory yes, but I don't want to pay for that check on all get's
although that check is really cheap
well for example if you prefix a member name: ~method it becomes private 
or #method
nope.
the _thisObj call... doesn't know if it was called from inside a method inside the same class, or from anywhere else
yeah I figured
it feels so ugly to reuse compileFinal hashMap but.. you're literally making it final so that command keeps doing what it has always done, just the compile name is a bit unfitting
I don't want to add a new command for a thing that we already have a command for that does the same thing
will it work on arrays too?!
For now I only want to add CODE and HashMap
Read-only error messages are crap....
Or atleast the old ones were
But do I want to update all the old non-hashmap ones.. eh 
yes, yes you want
I should add a proper new error message type but that is soo much extra work :u
So then you'd have to pre-define all member variables at the start and cannot add new ones or remove them.
Right? Sounds good
yeah
Now.
When you
+_object
what flags do get copied and re-applied to the resulting object..
Unscheduled flag 100%
ReadOnly flag 0%
Sealed? I think yes
all?
If you have a read-only object, I'd like a way to make a non-read-only copy that can then be used
another way to make data structure "templates" of something, you have to copy before you can sue
you have to copy before you can sue
should I show the copy to my lawyer?
Mh...
_var = compileFinal "..."
actually locks the _var so you cannot reassign anything to it.
_var = compileFinal hashMap
Should it lock the variable too or just be a read-only instance where the variable can be re-assigned, I think it should lock
I'm pretty sure that same as with compileFinal, if you make a read-only thing and put it somewhere, you probably want it to stay somewhere
And if you want it to be re-assignable... hashMap set ignores whether value is final (I should fix that for objects to block code though...) so you can store your read-only hashmap in a hashmap, and then you can replace it ๐คฃ
How do we deal with merge/insert into a sealed instance.
currently, I insert all the values, until the first violation (trying to add new key or overwriting a compileFinal'ed method) and then throw error and abort.
That means a insert or merge may half-complete. The half-complete insert already existed, if you tried to insert with some invalid key type in the middle, it would insert up to it and then abort.
Alternative would be to throw error, but then continue inserting and potentially repeat-spam errors
I prefer the errorless version
Well have to somehow tell the user that what they tried to do was invalid and didn't happen.
So both version will throw error
keys are case sensitive so
constructor
copyconstructor
destructor
flags
or
Contructor
CopyConstructor
Destructor
Flags
? I prefer the second, mostly because CopyConstructor being two words
or camelCasing
why not shorten copyConstructor? ๐
e.g onCopy ๐
cc 
why not use symbols?
constructor -> "()"
destructor -> "~"
copy -> "="
might be too unreadable?
well words are error prone, like you could get the casing or spelling wrong 
don't you dare!!! ๐
how about:
"class"
"!class" (or "~class")
"+class"?
"flags" (or "#class")
(or "obj" instead of "class")
Also, compileFinal prevents from replacing methods. But, deleteAt can delete method and then you can re-add a new one.
so compileFinal'ed methods should also be un-deletable?
I guess so?
I guess it has to be.. welp
Other idea for flag, throw error when calling unkown method, instead of silent ignore and return nil on call?
or silentErrors flag, to do the opposite and also turn off errors when you insert and try to overwrite final or sealed stuff ๐ค
So collecting some feedback.
_thisObj -> _self
sounds reasonable, but relation to thisTrigger, thisList and such
I get PHP vibes here ๐
copyconstructor -> clone
Though it would then be post-clone, not actual clone method that returns a new instance
or maybe just simple copy or copied
https://feedback.bistudio.com/T170647#2421993 Here's all the current documentation I have
tostring method, custom implementation for str _object
reserved names should have special naming to not conflict.
#constructor
#destructor
#flags
? I like #, but people may want to implement "private" methods by prefixing them with #, but really i don't know what people want ๐
or _ prefix makes most sense to me for private stuff
aren't some BIS_ or BIN_ "private" variables prefixed with #?
I would say "go for it" and if people want their own stuff they should use _ or TAG_ ๐
making them longer is not a good idea tho ๐
I'm all for making them shorter 
also constructor and destructor are hard to type 
maybe create and destroy? tho destroy is also hard to type
create and discard?
destroy is also hard to type
wat?
well if you typoed them you'd probably notice quick
delete? ๐
create and destroy sounds better
make and trash ๐
for me at least 
destory...
for some reason I always mess up things that have oy 
delete is easier to type and almost impossible to get wrong tho 
destroy may become destory like R3vo said ๐
I don't want to make crusty because people no wanna type correctly :sad:
if you add imaginary "on" prefix, they all make sense
onCreate
onClone
onDelete
onToString (eh)
delete is better, we already have precedence with Deleted EH, and deleteVehicle
actually now that they're shorter # makes sense
#create #delete #str #clone #flags
tostring sounded so nice ๐ข
but str is better I guess ye
https://feedback.bistudio.com/T170647#2421993 Updated and with example.
the parameter to clone doesn't have to be _this
it would make sense to name it _source for example. But function parameters are always _this so that may be too bad of an idea
noticed a couple of errors but sounds good
if its just typo's then doesn't matter that can be fixed later on wiki ๐
btw does it make sense to define the class it was created from? (I meant a new key #class) 
actually no nvm
could
All the keys are copied though so its kinda there
yeah that's what I meant by nvm ๐
It would be useful for non-sealed classes, to see what they started with.
You could do it yourself in constructor if you wanted (if copying is forbidden it'll be a bit more annoying :D)
When you're searching for similar issues and the closest one is from 2013 :/
@untold sky do you think it would be feasible to add third array element to getMissionLayerEntities with all groups in the layer? (or dedicated command but expanding existing commands is preffered iirc)
Currently it needs scripted handling, something like this:
https://gist.github.com/veteran29/4735d4d96add5cdf0134a834cd2f12d3#file-getmissionlayergroups-sqf
yes, ticket, if you get ticket tonight I'll do it tomorrow ๐ซ
would it be considered a bug that killing setCaptive units doesnt reduce the rating? (but continues to increase it if side relation of both groups are enemy)
in simple terms should shooting captive/"surrendered" units get punished or not
(or would such a change/fix be too risky due to setCaptive use also in other context)
I'd wager too risky for backward compatibility - use an event handler?
We dealt with it already. Asking if its worth to report or not
nay
I will add the information to the setCaptive page
Tankbuster's 2019 note has been integrated to https://community.bistudio.com/wiki/setCaptive
Would you be ok with exact same implementation (find unique groups of the units) in engine.
Or.. what about empty groups placed inside the layer in Eden, is it important to return these too? As that would need completely different solution (I already made that different solution, but lots of extra code and serialization, would be easier to just run that "script" in engine if that's sufficient
Are empty groups a thing? ๐ค I guess if the entities all got deleted, and the empty groups are still left behind...
[[B Alpha 1-1:1,B Alpha 1-1:2,B Alpha 1-2:1 (dedmen),B Alpha 1-2:2,B Alpha 1-2:3,B Alpha 1-2:4],[],[B Alpha 1-1,B Alpha 1-2]]
turns into
[[<NULL-object>,<NULL-object>,B Alpha 1-2:1 (dedmen),<NULL-object>,B Alpha 1-2:3,<NULL-object>],[],[B Alpha 1-2]]
when units die.
But the 1-1 group still exists, with 0 members inside it.
Would be good to be able to reach them... But on the other hand you can grab all your groups into gvar on mission init.
do we have a function that selects unique elements in an array
Removing duplicated? I guess arrayIntersect will do
reformatted the description to make it clearer
will arma devs be hanging around here
This is (probably) a channel dedicated to the feedback tracker, not for direct feedback.
oh ok
no its for Feeeeeedback ;)
<parent> modelPos <attached object> // [0,-3,1.56]
instead of <parent> worldToModel (getPosWorldVisual <attached object>)
is there demand for that?
make a ticket, I will overload getRelPos
@solid marten https://feedback.bistudio.com/T171193
I am wondering. Since the introduction of regex. Would it be feasible to implement wildcard support to Eden Editor search?
this is wrong tho
getPosWorld is ASL
worldToModel takes AGL
please gib worldWorldToModel 
Potential bug in append:
https://feedback.bistudio.com/T171200
it's slower than insert and + 
it probably doesn't preallocate or something?
I think this glitch is new.
Anyone else has it? It might be my FOV but I think I defaulted it.
You need a CSAT grenadier rifle, pull up grenade sights and crouch.
https://youtu.be/8NsC5gJ09SE
Shouldn't be new since is a model issue
Yup, but I think I would've noticed it before, maybe not ๐คทโโ๏ธ
is this a thing where you choose between render scope and sim scope?
i would probably prefer render scope
also doing a lot of logistics scripting these days. an โAttachTo/Detachโ mission event handler would be extremely useful
worldWorldToModel & worldWorldToModelVisual ๐ ๐
and a render scope variant for this function origin getPos [distance, heading]
origin getPosVisual [distance,heading]
unless it doesnt need one :\
even without regex we had wildcard support in some places.
yes, probably
it does.
append is actually even simpler than insert or +..
especially + should be slower, because that copies ALL elements to new array
But why is it slower than insert and +? 
The benchmarks
There's not much difference tho 
But still it is slower
@sinful kettle when you make a ticket, just pretend that we are all idiots and add steps to reproduce, please
Thats why you should include repro so we can VERIFY
So you mean I was wrong and it's not slower?
No I mean what I said
Want a ticket?
and which "some places"? ๐ค
yes, dunno but I've seen it
Got a question on Zeus not showing assets - if to report or not:
AFAIK it also checks the scope of the crew/driver for vehicles and only shows >2. This is not documented as far as I could see, but only a community understanding from trail and error.
with hasDriver=-1; there is no driver - this seems not considered by the Zeus coding and thus you cannot have "driverless/one man" vehicles exposed in Zeus as far as i can tell - can someone confirm? worth to make a ticket?
@untold sky Wildcard ticket https://feedback.bistudio.com/T171218
If someone has better/more example feel free to add them ๐
B_*_F
done
Can I also post here a FT of a possible useful feature request?
you can
At the moment there is a function called
setVehicleArmour
Uh what? https://community.bistudio.com/wiki/setVehicleArmour
no :harold:
Excuse me OFP Elite devs, what is this ๐
can someone else test this in dedi multiplayer... exec on server, ensure there are some server-side spawned units
private _unit = objNull;
{
_unit = _x;
{
_unit removeItems _x;
} forEach [
'chemlight_blue',
'chemlight_green',
'chemlight_red',
'chemlight_yellow'
];
} forEach allUnits;```
is giving me massive RPT log spam
19:07:32 Warning Message: No entry '.scope'.
19:07:32 Warning Message: '/' is not a value
19:07:32 Warning Message: Error: creating weapon chemlight_blue with scope=private```
Ask yourself this, is chemlight a weapon?
I think is a magazine since is a grenade
hmm so it is. for some reason I had treated them as items. thanks for checking
must have been fiddling with "uniqueUnitItems" prior
I see it as a way to not mix up "set damage" and "set health", (1 - damage) or (1 - health), this kind of "negative thinking" etc
@gaunt depot ref https://feedback.bistudio.com/T170754 UI2Texture aspect ratio.
If I accidentally change the size of all map drawIcon's, you would notice that right?
instead of hardcoded 640x480 I now do 640x(640*aspectRatio) which should keep the size of the icons the same, but not fully confident on that
Well it won't be gamebreaking but might break visuals in a lot of places
Yeah i hope it doesn't, which why asking so you can notify me if that happens
Probably BI missions too as they probably use drawIcon too?
Sure, I can compare my stuff with the dev branch, but more tests will be needed
the icons drawing should be good-ish now.
I can't really see the squished text that you mentioned
Didn't ACE have some extensions to map tools, ruler and all that, doesn't it use drawIcon for it too?
https://github.com/acemod/ACE3/blob/76676eee462cb0bbe400a482561c148d8652b550/addons/maptools/functions/fnc_updateMapToolMarkers.sqf#L37 seems ACE handles aspect ratio issue by itself
so they'll have to remove that fix then
Thanks I'll check that
Map texts are squished the same way as other display texts due to always rendering in 1:1 despite target texture not being 1:1. It all looks weird compared to proper map lines and grid squares in the background.
So its kind of a same issue of ui2texture not taking target resolution aspect ratio into account I guess
Also what's strange on your last screenshot is that drawIcons are squished vertically while texts are stretched vertically
Original bugged drawing has both drawIcons and texts stretched vertically
Yep it breaks ACE's thing that tries to workaround the bug by doing their own stretching
Can you adjust your repro to give me some text that you can properly see?
on it
Seems like images inside structured text also have the 640x480 hardcoded scaling ๐ค
Added big visible text in the repro in comments
_map drawIcon [
"#(argb,8,8,3)color(0,0,0,0)"
,_map getVariable "color"
,_map ctrlMapScreenToWorld [0.3, 0.3]
,1e-6
,1e-6
,0
,"drawIcon text"
,2
,0.08
,"PuristaMedium"
,"right"
];
```alongside other `drawIcon`s
Players own position marker (while inside vehicle with GPS), Tactical Ping marker on map, HTML (structured text?) images, focused marker (marker: html link in structured text, interesting didn't know that was a thing)
all have the same scaling issue, but I assume most of these are generally too small to notice
Doesn't seem too badly stretched now
Freaky Arma resolutions 
Could it be that text is already fixed on dev branch?
Map text is distorted the same way as the rest of display texts
My eyes cannot see that 
but the box around it is also stretched the same
Both numbers outside of map and "drawIcon" text are both stretched vertically
Box is 0.1x0.1 in UI coordinates
That's issue of ui2texture aspect ratios, there is no easy way to draw 1:1 UI on non-1:1 texture
Box is stretched vertically because texture is rendered into 1:2 texture (#(rgb,1024,2048,1)ui('RscDisplayEmpty','%1'))
1024x2048
If you ask me, it should just cut off right half of the UI when drawing
If you ask me, you shouldn't try to draw 1:1 UI onto 1:2 texture and expect it to look "correct" in whatever your imagination of correct is
Because different people will have different ideas of "correct"
That's why I suggested having this behaviour optional and configurable
Even if you divide all your heights by 2 to be appropriate for 1:2 aspect, texts will still be drawn in 1:1 aspect ratio
Font handling is very special and hard to influence 
Basically if I make my squares 0.1 x 0.05, text inside them will still be stretched
Repro from related ticket
Texture is 2:1 here so text is squished
Proper text is achieved by having 1:1 texture stretched vertically inside 2:1 texture
That's why I suggested to cutting off part of display instead of trying to fix aspect handling inside each UI element
This way 0.1x0.1 UI square stays square, text is drawn properly
can do, separate ticket.
probably different syntax
like
#(rgb,1024,2048,1)uisquare('RscDisplayEmpty','%1')
maybe or smth
which will internally render as 2048x2048 no matter what you said
Another way of doing it, but having displays with UI height = 2 to cover whole texture is pretty weird
Add another parameter to current procedural texture?
#(rgb,1024,2048,1)ui('RscDisplayEmpty','ca',XX)
stretch: current behaviour
cut: cut off part of display to fill texture (pic 1)
fit: resize display to fit into texture (pic 2)
I don't like adding more parameters, thats not very extendible.
Maybe uiext that has designated naming for parameters
#(rgb,1024,2048,1)uiext(displayclass:'RscDisplayEmpty',fillbehaviour:'stretch',texsuffix:'ca')
I hate this current syntax and its limitations
How about:
"myproceduraltexture" createTexture ANYTHING_WE_WANT;
_obj setObjectTexture [0, "myproceduraltexture"];
we can even have it take hashmaps for named parameters
"myproceduraltexture" createTexture createHashMapFromArray [
["procedure", "ui2texure"]
,["type", "ca"]
,["width", 1024]
,["height", 2048]
,["format", "argb"]
,["mipmaps", 4]
,["display", "RscDisplayEmpty"]
,["fill", "stretch"]
];

Who needs array as arguments when we can use hashmaps!
I'm looking at it from mission maker standpoint though, not sure how problematic it will be to use with mods.
texture must be a string because 20 years of legacy
Gonna make sure textures are generated before they're used
"myproceduraltexture" won't fit as texture name?
Then you can't pass the arguments
texture including all parameters leading to its creation must be a string
You first script create it, then use by setting your string
Have createTexture do all the creation by right operand hashmap properties
Can't
instead of parsing the string
๐ค
"myproceduraltexture" createTexture createHashMapFromArray [
["procedure", "ui2texure"]
,["type", "ca"]
,["width", 1024]
,["height", 2048]
,["format", "argb"]
,["mipmaps", 4]
,["display", "RscDisplayEmpty"]
,["fill", "stretch"]
];
obj setObjectTexture [0, "#(argb,8,8,3)custom(myproceduraltexture)"];
If its a matter of having this procedural texture syntax.
Because player2 will try to load "myproceduraltexture" and won't find it
Yes exactly, that's why
setObjectTexture is local
Ah local variant
_rsc_picture ctrlSetText "#(argb,8,8,3)custom(myproceduraltexture)"
ok that'd work, but then still serialization, and the network sync for when you use global variant
Leave that to mod\mission designer, have them init their textures before using them
And won't work for textures set in p3d's, they are string only
Textures as a mission config class? ๐ค
- and normal config too
Yeah, that what I was thinking about earlier, I'm looking at it from mission design view point, not taking mods into account
If you'll have P3D with that texture baked in, your mod will have to call some preInit function to initialize the texture before P3D is used somewhere
much easier to just create a proper syntax for these strings, rather than build a whole extra system that doesn't work in all cases
What about generating the string?
private _textureString = createTextureString ...;
MyObj setObjectTexture [0, _textureString];
```Then you can easily build complex (not necessarily human-readable) strings.
yeah that'd be easy
but.. why extra command for something you only ever do once and can do by hand just as well
To be honest I long dreamed for more advanced procedural textures
Can make a ~10 line script function that does the same and plop it on wiki
Like applying masks to texture, hue shifts, etc.
And I had this idea for procedural texture command for a while, as a convenient way of providing arguments into procedural texture rather than cramming it all into a string
I'm dreaming again of course
well I maybe add that new syntax, then you can make a script function that converts hashmap into texture string if you like
actually you can make that script function right now already
its one format and a bunch of hahmap getOrDefault's
Yeah, its called format, the issue is that if we will ever have anything complex, having it all in the string is a bad idea
Back to original issue, not sure if we will ever need more arguments, so I'd just make 2 new proc texture names and that's it:
#(rgb,1024,2048,1)ui('RscDisplayEmpty','%1') - current
#(rgb,1024,2048,1)uicut('RscDisplayEmpty','%1') - cut off
#(rgb,1024,2048,1)uifit('RscDisplayEmpty','%1') - shink to fit
like you suggested with uisquare
What I always dreamed about with procedural texture is having some kind of toolset to operate textures in the game. For example taking existing asset textures and hue shifting them to have different car colors. And to avoid hue shifting unneeded details have a black and white mask to provide for effect.
That's why I went so much into ui2display because its a step towards it
Instead of having huge premade textures with repeated patterns bloating the mission file, now you can have separate elements and procedurally arrange them on display and render it into the texture
Yeah I know its perfect time to implement all that when A3 is EOL 
Edit current ticket as its about "Aspect ratio issues with UI2Texture" or create a new one for the fit\cut option?
new
Btw, what is default texture type if texType is not specified? Wiki says its "ca"? but its definitely not ca
Left is default (not specified), right is "ca"
Took me some time to notice laptop screen not being shiny anymore to realise its not "ca"
Going back to that, if you ask me, ui2texture should behave how I suggested it with "cut" behaviour. Since displays are often text, I can't imagine anyone wanting their text to be squished or stretched when they use it on non-1:1 texture, can't call it "correct" what so ever.
So I'd just make it simple and change current ui2texture to always do "cut", I doubt there is a lot of backwards compatibility to support
no need for new proc texture names, no need for new parameters
@untold sky is the bug where amphibious vehicles fail at driving around houses ( https://feedback.bistudio.com/T167742 ) related to tracked amphibious vehicles failing to cross rivers? Like they don't get out of the water again and just float. ( https://feedback.bistudio.com/T170421 )
Do they get treated as boats and then are unable to pathfind their way out on to land?
(it's weird because this doesn't affect wheeled amphibious vehicles)
Do they delete their waypoint or just not move towards it?
From what I remember they just don't move towards it after reaching the middle of the river but it's been a while since I tested. Engine seems on (see images in ticket) but speed is 0.
render yes
co
In my test they had no issue going across water.
But they would sometimes decide its a better idea to take a huge detour over terrain, and drive upwards through bridges (which they can't) instead of taking a much shorter, direct water route
no the code that was changed is same for tracked and wheeled
I guess no reflections are caused by something else rather than it being "co" or "ca"?
Interesting, I could reliably get them stuck in the water on Livonia ๐ค I don't think i tested near a bridge though
feedback for the feedbacktracker. little incetion taste :D
Attack Helicopter Pilots please upvote: http://feedback.arma3.com/view.php?id=25388 :-)
who else is there to do vanilla configs for the models
Ded or KK both can do config works no?
not sure, usually they toss config work over to reyhard
Is it intentional that the left custom info panel cannot be resized, but the right side can?
probably they did not anticipate people still modding the game in 2023 ๐
"theyll never know"
@solid marten chatGPT is asking for a "findMax" command
_index = findMax [4,5,9,6]; // 2
_index = _arr find (selectMax _arr); // 2```
not a joke btw ๐ it actually wanted to use a "findMax" function and when i told it was non existent it requested
Sounds good to have
I am using to find the longest sides of multiple bounding boxes to align
well select returns the element, but doesnt return the index of the element
well im just using _arr find (selectMax _arr);
just thought it cute the bot wants a new command added to the library
Fair
Obey the AI overlord
What would be really useful is ARRAY find [ANYTHING, NUMBER] so we can do finds after certain index
Also had a need for forEachReverse or something like that, had to use ugly for "_i" from count _array - 1 to 0 step -1 instead
reverse modifies original array and making a copy just to reverse to use with forEach is even uglier
The overloads for find are basically all used it has to be a different name
if changing dir is a matter of flicking a flag then it could be added
forEachReverse will also be useful for quick array cleanup
You can't do:
{
if(isNull _x) then {_array deleteAt _forEachIndex};
} forEach _array;
but you could with:
{
if(isNull _x) then {_array deleteAt _forEachIndex};
} forEachReverse _array;
Yeah you can do - [objNull], but its for primitives only, won't work with more complex conditions
for "_i" ... step -1 is works, but uglier
Ideas also went as far as imagining:
_dead_units = _array deleteAt {!alive _x};
select + deleteAt
6 matches for step -1 in my project
None in really performance critical places though
I have just submitted a ticket for a potential bug with the Config MFD system that I have found. Is there anything else that I can do to improve this? https://feedback.bistudio.com/T171305
Not anything big, but if you would please :) http://feedback.arma3.com/view.php?id=24589
adding foreachreversed is not a big job however might need a separate class to keep performance intact
Is there any chance of getting an alt syntax for the magazineDetail commands that returns array (and ideally classname) instead of that horrific string format?
yeah what on earth is that anyway?! ๐
Probably some dev command to debug new inventory that somehow got into release
I wonder if other items like uniforms, vests, items and weapons have this network id and creator id like mags do
Ah, because they resize to the same size.
any chance to get createHashMapObject to act like a namespace?
Maybe more flags, like:
"namespace" -- acts like a namespace
"alwaysBroadcast" -- all changes to the hashmap are broadcasted to every client like the third parameter in setVariable
a hashmap already acts as a namespace tho? 
yeah, but no sync
all changes to the hashmap are broadcasted to every client like the third parameter in setVariable
this doesn't seem like a good idea
and no persistence saving of data
might as well poll changes then send at once.
otherwise every change would attempt to sync, e.g. even if you did a simple set on a member var
yeah, I was gonna ask for a force broadcast cmd and a pause broadcast cmd
idk what you mean by this one. namespaces are not persistent either
I should have said, a lifetime of Mission duration like missionNamespace
but if you save the hashmap in missionNamespace you do get that result already
yes, but I already do that.
I just want a different mechanism to do so for hashmaps
I have to set on the hashmap then setVariable again to broadcast the change
the AI is now requesting an "Eject" event handler
i didnt write this ```myPlane addEventHandler ["Eject", {
params ["_vehicle", "_pilot"];
// Call the eject_handler.sqf script
[_pilot] execVM "eject_handler.sqf";
}];```
you shouldn't use execVM in EHs
use spawn instead
Doesn't execVM do that anyway?
What issues does that cause?
The GetOut/GetOutMan EHs detect eject actions, but they don't tell you it was an ejection, so you have to kinda guess if you're wanting to e.g. do stuff related to an ejection seat
slow because it recompiles the script every time
then just add a bool to the GetOut/GetOutMan EH
params [...., "_isEject"]
Does the speed matter much if the EH is triggered only sometimes?
that's what I was going to say ยฏ_(ใ)_/ยฏ
are you saying it's impossible for it to trigger multiple times per frame?
like in here, what if multiple units eject at once?
I mean, if the EH isn't onEachFrame then it shouldn't, i would hope?
And if regular EHs can unintentionally fire multiple times in a frame then maybe this should be stated somewhere prominently in the wiki...
I didn't mean one EH firing multiple times. I meant multiple EHs
as I stated here
Oh i thought that was a reply to QS
i mean my use case is to detect when a pilot ejects in order to trigger a pilot rescue task
we can use logic in a getoutman event like "getpos > 100"
so there is no great need
I like this
Havent looked in it but without the ticket there is a chance I would overlook it
forEachReversed Revision: 150434 please make a wiki page @gaunt depot
It just forEachReversed ARRAY or forEachReversed HASHMAP too?
forEachReversed for hashmaps makes little sense due lack of order in the first place, but I still wonder
no hashmap has no order
So just command is just for arrays?
yes
๐
That will help a lot of noobs/beginners. Deleting in a foreach is a common mistake (also did it) ๐
Might be worth to make a note in forEach to encourage to use forEachReversed for deletions
has alt syntax for groups <array> been considered?
added
http://feedback.arma3.com/view.php?id=24027 last one from me. Thanks.
I don't suppose this is worth writing up:
moveInAny somehow breaks driving AI when used to move an AI into a gunner seat, such that they'll refuse to drive anywhere, or occasionally act like they have a brick wall in front. setEffectiveCommander to the driver will allow them to drive again, but setting it back to gunner (which is default) will block them again. You can do moveInDriver + moveInGunner and it's fine, while moveInDriver + moveInAny will break. Tested with Hunter HMG, Marshall and a couple of GM armed trucks.
Might be worth it, probably incorrectly sets effective commander by default
@trim acorn regarding http://feedback.arma3.com/view.php?id=25388 the controls that appear in Profile files and not in official controls menu (The one in game) are not officially supported. That said the switching weapons using keys is one of the systems we are currently working on and planning on releasing with the EDEN Update
@wind light will that include switching weapons while moving for things other than launchers?
That is something that someone in the community already created a script for but would be nice to have in-engine
or at least switching to pistol while moving
The system is gonna support Vehicles and Infantry. So for example if you bind switching to pistol to X key and press the key. Your character will switch to the pistol. Is that what were you asking about?
I am talking more about the animation side
That's already in @wind light
When you switch weapon's currently the your character stands still and switches to another weapon and then you can once again move.
Yeah, now i understand.
Thanks adam. But the weapon selection worked flawlessly, why was it removed again? (Vehicles)
Seems like it would be really easy to implement becuase it is just controlling the upper half for the reload animation, so the lower half could still preform the other stuff.
@trim acorn because it sneaked out accidentaly. THe system is sitll being refined and improved :)
Other stuff as in running or walking.
@untold sky Might this also be a case of non-4:3 aspect after messing with FOV settings?
https://www.reddit.com/r/arma/comments/12a6y8u/is_this_normal_how_to_fix/
Seen some random video on reddit, thought about you recently fixing that elsewhere
ctrlSetAngle you mean?
Hmm, I thought scopes behave like this by the engine ๐ค
Just tested vanilla MOS scope and it doesn't rotate when leaning
Nevermind then
@patent trail wants some of this https://www.youtube.com/watch?v=wouoN9e9fM4 ^_^
Proof of concept. Now available in addon form: http://forums.bistudio.com/showthread.php?158044-Switching-weapons-on-the-move
was just about to link that
Things discord needs #12312: forcing a link not to show the preview.
I'm pretty sure we already gave statement on the "Switching weapons while moving" issue multiple times. I might as well be mistaken.
Yep, doesn't stop people from wanting/dreaming about it tho. :P
I don't remember seeing that attached to any of the feedback trackers
Check the Smookies posts in my thread about that addon in the video.
https://forums.bistudio.com/topic/148904-switching-weapons-on-the-move/page-10 is this the one Sniper?
Page 10 of 10 - Switching weapons on the move - posted in ARMA 3 - ADDONS & MODS: COMPLETE: are you sure this mod is what's causing it? I have magazines disappear all the time even without switching weapons.
when using TMR bipods, if my weapon is deployed and I reload, that snap seems to cause the reload animation to fail or something, and the weapon breaks.
Yep.
Ok :)
Smookie makes a few posts in there why it's hard for them to do properly.
TLDR: Anim system is :skype_puke:
Page 3 has Smookies posts.
yeah after I look through 7 pages for him you mention that ;)
I kind of figured that was the reason being with regards to the animations starting and stopping... feel bad for devs having to work with Arma engine ;)
Could it accidental sneak back in until the refined version comes back?
@patent trail I've gained a lot of sympathy for the BI employees in general recently.
I can only imagine how much work the HR department has to do
I spend a few days trying to get some weapons in-game and working right and I basically want to shoot my own foot :(
should I make ticket for this, unless already made? will devs want to look?
And it creates a copy. If you're fine with copy might aswell just use select
{
if(isNull _x) then {_array deleteAt _forEachIndex};
} forEachReverse _array;
```==
`_array = _array select {!isNull _x}`
The problem is just if you HAVE to work with references
If you need reference you could
```sqf
_newArray = _array select {!isNull _x};
_array resize 0;
_array append _newArray;
That is _newArray = _array select {alive _x}; _dead_units = _array-_newArray; _array=_newArray
which yeah a bit ugly, but do you really do that often
No. A namespace needs a global object that it can sync with.
If you want a namespace, just create a location and use that
Maybe, messing with FOV settings is not supported
@trim acorn I dont think so :/
It's CBA scopes framework that do the rotating ones.
Location is local, simple objects should be used for global custom namespaces.
soo feedback tracker huh? played almost 2400h, Im happy customer :D
why is custom FOV not supported - too much engine work needed to have it working "everywhere"?
IIRC Ded ever told us why it won't have an official implementation
And the reason is some kind of โpretty much everywhereโ I recall
ye
Lets have a mission option\script command to force reset the FOV
Very annoying that people use insane FOV in multiplayer to peek over big obstacles in 3rd person
(yeah I know 3rd person sucks but plebs won't play 1st person only games)
I forgot that in the graphics script command thingy i guess. That should probably also return FOV
Lets draw thick black border around their screen when they're in 3rd person with a huge FOV 
getResolution has fov in the output already
The fov can change between resolution\aspect ratio tho, 21:9 will have bigger one than 16:9 won't it?
But resolution can be found out too so probably doable anyway.
Not sure what fovTop and fovLeft when you're on ultrawide ๐ค
fovTop=0.75;
fovLeft=1.7777778;
for 3440x1440
I wonder if this messes up drawIcons on the map on stable? ๐ค
Unless only fovTop matters for it
I wish tho, that arma4 comes with ACE (especially the ballistics) and ShackTac by default, like when chenging difficulty to veteran/expert. there you go, it be long time to a4, but thats what I like to see in it ontop whats already in a3 :)
is there a workaround of sorts for ctrlSetAngle when people use a custom fov?
no
Nah, moveInGunner sets the effective commander to the gunner too. The only apparent difference with moveInAny is that they can't drive.
we had also issues with moveInAny - need to be careful to get AI mixed with player into the vehicle in the right order, or you cannot command it (workaround is to do setEffectiveCommander as mentioned)
we are getting some locality issues(?) with mine/explosive boxes in DS env
they are defined as TransportMagazines as with vanilla A3 ammoboxes with them
even more weird some mine types work, some dont - is that known/a workaround/not TransportMagazines to be used?
Effective commander can get fucky too, AI commanding in general is weird.
https://feedback.bistudio.com/T170979
couldnt find anything via google than some locality problems with ammoboxes in the past - not sure if this is still actual tho
Could this be why Zeus-placed vehicles sometimes refuse to move if you place the vic and crew separately and then drag the crew into the vic? I don't know whether Zeus drag-and-drop uses moveInAny, but it sounds suspiciously plausible
I might have a repro for position failing to transfer alongside locality
Been working with backpack UAVs lately and had them disappear twice on me on a local server
Made a repro, out of 100 assemblying, 1-2 are usually fucked
The behaviour's 100% consistent with the commands so I'd be surprised. When I was testing the bridge bug I remember ~1/10 zeus placed vehicles refused to move anyway for some reason.
Also seen another no-movement bug that I think boiled down to createVehicle + setPos in the same frame.
IIRC in both the latter two you can move the vehicle slightly and then they regain the ability to path.
While the moveInAny bug doesn't care.
Repro made
Repro is unreliable when reporting failed vehicles, but you can see visually that some drones didn't update their position
1-2% failure rate
Sounds like it will be quite fun to debug 
man, that's an effort repro :D
Wasn't there an engine thingy that's supposed to prevent that?
What was it?
I mean going underground, there was a change that's supposed to move physx objects to ATL 0 if they go underground and their simulation is enabled.
Hm, maybe its only when its first activated?
no no, that can definitely spam :P
In this case client has the drone in a proper position for a few frames, then (i guess) usual vehicle update message finally reaches them and puts it back into "out" position?
had multi-gigabyte logs full of moving the same can back to z=0
Might only apply to uncontrolled objects though?
๐ค
Disassembling back and forth also messes things up quite a bit
This might be due to assemble\disassemble mess, vehicle reverting position after locality change is a global issue
Actually might be due to groups limit
Any chance of an alt syntax for assignedItems that doesn't omit missing items? Because that command is an absolute arse to use for checks like "do we have a radio".
what about getUnitLoadout?
is it too slow?
ah yeah, meant to check that.
I use that in my mods but it's definitely slower than assignedItems
having an alt syntax as you said would be neat
~8x slower than assignedItems
well if you have something like ACE that fills you with bandages and stuff I'm sure it'll get much worse ๐
This is a pretty clean vanilla loadout :P
just too many arrays to construct I guess.
Absolutely agree.
Feedback tracker as in http://feedback.arma3.com/ :P
- Preload all radios from config
assignedItems player findAny _all_possible_radios >= 0
Not sure how much faster it is though
About 7x slower than if it had the alt syntax :P
but I didn't know about findAny and it looks generally useful.
getNumber(configFile >> "CfgWeapons" >> "ItemRadio" >> "type") => 131072
getNumber(configFile >> "CfgWeapons" >> "RadioItem" >> "type") => 611

Thought maybe we can have something like player getAssignedItemType NUMBER
to return item from a specific slot
But these types confuse me
131072 looks like pre-A3 bitwise inventory type
Oh yeah it is, but A2 didn't have any other number to distinguish these items from each other
only simulation
states you can define the type also per ammo
however this still doesnt seem to work for ammo of the same weapon - is that hardcoded to work only with helicopter and planes? can this be fixed to allow switching between tank ammo for example without the dreaded action menu
What would be approximate ETA for 2.14 to go stable? Summer? Autumn?
That could be improved
I'll answer for the devs - 
nice
๐ Using numbers for slots is bit meh but I can live with it.
#define SLOT_RADIO 611
player getSlotItemName SLOT_RADIO
```looks nice
<#dev_rc_branch message> "late summer"
Made a ticket for missing UAV Terminal commands
If either KK or Dedmen are willing to implement these, I'll make repro scripts to test the commands.
UAV Terminal bugs deserve another ticket (mostly MP issues), but at least having BOOL = disconnectUAV ENTITY will let me bypass engine UAV issues
parsing string and comparing string is meh in comparison with converting int to enum
Could setTurretOpticsMode and setTurretOpticsMode perhaps be extended to work with pilot's turret path [-1], for Pilot Camera zoom?
Turret optics mode does not necessarily include zoom, I'll double check but I doubt that will be easy to do without affecting zoom outside vehicles.
Do you mean the pilot/driver cam that you can put where the GPS would be in the HUD? Or is there some pilot camera I am missing?
I think they mean like the targeting pod camera some jets have
Ah okay, I missed it was that view but it is the same cam you get in the GPS HUD.
read the header below the channel name, that helps
prepare thy selves.. previously ignored FPS warnings about ShipX vehicles and roadways, is about to get real.
why hatchet ?
gonna release the Mk.V to the masses. :D
i expect a fair bit of screaming..
Nikko has it, PilotCamera class modes. The command currently forces a mode in Turret\OpticsIn, but that doesn't exist for drivers. Purpose is to support shenanigans like using the camera from the internal view, sim-lite style ๐
I just need to test it a bit, but I worked on get/setPilotCameraOpticsMode commands
It was easier than cannibalising the turret version, and it makes more sense.
Ft ticket was actually made ages ago xD https://feedback.bistudio.com/T169615
nothing
https://feedback.bistudio.com/p/violentlesson/
Spam account
http://feedback.arma3.com/view.php?id=26380 export option for config viewer
https://feedback.bistudio.com/T171375#2427082
ho no spammer
all 3 removed, thanks
17:55:28 Warning Message: Error: creating weapon CUP_arifle_Mk17_Base with scope=private
Result of compatibleMagazines for scope = 0 weapons, even though the array is returning correctly
Just realized how useful it would be to have a unit event handler that would fire each time unit wears a new item
including the slot
eg InventoryChanged?
InventoryChanged sounds more broad, something like InventorySlotChanged
params ["_unit", "_slotNumber", "_oldItem", "_newItem"];
Something like that
Well it could save looking up slot type in config
True
Plus some items like ItemRadio have incorrect type in config
Gonna save us some additional switch cases
With _slotNumber you'll be able to easily run code against item types you're interested in
yes pls so we can stop polling player inventory in CBA all the time.
Performance gains! ๐ช
is it supposed to trigger every time you fire? 
Are magazines even inventory slot items? ๐ค
why it would fire
If they are then probably on reload?
yes on reload.
oh you're talking about those? 
I thought you mean getUnitLoadout
Ticket done: https://feedback.bistudio.com/T171418
I've linked CBA implementation, it's limited and works only on player for performance reasons.
https://github.com/CBATeam/CBA_A3/blob/master/addons/events/fnc_playerEvent.sqf#L43-L48 it needs to do this every frame ๐ and then a bunch of comparisons.
Personally I need it for checking when UAV Terminals were swapped. Since UAV Terminals store forbidden UAVs (disableUAVConnectability) and current connected UAV and they're not entity, its a bit of a hassle to know when your terminal changed.
oof, it builds and compares entire getUnitLoadout each frame

I see you want just the slot changes, imho whole inventory support would be better.
https://community.bistudio.com/wiki/getSlotItemName
Weapons are not part of this list so I guess either new EH gonna have to be expanded in its scope, or another one introduced if engine is not spaghetti enough to call EHs on weapon\attachment\magazine changes
Yeah, just thought of that, either expand this suggested EH or have a new EH for different kind of inventory items
InventoryWeaponChanged ?
Unless you also need each and every item in the uniform, vest and backpack tracked
I only thought about equipped items
I see that you only use equipped weapons in getUnitLoadout so I guess we thought of the same
Weapons are types 1, 2 and 4 and don't seem to collide with slot items so perhaps EH could also include swapping the weapons?
Weapon attachment types doesn't seem to collide either, but more info is needed for them for EH to make sense
much requested over the last years, pretty sure we still have a internal ticket open for it
Sadly inventory system is a mess
plz fix 2.14 kthxbai
Also wouldn't help with the CBA problem, it still needs to check container contents
Easiest way might be to move CBA's each frame unit loadout check, into engine
But even that would be crappy
Still a lot faster
Any chance of a command to disable specific vanilla actions from appearing? There are hacks that can be done in some cases but most of those are horrible, and some actions are hard (impossible?) to clear without config.
Ticket is here: https://feedback.bistudio.com/T158795
technically this should be quite simple i would assume as its already determined via show parameter in cfgActions - only if the engine caches the data on game start, it might be a little hassle
nice to have would be the ability to manipulate all parameters for actions in there, yet probably just show on/off would be good enough
Even if its limited to one kind of inventory types, items (headgear, radio, gps, uniform, goggles etc.), it would still be very useful
A week ago somebody was asking for a way to find a moment when goggles(mask) was taken off a dead body, such event handler would've solved it
My requested parameters are theoretical, even if its not possible to know last item's class it would still be very useful
Here is how I see disabled and enabled actions could work:
BOOL = ENTITY disableEngineAction STRING; (CfgActions: Assemble, GetInDriver, etc.)
BOOL = ENTITY disableConfigAction STRING; (UserActions: OpenDoor_1, etc.)
BOOL = ENTITY disableUserAction NUMBER; (addAction command)
BOOL = disableEngineActionUI STRING; (CfgActions: Assemble, GetInDriver, etc.)
BOOL = disableConfigActionUI STRING; (UserActions: OpenDoor_1, etc.)
disableEngineAction stops entity from giving units its actions
disableEngineActionUI stops UI from displaying all actions of this kind all together
BOOL = disableConfigActionUI STRING;
```sounds strange though, not sure if this is worth having at all, you can't disable all door openings for example, some door open action might have config name completely different from BI standard
And opposite enable*Action commands
Or one command with a flag in parameters: [STRING, BOOL (Enable/Disable)]
BOOL returned would be command success - such engine action existing, etc.
I thought about suggesting it to be even more complex by disabling actions in a format of [CALLER, TARGET, ACTION] but this might be too complicated if you say want to disable all actions all together
player disableEngineAction [jet, "GetInPilot"];
But you'll have to re-add this disabling for player each respawn, have to add it against all vehicles, etc.
Can't supply objNull as a mask for "every vehicle", since you might provide a variable that went null and it would disable all actions by accident
So I'd keep it simple, as most usual usage for these commands would be disabling bullshit actions and implementing your own handling
Alt name for disableEngineAction would be disableGameAction
Game, Config, User
how about just a uinamespace var for each of the cfguseractions or something
I also agree a way to hide engine actions would be useful for advanced scripting
not everyone uses huge mods
Lots of modders have been asking for this, hopefully it gets implemented one day ๐
just something simple like uinamespace setvariable [format ['BIS_hideaction_%1',configname ...]];
I created a feature request for marked SensorTarget but maybe it is a bit excessive https://feedback.bistudio.com/T170978. Maybe i could get an additional return to getSensorTargets instead something like Null, Marked, Locked?
Ahh... Nevermind i found out that cursorTarget provides that functionality.
Just realized how useful it would be to
compatibleMagazines is case-sensitive on the muzzle name. Modders are incapable of getting cases right for their own classes. Whose fault is this? :P
Given that compatibleMagazines actually fixes cases for the magazines & magazinewells, this seems like an oversight?
Script fix until its fixed in the engine:
compatibleMagazines ["arifle_Katiba_GL_F", configName(configFile >> "CfgWeapons" >> "arifle_Katiba_GL_F" >> "EGLm")];
yeah, already did it
wasnt there some fix or workaround in 2.12 or 2.10 already to have AI no longer shoot at empty static weapons?
At the moment, enableIRLasers doesn't seem to work with optic slot lasers. Is it reasonably possible that it could be made to do so?
- this might also apply to the gunLights command and optic slot flashlights, but I haven't had the chance to test that just yet
I did some more investigation and it turns out the truth is actually much stranger: visible-light laser beams don't glow in the dark and become completely invisible at night
_myBuilding = (nearestBuilding position my_bestPlayer);
{
_myBuilding setHitPointDamage [_x, 0.5];
}
forEach ["glass_1_hitpoint","glass_2_hitpoint","glass_3_hitpoint","glass_4_hitpoint","glass_5_hitpoint","glass_6_hitpoint","glass_7_hitpoint","glass_8_hitpoint"];
Dedicated Server
if _myBuilding is Eden Editor placed building this code will be exec successfully in initServer.sqf
but if _myBuilding is Terrain Object code will no any effects if exec it in initServer.sqf
Although if code will be in init.sqf the glasses will damaged
I'm not sure if this behavior is normal?
If this is a problem, it might be related to
https://feedback.bistudio.com/T133265
getText (configfile >> "CfgWeapons" >> "arifle_AK12_GL_lush_F" >> "baseWeapon")->"arifle_AK12_GL_khaki_F"
Sanity check, am I the only one?
Yep, I also have it like this
Looks like arifle_AK12_GL_lush_F was arifle_AK12_GL_khaki_F at some point
@gaunt depot how do you remove goggles and headgear?
or to be precise what mass remove command removes them? Because they are not part of removeAllAssignedItems
@patent trail : From what I've read apparently Enfusion does (or is supposed to) support "upper half separate from lower half" better... or is this PurePassion not the BIF's? https://www.reddit.com/r/dayz/comments/3lmk4p/can_you_please_remove_the_thing_which_makes_your/cv7r4ea
Looks like I ended up using removeGoggles
Can't find a command that mass removes the googles
what a mess
What is this window after all? It is very frustrated to close this whenever it opens while I tweak the changelog
unification is incoming
apparently addWeapon removeweapon works with all assigned items, always worked
what a mess
removeAllWeapons has nothing to do with removing weapons, and the actual weapons removal looks like side effect, but the command is geared towards removing all magazines, no idea who what why 
Fun with sendSimpleCommand: key down + right + key up + key up results in you turning left, and vice versa :P
Wondering if this is partly why the AI is so bad at turning, but it's probably five other reasons.
no. that command is pretty much useless. it also has a lot of delay
Maybe it was supposed to be a complete disarm, i.e. remove all weapons [and all ammo]
judging by version history it looks like that
it was that in OFP at least - setCaptive + removeAllWeapons
Yeah I tried to use it to micromanage tank facing a bit and it basically meant AI would be turning left and right constantly because the delay on the 'stop' was too high
was extremely frustrating to have something that was almost useful
wouldn't it be cool to have real try catch system that is triggered on script errors? Unless I'm wrong sometimes script errors are not reported at all like in eachFrame EH for example
you are right about them not being reported in some unscheduled environment
having a try-catch system is not the way to go for performance so no (and I believe the way SQF is done you can't do that (easily?))
yes it probably would have some effect on performance. depends on how its implemented though.
but you could use macros to enable the try & catch only for testing ๐
just don't make mistakes
lol
Using nils as operands is not reported in unscheduled environment
I actually use that as feature in few places
_object = hashmap get "object";
if(!isNull _object) then {
// something with the _object
};
// This line also works
Ends up working as both isNil and isNull check
instead of doing hashmap getOrDefault ["object", _objNull]
saves a grain of performance
is there event handler for adding removing uniform, vest, backpack containers? The SlotItemChanged is firing for those because getSlotItemName supports those, but no reason to duplicate if there is EH already
I think no, never heard of
Nope
What are the chances snapping info can be added by config or global var hashmap, if provided by community?
Would need something like:
snapPoints[] = {
{-1, 0, 0},
{1, 0, 0},
"snap_mempt_1"
};
snapClass = "BaseClassName"; // used to look for compatible objects.
snapAngleIncrement = 90;
I really feel this would be ideal in base game. And if mod, would want it to be in both 3Den and Zeus Enhanced xD
Very promising...
How the cargo platform/museum parts configured? I'm interested
they have mem points, and the function is hard coded for those. \a3\functions_f_enoch\CargoPlatform\fn_CargoPlatform_01_update.sqf
This is just numbers.
Oh no. Stop giving me ideas
We just need a hash map with classes as keys and snap data as values 
Just checked the code. That's already the way you do it.
For a lot of things, if the bounding box is tight, just the corner or mid points can be snap points
Posting here was more about how to best make the data and functionality available.
Any chance to get these picked up?
- Performance optimization - we use the sound object for various audio features but the supposed "search free area" makes the local variant quite heavy.
[Feature Request] createVehicleLocal with newer "createVehicle array" syntax
https://feedback.bistudio.com/T170615
- For better usability we are providing various custom (advanced) hints, but also missions or 3rd party use hint. The getter would allow a flexible system (as the Hint key action already allows you to display the last hint, this should be easy to read and expose the last/current hint)
[Feature Request] currentHint
https://feedback.bistudio.com/T170257
- Performance optimization - often features are group based instead of unit based. If you need to build the group list manually in sqf frequently (ie per frame), this gets fairly expensive fast with enough groups/units.
[Feature Request] SQF command nearGroups
https://feedback.bistudio.com/T170144
Dedmen is it possible your fix for "[BUG] Unknown enum value spammed in rpt for waypoints" is leading to this reordering? is that a problem/something that needs attension at all?
ref: https://feedback.bistudio.com/T171125
Previously there were two type entries, the later one overwrote the earlier one.
The earlier one was bogus and was removed. So yes, now it appears lower down.
๐
A thought about nearGroups and nearLeaders: How about making inArea\inAreaArray\inAreaIndexes work with groups?
probably easiest idea. Just need to add parameter whether any group member, or only leader or average center position of group or all members n such
Then you could do:
allGroups inAreaArray _trigger
When I saw that request I thought that was already a thing
leaders ARRAY to return leaders of provided groups
allGroups inAreaArray _trigger => groups if at least one unit is in area
leaders allGroups inAreaArray _trigger => groups if leader is in area
of provided units too, perhaps
leaders allUnits => all leaders
leaders allGroups inAreaArray _trigger => groups if leader is in area
won't work, leaders would return array of units, so inAreaArray cannot return groups if it got units
Is there allGroups SIDE like units SIDE? ๐ค
groups side
True, won't work
Thought leaders could be useful to turn array of units into array of group leaders
So results of say nearEntities can be quickly turned into leaders
groups ARRAY, to turn list of units into unique groups
groups(leaders allGroups inAreaArray _trigger) will make leaders into groups in area then
alt syntax for "leader" sounds easy.
adding new leaders command feels too feature creep
Is there a monthly quota for new commands provided by BI? ๐ค
Thought seriously leader ARRAY is fine too
next we'll have drivers and gunners and commanders with array of vehicles and such more stuff. If we work like that
drivers actually sounds useful, gunners and commanders not so much. effectiveGunners maybe.
I'm fine with alt syntax for existing commands
Question is, does it satisfy @desert trench ?
If performance like that was the main factor, we could apply optimizations like I did on configClasses
If you run
_x apply {leader _x}
Don't... re-run that script for every element.
Know on engine side what the script wants to do, and do it right there and then without invoking actual script function.
I would much prefer that over dozens or hundreds of new tiny special usecase commands who's only purpose is to do something slightly faster than what you could already do.
These commands don't add any new functionality, they just do stuff you can already do, faster.
Actually I think it would be extremely easy to optimize the
_x apply {command _x} case, and just evaluate it directly in engine, without running script
I can try that in a bit
๐ค



How about both commands and hardcoded optimisations for applying single commands? 
Speaking of average center position, having a command for that sounds useful too averagePosition GROUP/ARRAY
allGroups apply {averagePosition _x} inArea...
input apply {command _x}
in engine is
foreach element in input
Create new script stack level (memory allocation)
Add local variables (_x, foreachindex, ...) (memory allocation each)
Return to interpreter
grab next instruction
getVariable instruction
find _x variable, push on stack
return to interpreter
grab next instruction
command instruction
grab value from stack
run command
put result back on stack
return to interpreter
get next instruction
end of expression instruction
clean up stack
return to interpreter
get next instruction
none found, break out of stack level
clean up stack level and local variables
newArray append value returned from stack level
I can optimize that into
if script is single command
foreach element in input
newArray append (singleCommand(element));
I guess something similar could be done for select?
Sounds great, maybe have it for other _x commands too?
yeah sure
count, select
I'll try and benchmark that when I'm done with the texture stuff
Btw I'll trust that you'll find issues if I broke something with that UIToTexture stuff.
The shared display between multiple different textures is now in
I'll have a good playing around with it
I actually thought about something similar some time ago, thought it could work like: ARRAY applySingleCommand STRING with STRING being SQF command
We can parse assembly no need to be string
string would actually be more expensive, than passing code and parsing assembly
because we don't have to lookup the command, that's done on compiletime (except for nular commands on non-profiling branch)
๐ค
aw no dev branch this week actually
Actually in that listing I forgot type checking, and different command versions for argument types.
But that will just be added on both ends, we still save all that stuff listed there
Most important part, we need to find a name for this process ๐
How about short-circuiting ๐ค Or direct evaluation
Blast Processing
The Real Virtuality has blast processing, the Enfusion engine doesn't!
Any chance of extending this optimisation to binary commands?
You could do pretty much anything with it by chaining applys then :P
I'll probably support any command, but just one command deep.
combining with the bytecode optimizer I may also support const array arguments to commands
or stuff like
_x apply {_x command [_x, ...]}
but that might get dangerous if command is modifying _x
huuuuuuh wtf
omfg how can I be so stupid 
Back in january I did Tweaked: Improved performance of nular commands and variables
that changed that stuff like true would be looked up at runtime if its a variable or a command, to look up once at compiletime.
But..
The feature flag for it is
#define _A3_NULAR_INSTRUCTION (0 && _EXPERIMENT_BUILD)
It has been off this entire time while I thought we were testing it on prof
Result: 0.0013 ms
Code: true;true;true;true;true;true;true;true;
->
Result: 0.0009 ms
Code: true;true;true;true;true;true;true;true;

๐ค
I'm trying to test the thing with select {true} and wondering why I get a getVariable instruction ๐ข
Question is also.
Can i turn
input select {command}
into
_result = command;
input select {_result}
without any problems ๐ค There is probably some weirdo edge case, like diag_tickTime slightly increasing between each, even though its unscheduled
This is beginning to look like SQF dark magic
I think this looks promising
in debug build with select {true}
[2.12979,470] short circuited
[33.6,30] normal
Ignore the 1; I just use that as a marker to enable short-circuiting, its not executed.
_bigArray = [];
_bigArray resize 10000;
[
diag_codePerformance [{_this select {true}}, _bigArray],
diag_codePerformance [{_this select {1;true}}, _bigArray]
]
``` `[[2.86819,349],[0.158003,6329]]`
```sqf
[
diag_codePerformance [{_this select {false}}, _bigArray],
diag_codePerformance [{_this select {1;false}}, _bigArray]
]
``` `[[2.73973,365],[0.127259,7858]]`
Interesting that returning 10k elements, doesn't actually take much more time than returning 0 elements.
That above is
```cs
foreach (value in input)
if (executeCommand())
result.Add(value);
Now if apply dark magic
if (executeCommand())
foreach (value in input)
result.Add(value);
We get
[
diag_codePerformance [{_this select {true}}, _bigArray],
diag_codePerformance [{_this select {1;true}}, _bigArray]
]
``` `[[2.68097,373],[0.0367539,27208]]`
```sqf
[
diag_codePerformance [{_this select {false}}, _bigArray],
diag_codePerformance [{_this select {1;false}}, _bigArray]
]
``` `[[2.66223,376],[0.00038,100000]]`
I would say.....
That might have been a brilliant idea
What is that.. like 90x faster?
Its pretty rare that I can apply dark magic though
You don't really do select when the condition is always the same ๐ (And if you do, SHAME!!! ๐ )
inb4 chaining 484 applies because it's faster than single 4-instruction one
dedmen chanting around his computer with a massive cloak on sacrificing miller to the sqf gods to get 90x better code performance
One thing here is also. Every script command executed, checks against CfgDisabledCommands, every time, before every execution.
With this, I can do this check once before the loop, instead of repeating every loop iteration.
For bigger pieces of code, I can also move out all the local variable stack (if you do not use local variables) and just run the commands without a stack just passing values between each.
For big pieces of code (more than one command) I probably can't do such extreme optimziation, but I can still get it down quite a bit
So what was the other thing
arrayOfGroups apply {leader _x} ?
I'll try that
_bigArray = [];
_bigArray resize 10000;
_bigArray = _bigArray apply {group player};
[
diag_codePerformance [{_this apply {leader _x}}, _bigArray],
diag_codePerformance [{_this apply {1;leader _x}}, _bigArray]
]
``` `[[3.60072,278],[0.677048,1477]]`
yup
Compared to this
[
diag_codePerformance [{_this apply {leader _x}}, _bigArray],
diag_codePerformance [{leaders _this}, _bigArray]
]
``` `[[3.5914,279],[0.523286,1911]]`
Yeah, not really worth it building special case commands, if I can just solve the general case.
And I think I can make that general a bit faster still
The performance difference to leaders command is, it doesn't do type-check on each element (though a real implementation should, I didn't do t hat here)
but any unary command that has multiple overloads, needs to run typecheck to figure out which overload to call (That's why I prefer to merge things into existing commands, without creating overload)
I think this is the max I can reasonably get out of that
[
diag_codePerformance [{_this apply {leader _x}}, _bigArray],
diag_codePerformance [{_this apply {1;leader _x}}, _bigArray]
]
``` `[[3.71111,270],[0.635324,1574]]`
I optimized the type checking a bit, but there's only so much to be done.
If I remove the type checking and just hardcode call the correct overload
`[[3.7037,270],[0.593472,1685]]`
But I can only do that if I know all elements in input array have the same type
I think its fast enough, close enough to having a "leaders" command
Even at array size 1 its good [[0.00089,100000],[0.00051,100000]]
Outstanding ๐
looks like no binary commands and no arrays for now
neat.
This stuff also knows before it goes into the loop if _forEachIndex is used, so it doesn't need to spend time setting it if you're not using it
huh what? apply has no forEachIndex? :u
select also doesn't.. huh.. didn't know that
findIf also doesn't? can't be :u I must be missing something
wow no they really don't.
Welp, learned something new I guess
lack of forEachIndex in apply is occasionally annoying.
So if we could have that without the perf cost when you're not using it then that would be good.
yeah having a magic var for that would be nice
can't be _forEachIndex tho due to backward compat 
oh, because you might be using apply inside a forEach?
Nice.
First test with the more generalized version
It decided to optimize a lookup in CBA's preStart
private _cfgPatches = configFile >> "CfgPatches";
private _allComponents = "true" configClasses _cfgPatches apply {configName _x};
Without/With
[
diag_codePerformance [{private _cfgPatches = configFile >> "CfgPatches";
private _allComponents = "true" configClasses _cfgPatches apply {1;configName _x};}],
diag_codePerformance [{private _cfgPatches = configFile >> "CfgPatches";
private _allComponents = "true" configClasses _cfgPatches apply {configName _x};}]
]
[[13.9167,72],[13.1429,77]] ๐ข
Oh I forgot to apply a optimization in my old configClasses thing
[[7.65649,131],[6.86986,146]]
ohhh crap. Welp. That's what adding a reserve(n) and a std::move does to you....
Moving out the configClasses, and only testing the apply itself
[[0.962464,1039],[0.142045,7040]]
[[3.82509,263],[0.757576,1320]]
The generalized version performs a bit worse than my special initial implementation ๐ค
Buuut. It can do fancy stuff like apply {leader group leader _x}!
[[3.8876,258],[1.60514,623]]
or leader group leader group leader group leader group leader _x
[[9.50943,106],[4.07317,246]]
Mh its only 2x tho ๐ข Needs to be better ๐
yeah unaries are expensiv due to the type checks...
apply {true}
[[2.87931,348],[0.244499,4090]]
nular's get you the 10x
Ah I know how to optimize the typechecks.. tomorrow
yeah 
old type comparison check
Are we any?
Are they any?
Are we null? (should never happen, could be checked once at game start, but is instead re-checked every time on every type check on every unary/binary command execution and also often inside commands if the argument is array)
Are they null? (should never happen)
If we are single type
Are they single type? Quick compare
They are multitype, look up if their typelist contains our type, in an unsorted array that we just O(N)
If we are multitype
Are they single type? Check if their type is in our unsorted typelist
They are multitype, O(nยฒ) iterate over all elements to see if any match together
New type comparison check
(int & int) != 0
That's gonna be interesting.
Add PBR renderer to RV, let dedmen work on it 1-2 years more and it will be viable for Arma 4 
|| and we can forget about that Refunder thingy ||
So uh to steer us back into feedback tracker territory for a second ๐
There was a discussion that came up in the GM discord a week or two ago regarding the behaviour of AI fired SACLOS missiles when the gunner of such a missile dies
Since AI-fired SACLOS missiles are really "fire and forget", killing the gunner means the missile still tracks and hits the target when it ideally shouldn't
AI related stuff 
fun
make a FT ticket with repro.
AI related stuff is unlikely to be fixed
i am aware how to give feedback, hold on ๐
sometimes does happen though for major enough things. Which I think this is not
What you want would need most likely an CfgAmmo flag that tells the game to stop the missile from tracking the target after the firer dies.
(I couldn't think of a proper name for the ticket anyway, which i also wanted to ask about)
this behaviour should be quite easily scriptable too.
my idea was somewhat related, i was wondering if it could effectively trigger the "countermeasure" response
i.e. behave as if the target had popped smoke
(now i don't know what exactly that mechanism is, maybe it's the cfgammo flag that you're talking about)
So should i bother making a ticket about it, and if so what should I even call the ticket.
"AI fired SACLOS missiles don't lose track after gunner dies"?
"AI fired SACLOS missiles don't lose target track after gunner dies"
sounds good, IMHO worth a ticket.
Might turn out it's actually simple.
Ideally attach a mission that makes it easy to debug for the devs.
I don't have the ability to attach a mission sadly, my gaming pc is on the other side of the planet 
i'll add the repro in summer, or maybe someone else volunteers (perhaps the person that brought it up originally in GM discord)
Also yeah probably not the most important thing but was hoping it turns out somewhat simple to do
would improve immersion noticeably i think
Should be _findIfIndex, _applyIndex, _countIndex
As someone (Sa-Matra/Dedmen?) had asked for/suggested to request yesterday specific requirements in regards to performance
Obviously in general anything with perFrame, especially UI stuff, 2d map or 3d visualization where you need/want realtime to avoid lag or false information
Combine that with groups (50+) or units (100+) - even basic sqf commands add up if you have to do checks if that group/unit is relevant
(for custom HUD, target indicator, nametags, etc)
Hence any prefiltering the engine can do, or even did already, can save a ton of computation
Or to be able to use already present engine native systems (aka "only" getter&setter needed)
Samples:
- [Feature Request] SQF command to return visible targets for an unit: https://feedback.bistudio.com/T168404
- [Feature Request] Extended drawIcon/drawIcon3d with isVisible parameter: https://feedback.bistudio.com/T169233
- [Feature Request] SQF command to return only vehicles for a given side: https://feedback.bistudio.com/T168217
- [Features Request] SQF command to toggle marker scaling on and off per marker: https://feedback.bistudio.com/T169166
- [Feature Request] Add drawUnitIcon and family of SQF commands akin to GroupIcon: https://feedback.bistudio.com/T164042
(or that nearGroups/nearLeaders)
โplayers [east,west]โ to return list of sided players
sides of units and vehicles is another can of worms
Unit side can differ from unit's group side for example, plus there is unit's config side
Which should it return?
drawIcons can be be optimised quite well with new inAreaArray command
You need to update a location each frame to fit map's size then you run all your potential draw candidates against it with inAreaArray
wtf did I just find.
When game tries to create value of type Array.
It goes
Ok you want array?
Good, I'll iterate over all types in this unsorted array, where each element is a pointer reference to a location that is most likely not in CPU cache and needs to go to ram, create a temporary copy of each type!?!?!?!?!?!?, find the one that == the type you passed in.
Then when I found it, use that to create the value.
DUUUUUDE, The type is already there! Just use it! OMFG what the hell.
SQF performance gains month?
Dedmen of the day I guess
Enfusion is cancelled guys, Arma 3 just got +9001% perf!
Over 9000?!
๐
Can't we just invest Dedmen DLC?
I'll buy 3
Segaยฎ
SEGA!
what have I done now
wow OFP had script types for Vector, Matrix3, Matrix4 ๐ค
Seems they were never used tho
Deemed too hard for us SQF plebs I guess 
// this return same result as (bool)(this & with)
Followed by a 60 line function 
"why make it simple whenโฆ"
So this again.
Before that type comparison change: [[9.87255,102],[4.21941,237]]
After (Only applied to the short-circuited): [[9.87255,102],[3.82824,262]] (lol I reran it till the first value was close to tthe old one, and I hit it exactly)
10% neat
Applied to both sides [[9.90099,101],[3.89494,257]]
@gray wharf We should document these findings on the biki. For historical reasons and to have something to smile About in the future
I want to fight depression, not feed it