#arma3_feedback_tracker

1 messages ยท Page 5 of 1

dreamy bane
#

would have to use "" strings for code though

sinful kettle
#

compile

untold sky
#

yeah.
Or just have "funcname" and the script could detect it and resolve that through to the real function

dreamy bane
untold sky
#

Well if you want to deal with config, you'll have to deal with config no matter what

sinful kettle
#

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?

untold sky
#

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 blobdoggoshruggoogly
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 ๐Ÿ˜„

sinful kettle
#

_value call ["destructor", []] and remove anything you need in the destructor meowsweats

untold sky
#

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 notlikemeow
Well it'll be documented so gonna be fine

gray wharf
#

will it now

untold sky
#
_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

sinful kettle
#

If you save it into a variable, from inside the destructor call
force it to no copy before calling destructor?

untold sky
#

_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

sinful kettle
#

you still need one to call constructor :\

untold sky
#

yes that later

#

Giv description for call command
"Calls hashmap value with CODE type."
sounds sad
my brain can't

sinful kettle
#

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 meowsweats
hashmap call [key, args]

idk I can't think of anything good either

sinful kettle
untold sky
untold sky
#

oh nvm it doesn't, I did a string type check.
Fixed now though

uncut briar
#

Wouldn't it be more in line with what we already have to do _args call [_hashmap, _key]?

sinful kettle
#

I suggested the other one because it's like set and get

#

and thus looks more consistent

untold sky
#

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

uncut briar
#

Yeah maybe. Somehow I don't like the whole idea of this.

untold sky
#
_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!

sinful kettle
uncut briar
#

I guess inherits current environment.

sinful kettle
#

imo constr and destr should be unschd

sinful kettle
untold sky
#

same as _this

#

constructor is currently unscheduled. But I can easily make it scheduled
call supports scheduled
destructor must be unscheduled

sinful kettle
#

no unschd constructor is fine imo

untold sky
#

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

sinful kettle
#

if anyone wants schd they can call a method afterwards meowsweats

#

I cannot make it scheduled
by scheduled, I meant same as current environment, like call

untold sky
#

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

sinful kettle
#

nah just leave the constructor unschd

untold sky
#

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

sinful kettle
#

createHashMapObject [_class, "args", _isScheduled]; meowsweats

untold sky
#

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)

notlikemeow but again, implementation detail leaking into usage is crusty

#

My brain is confident that scheduled support is better

dreamy bane
#

what if you have two scheduled scripts setting same variables at the same time, is that possible to happen?

untold sky
#

No. Scheduled scripts don't run in parallel, there is always ever only one script executing

uncut briar
#

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.

untold sky
#

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

uncut briar
#

But if you support only unscheduled the construction will be finished once object is created, right? Did I understood it backwards?

untold sky
#

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

uncut briar
#
_constructor = {
    _thisObj set ["constructScript", _this spawn {}];
};

waitUntil {scriptDone (_obj get "constructScript")};
#

sleeping in like an initialization of an object seems weird.

untold sky
#

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

uncut briar
#

But then somebody does sleep 1 in object constructor.

#

I run this in unsched.

#

What happens?

untold sky
untold sky
uncut briar
#

Error then, so I need to know about the object implementation details.

#

ยฏ_(ใƒ„)_/ยฏ

untold sky
#

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"

uncut briar
#

Both sucks.

untold sky
#

But one sucks less

uncut briar
#

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.

untold sky
#

๐Ÿซ‚

#

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

uncut briar
#

isNil {} is cheap ;D

untold sky
#

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

tropic jewel
#

canDeployWeapon exists. by chance is the deployment position already calculated, and hopefully easily made accessible?

west onyx
#

not a bad request @tropic jewel , even if its just to know how its calculated so we can run our own "lineIntersectsSurfaces"

west onyx
#

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

desert trench
untold sky
gray wharf
#

inb4 setDammage overload

alpine tulip
#

u seem to love that jok

gray wharf
#

it's still a strong one inside BI

alpine tulip
#

Can imagine

untold sky
#

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 // []
gray wharf
#

oh no

untold sky
#
_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"]

๐Ÿซ‚

untold sky
#

About the nocopy thing, I'd say +_object throws an error (that doesn't kill the script) and returns a reference instead ๐Ÿค”

sinful kettle
#

I'd say kill the script ๐Ÿ˜ 
anyone who wants to copy something probably wants to do something bad

untold sky
#
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]`
sinful kettle
#

why did you make everything unschd?!

untold sky
#

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

sinful kettle
untold sky
#

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

near cedar
untold sky
#

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 meowsweats
That's why I didn't do it back then

sinful kettle
untold sky
#

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

sinful kettle
untold sky
#

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

sinful kettle
#

what would be the point?

sinful kettle
#

btw do you think it's possible to prevent member access from outside?! meowsweats

#

or I guess it should be done via wrapper functions...

untold sky
#

although that check is really cheap

sinful kettle
#

well for example if you prefix a member name: ~method it becomes private meowsweats

#

or #method

untold sky
#

nope.
the _thisObj call... doesn't know if it was called from inside a method inside the same class, or from anywhere else

sinful kettle
#

yeah I figured

untold sky
#

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

sinful kettle
#

makeFinal ๐Ÿ˜›

#

finalize?

untold sky
#

I don't want to add a new command for a thing that we already have a command for that does the same thing

sinful kettle
#

will it work on arrays too?!

untold sky
#

For now I only want to add CODE and HashMap

untold sky
#

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 blobdoggoshruggoogly

gray wharf
#

yes, yes you want

untold sky
#

I should add a proper new error message type but that is soo much extra work :u

untold sky
sinful kettle
#

yeah

untold sky
#

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

sinful kettle
#

all?

untold sky
#

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

sinful kettle
#

you have to copy before you can sue
should I show the copy to my lawyer? thonk

untold sky
#

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 ๐Ÿคฃ

untold sky
#

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

sinful kettle
#

I prefer the errorless version

untold sky
#

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

gray wharf
#

or camelCasing

sinful kettle
#

e.g onCopy ๐Ÿ˜“

#

cc blobcloseenjoy

untold sky
#

cconstructor i was thinking about

#

but eh ๐Ÿค”

sinful kettle
#

why not use symbols?
constructor -> "()"
destructor -> "~"
copy -> "="

untold sky
#

might be too unreadable?

sinful kettle
#

well words are error prone, like you could get the casing or spelling wrong blobdoggoshruggoogly

untold sky
#

true that ๐Ÿค”

#

emoji ๐Ÿคฃ

#

# for flags then

gray wharf
sinful kettle
#

how about:
"class"
"!class" (or "~class")
"+class"?

#

"flags" (or "#class")

#

(or "obj" instead of "class")

untold sky
#

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?

sinful kettle
#

I guess so?

untold sky
#

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

gray wharf
#

I get PHP vibes here ๐Ÿ˜„

untold sky
#

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

#

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

gray wharf
#

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_ ๐Ÿ˜Š

sinful kettle
#

also constructor and destructor are hard to type meowsweats

#

maybe create and destroy? tho destroy is also hard to type

#

create and discard?

gray wharf
#

destroy is also hard to type
wat?

untold sky
#

well if you typoed them you'd probably notice quick

dreamy bane
#

delete? ๐Ÿ˜„

untold sky
#

create and destroy sounds better

sinful kettle
#

make and trash ๐Ÿ˜›

sinful kettle
daring wagon
#

destory...

sinful kettle
#

for some reason I always mess up things that have oy blobdoggoshruggoogly

sinful kettle
untold sky
#

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

sinful kettle
#

onToString is weird meowsweats

#

onString at least

#

or onStr

untold sky
sinful kettle
#

actually now that they're shorter # makes sense

#

#create #delete #str #clone #flags

untold sky
#

tostring sounded so nice ๐Ÿ˜ข
but str is better I guess ye

untold sky
#

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

sinful kettle
untold sky
#

if its just typo's then doesn't matter that can be fixed later on wiki ๐Ÿ˜„

sinful kettle
#

btw does it make sense to define the class it was created from? (I meant a new key #class) think_turtle

#

actually no nvm

untold sky
#

could
All the keys are copied though so its kinda there

sinful kettle
#

yeah that's what I meant by nvm ๐Ÿ˜…

untold sky
#

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)

regal nimbus
#

When you're searching for similar issues and the closest one is from 2013 :/

uncut briar
untold sky
#

yes, ticket, if you get ticket tonight I'll do it tomorrow ๐Ÿซ‚

desert trench
#

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)

gray wharf
#

I'd wager too risky for backward compatibility - use an event handler?

desert trench
#

We dealt with it already. Asking if its worth to report or not

gray wharf
#

nay

#

I will add the information to the setCaptive page

untold sky
# uncut briar <@90532520101183488> do you think it would be feasible to add third array elemen...

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.

uncut briar
#

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.

west onyx
#

do we have a function that selects unique elements in an array

alpine tulip
#

Removing duplicated? I guess arrayIntersect will do

west onyx
#

hmm

#

i must have been looking at the wrong wiki example

gray wharf
#

reformatted the description to make it clearer

fringe python
#

will arma devs be hanging around here

fathom slate
#

This is (probably) a channel dedicated to the feedback tracker, not for direct feedback.

fringe python
#

oh ok

mighty violet
#

no its for Feeeeeedback ;)

west onyx
#

<parent> modelPos <attached object> // [0,-3,1.56]

#

instead of <parent> worldToModel (getPosWorldVisual <attached object>)

#

is there demand for that?

solid marten
west onyx
daring wagon
#

I am wondering. Since the introduction of regex. Would it be feasible to implement wildcard support to Eden Editor search?

sinful kettle
#

getPosWorld is ASL

#

worldToModel takes AGL

#

please gib worldWorldToModel meowsweats

sinful kettle
#

it probably doesn't preallocate or something?

turbid terrace
#

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

alpine tulip
#

Shouldn't be new since is a model issue

turbid terrace
#

Yup, but I think I would've noticed it before, maybe not ๐Ÿคทโ€โ™‚๏ธ

west onyx
#

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

gray wharf
#

worldWorldToModel & worldWorldToModelVisual ๐Ÿ˜† ๐Ÿ˜…

west onyx
#

and a render scope variant for this function origin getPos [distance, heading]

#

origin getPosVisual [distance,heading]

#

unless it doesnt need one :\

untold sky
untold sky
sinful kettle
#

But why is it slower than insert and +? meowsweats

#

The benchmarks

#

There's not much difference tho meowsweats

#

But still it is slower

solid marten
#

@sinful kettle when you make a ticket, just pretend that we are all idiots and add steps to reproduce, please

solid marten
sinful kettle
#

So you mean I was wrong and it's not slower?

solid marten
#

No I mean what I said

sinful kettle
#

Well I'll do later today

#

I need to make a more reliable repro

daring wagon
#

and which "some places"? ๐Ÿค”

untold sky
#

yes, dunno but I've seen it

daring wagon
#

I see

#

I'll make a ticket when I am back home.

desert trench
#

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?

daring wagon
#

If someone has better/more example feel free to add them ๐Ÿ™

gray wharf
#

B_*_F

sacred river
#

Can I also post here a FT of a possible useful feature request?

outer frigate
#

you can

sacred river
untold sky
#

no :harold:

alpine tulip
#

Excuse me OFP Elite devs, what is this ๐Ÿ˜“

west onyx
#

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```
solid marten
#

Ask yourself this, is chemlight a weapon?

alpine tulip
#

I think is a magazine since is a grenade

solid marten
west onyx
#

hmm so it is. for some reason I had treated them as items. thanks for checking

#

must have been fiddling with "uniqueUnitItems" prior

gray wharf
untold sky
#

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

gaunt depot
untold sky
#

Yeah i hope it doesn't, which why asking so you can notify me if that happens

gaunt depot
#

Probably BI missions too as they probably use drawIcon too?

gaunt depot
untold sky
#

the icons drawing should be good-ish now.
I can't really see the squished text that you mentioned

gaunt depot
#

Didn't ACE have some extensions to map tools, ruler and all that, doesn't it use drawIcon for it too?

untold sky
gaunt depot
#

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

untold sky
#

Yep it breaks ACE's thing that tries to workaround the bug by doing their own stretching

untold sky
untold sky
#

Seems like images inside structured text also have the 640x480 hardcoded scaling ๐Ÿค”

gaunt depot
#
                    _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
untold sky
#

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 notlikemeow

#

Could it be that text is already fixed on dev branch?

gaunt depot
untold sky
#

My eyes cannot see that notlikemeow

gaunt depot
#

I guess I explain it wrong

untold sky
#

but the box around it is also stretched the same

gaunt depot
#

Both numbers outside of map and "drawIcon" text are both stretched vertically

gaunt depot
#

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

untold sky
#

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"

gaunt depot
#

That's why I suggested having this behaviour optional and configurable

gaunt depot
untold sky
#

Font handling is very special and hard to influence notlikemeowcry

gaunt depot
#

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

gaunt depot
#

This way 0.1x0.1 UI square stays square, text is drawn properly

untold sky
#

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

gaunt depot
#

Another way of doing it, but having displays with UI height = 2 to cover whole texture is pretty weird

gaunt depot
untold sky
#

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

gaunt depot
#

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.

untold sky
#

texture must be a string because 20 years of legacy

gaunt depot
#

Gonna make sure textures are generated before they're used

gaunt depot
untold sky
#

Then you can't pass the arguments

#

texture including all parameters leading to its creation must be a string

gaunt depot
#

Have createTexture do all the creation by right operand hashmap properties

untold sky
#

Can't

gaunt depot
#

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.

untold sky
#

Would have to network sync

#

and serialize

gaunt depot
#

Network sync? Why?

#

Textures are local, have each client do their own texture

untold sky
#

Because player2 will try to load "myproceduraltexture" and won't find it

untold sky
gaunt depot
#

setObjectTexture is local

untold sky
#

Ah local variant

gaunt depot
#

_rsc_picture ctrlSetText "#(argb,8,8,3)custom(myproceduraltexture)"

untold sky
#

ok that'd work, but then still serialization, and the network sync for when you use global variant

gaunt depot
untold sky
#

And won't work for textures set in p3d's, they are string only

devout wave
#

Textures as a mission config class? ๐Ÿค”

  • and normal config too
gaunt depot
#

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

untold sky
#

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

vocal abyss
#

What about generating the string?

private _textureString = createTextureString ...;
MyObj setObjectTexture [0, _textureString];
```Then you can easily build complex (not necessarily human-readable) strings.
untold sky
#

yeah that'd be easy

#

but.. why extra command for something you only ever do once and can do by hand just as well

gaunt depot
#

To be honest I long dreamed for more advanced procedural textures

untold sky
#

Can make a ~10 line script function that does the same and plop it on wiki

gaunt depot
#

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

untold sky
#

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

gaunt depot
#

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 thronking

gaunt depot
untold sky
#

new

gaunt depot
gaunt depot
# untold sky 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"

gaunt depot
#

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

near cedar
#

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)

regal nimbus
#

Do they delete their waypoint or just not move towards it?

near cedar
#

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.

solid marten
untold sky
#

no the code that was changed is same for tracked and wheeled

gaunt depot
#

I guess no reflections are caused by something else rather than it being "co" or "ca"?

near cedar
untold sky
#

co is diffuse, and default is diffuse

#

dunnรถ

#

reflections are in the material

ornate marlin
#

feedback for the feedbacktracker. little incetion taste :D

true solar
#

Upvote for glory m8s!

trim acorn
west onyx
#

@sterile nova gib ther vehicle cargo variants of these

alpine tulip
#

ViV can be done in a config side

#

No longer model tweak needed

west onyx
#

hmm

#

do we have access to do in vanilla or mod required?

alpine tulip
#

Mod required though unfortunately

#

But reyhard is not necessary needed

west onyx
#

who else is there to do vanilla configs for the models

alpine tulip
#

Ded or KK both can do config works no?

west onyx
#

not sure, usually they toss config work over to reyhard

tropic jewel
#

Is it intentional that the left custom info panel cannot be resized, but the right side can?

west onyx
#

probably they did not anticipate people still modding the game in 2023 ๐Ÿ˜„

#

"theyll never know"

west onyx
#

@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

alpine tulip
#

Sounds good to have

west onyx
#

I am using to find the longest sides of multiple bounding boxes to align

near cedar
#

huh i thought we already had min/max functions

#

guess not

alpine tulip
#

Only selectMax/Min?

#

Wait a minute doesn't select suit for you?

west onyx
#

well select returns the element, but doesnt return the index of the element

alpine tulip
#

True

#

selectMax and findIf does for you BTW?

west onyx
#

well im just using _arr find (selectMax _arr);

#

just thought it cute the bot wants a new command added to the library

alpine tulip
#

Fair

gaunt depot
#

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

solid marten
solid marten
gaunt depot
#

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

mint hedge
#

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

torn bear
solid marten
#

adding foreachreversed is not a big job however might need a separate class to keep performance intact

devout wave
#

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?

sinful kettle
#

yeah what on earth is that anyway?! ๐Ÿ˜…

gaunt depot
#

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

tropic jewel
rugged nova
#

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

sinful kettle
#

a hashmap already acts as a namespace tho? think_turtle

rugged nova
#

yeah, but no sync

sinful kettle
#

all changes to the hashmap are broadcasted to every client like the third parameter in setVariable
this doesn't seem like a good idea

rugged nova
#

and no persistence saving of data

sinful kettle
#

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

rugged nova
#

yeah, I was gonna ask for a force broadcast cmd and a pause broadcast cmd

sinful kettle
rugged nova
#

I should have said, a lifetime of Mission duration like missionNamespace

sinful kettle
#

but if you save the hashmap in missionNamespace you do get that result already

rugged nova
#

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

west onyx
#

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";

}];```

sinful kettle
#

what's the diff between eject and getout?

#

also who uses execVM anymore? meowsweats

near cedar
#

I think it's common

#

Especially when you want sleep

sinful kettle
#

you shouldn't use execVM in EHs

sinful kettle
near cedar
#

Doesn't execVM do that anyway?

near cedar
devout wave
sinful kettle
sinful kettle
near cedar
#

Does the speed matter much if the EH is triggered only sometimes?

devout wave
sinful kettle
sinful kettle
near cedar
#

And if regular EHs can unintentionally fire multiple times in a frame then maybe this should be stated somewhere prominently in the wiki...

sinful kettle
sinful kettle
near cedar
#

Oh i thought that was a reply to QS

west onyx
#

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

solid marten
#

Havent looked in it but without the ticket there is a chance I would overlook it

solid marten
gaunt depot
#

forEachReversed for hashmaps makes little sense due lack of order in the first place, but I still wonder

solid marten
#

no hashmap has no order

gaunt depot
#

So just command is just for arrays?

solid marten
#

yes

gaunt depot
#

๐Ÿ‘Œ

hallow sun
#

That will help a lot of noobs/beginners. Deleting in a foreach is a common mistake (also did it) ๐Ÿ˜†

solid marten
#

Might be worth to make a note in forEach to encourage to use forEachReversed for deletions

dreamy bane
#

has alt syntax for groups <array> been considered?

trim acorn
regal nimbus
#

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.

gaunt depot
#

Might be worth it, probably incorrectly sets effective commander by default

wind light
#

@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

patent trail
#

@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

wind light
#

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?

patent trail
#

I am talking more about the animation side

dusky wigeon
#

That's already in @wind light

patent trail
#

When you switch weapon's currently the your character stands still and switches to another weapon and then you can once again move.

wind light
#

Yeah, now i understand.

trim acorn
#

Thanks adam. But the weapon selection worked flawlessly, why was it removed again? (Vehicles)

patent trail
#

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.

wind light
#

@trim acorn because it sneaked out accidentaly. THe system is sitll being refined and improved :)

patent trail
#

Other stuff as in running or walking.

gaunt depot
#

Seen some random video on reddit, thought about you recently fixing that elsewhere

alpine tulip
#

ctrlSetAngle you mean?

gaunt depot
#

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
#

was just about to link that

dusky wigeon
#

Things discord needs #12312: forcing a link not to show the preview.

wind light
#

I'm pretty sure we already gave statement on the "Switching weapons while moving" issue multiple times. I might as well be mistaken.

dusky wigeon
#

Yep, doesn't stop people from wanting/dreaming about it tho. :P

patent trail
#

I don't remember seeing that attached to any of the feedback trackers

dusky wigeon
#

Check the Smookies posts in my thread about that addon in the video.

patent trail
#

Link?

#

Or is it the addon thread for that

#

ah..... I see its in the description

wind light
#
Bohemia Interactive Forums

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.

dusky wigeon
#

Yep.

wind light
#

Ok :)

dusky wigeon
#

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.

patent trail
#

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 ;)

trim acorn
#

Could it accidental sneak back in until the refined version comes back?

dusky wigeon
#

@patent trail I've gained a lot of sympathy for the BI employees in general recently.

patent trail
#

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 :(

dreamy bane
untold sky
untold sky
untold sky
untold sky
wind light
#

@trim acorn I dont think so :/

uncut briar
uncut briar
vagrant charm
#

soo feedback tracker huh? played almost 2400h, Im happy customer :D

desert trench
#

why is custom FOV not supported - too much engine work needed to have it working "everywhere"?

alpine tulip
#

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

gaunt depot
#

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)

untold sky
#

I forgot that in the graphics script command thingy i guess. That should probably also return FOV

gaunt depot
#

Lets draw thick black border around their screen when they're in 3rd person with a huge FOV FeelsGoodEnoughMan

uncut briar
uncut briar
#

But resolution can be found out too so probably doable anyway.

gaunt depot
#

Not sure what fovTop and fovLeft when you're on ultrawide ๐Ÿค”

uncut briar
#
fovTop=0.75;
fovLeft=1.7777778;

for 3440x1440

gaunt depot
#

I wonder if this messes up drawIcons on the map on stable? ๐Ÿค”

#

Unless only fovTop matters for it

vagrant charm
#

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 :)

desert trench
#

is there a workaround of sorts for ctrlSetAngle when people use a custom fov?

uncut briar
#

no

regal nimbus
desert trench
#

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?

uncut briar
desert trench
#

couldnt find anything via google than some locality problems with ammoboxes in the past - not sure if this is still actual tho

devout wave
gaunt depot
#

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

regal nimbus
#

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.

gaunt depot
#

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

uncut briar
#

Sounds like it will be quite fun to debug harold

regal nimbus
#

man, that's an effort repro :D

gaunt depot
#

Nice position, 7km under ground

uncut briar
#

Wasn't there an engine thingy that's supposed to prevent that?

uncut briar
#

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.

gaunt depot
#

Hm, maybe its only when its first activated?

regal nimbus
#

no no, that can definitely spam :P

gaunt depot
#

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?

regal nimbus
#

had multi-gigabyte logs full of moving the same can back to z=0

#

Might only apply to uncontrolled objects though?

gaunt depot
#

๐Ÿค”

#

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

regal nimbus
#

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".

sinful kettle
#

is it too slow?

regal nimbus
#

ah yeah, meant to check that.

sinful kettle
#

I use that in my mods but it's definitely slower than assignedItems

#

having an alt syntax as you said would be neat

regal nimbus
#

~8x slower than assignedItems

sinful kettle
#

well if you have something like ACE that fills you with bandages and stuff I'm sure it'll get much worse ๐Ÿ˜…

regal nimbus
#

This is a pretty clean vanilla loadout :P

#

just too many arrays to construct I guess.

sinful kettle
#

yeah. just make a ticket ๐Ÿ˜…

#

it's reasonable

dusky wigeon
gaunt depot
#

Not sure how much faster it is though

regal nimbus
#

About 7x slower than if it had the alt syntax :P

#

but I didn't know about findAny and it looks generally useful.

gaunt depot
#

getNumber(configFile >> "CfgWeapons" >> "ItemRadio" >> "type") => 131072
getNumber(configFile >> "CfgWeapons" >> "RadioItem" >> "type") => 611
thronking

#

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

desert trench
#

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

gaunt depot
#

What would be approximate ETA for 2.14 to go stable? Summer? Autumn?

azure crane
gaunt depot
#

nice

uncut briar
#

๐Ÿ‘ Using numbers for slots is bit meh but I can live with it.

gaunt depot
#
#define SLOT_RADIO 611
player getSlotItemName SLOT_RADIO
```looks nice
gaunt depot
#

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

solid marten
tropic jewel
#

Could setTurretOpticsMode and setTurretOpticsMode perhaps be extended to work with pilot's turret path [-1], for Pilot Camera zoom?

neon swan
#

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.

neon swan
devout wave
#

I think they mean like the targeting pod camera some jets have

neon swan
#

Ah okay, I missed it was that view but it is the same cam you get in the GPS HUD.

fathom slate
#

read the header below the channel name, that helps

outer spear
#

prepare thy selves.. previously ignored FPS warnings about ShipX vehicles and roadways, is about to get real.

fathom slate
#

why hatchet ?

outer spear
#

gonna release the Mk.V to the masses. :D

fathom slate
#

oh....

#

just read the tickets, this is going to be fun :D

outer spear
#

i expect a fair bit of screaming..

tropic jewel
neon swan
#

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.

tropic jewel
rugged nova
#

Hey Dedmen what ever happened to the attachTo disableCollision parameter?

untold sky
#

nothing

stone tree
unborn flame
unborn acorn
stone tree
gray wharf
#

all 3 removed, thanks

alpine tulip
#

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

gaunt depot
#

including the slot

alpine tulip
#

eg InventoryChanged?

gaunt depot
#

InventoryChanged sounds more broad, something like InventorySlotChanged

#
params ["_unit", "_slotNumber", "_oldItem", "_newItem"];
#

Something like that

alpine tulip
#

Oh I like

#

Not sure _slotNumber is mandatory

gaunt depot
#

Well it could save looking up slot type in config

alpine tulip
#

True

gaunt depot
#

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

uncut briar
gaunt depot
#

Performance gains! ๐Ÿ’ช

sinful kettle
gaunt depot
uncut briar
#

why it would fire

gaunt depot
#

If they are then probably on reload?

uncut briar
#

yes on reload.

sinful kettle
#

oh you're talking about those? meowsweats
I thought you mean getUnitLoadout

gaunt depot
uncut briar
#

I've linked CBA implementation, it's limited and works only on player for performance reasons.

gaunt depot
#

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.

gaunt depot
uncut briar
uncut briar
gaunt depot
gaunt depot
#

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

untold sky
gray wharf
#

plz fix 2.14 kthxbai

untold sky
#

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

uncut briar
#

Still a lot faster

regal nimbus
#

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.

desert trench
#

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

gaunt depot
#

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

gaunt depot
#

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

west onyx
#

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

sleek scaffold
west onyx
#

just something simple like uinamespace setvariable [format ['BIS_hideaction_%1',configname ...]];

stone swift
#

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?

stone swift
desert trench
#

seems some spam wave happening

stone tree
solid marten
#

Just realized how useful it would be to

regal nimbus
#

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?

gaunt depot
#

Script fix until its fixed in the engine:

compatibleMagazines ["arifle_Katiba_GL_F", configName(configFile >> "CfgWeapons" >> "arifle_Katiba_GL_F" >> "EGLm")];
regal nimbus
#

yeah, already did it

desert trench
#

wasnt there some fix or workaround in 2.12 or 2.10 already to have AI no longer shoot at empty static weapons?

devout wave
#

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
devout wave
#

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

unborn acorn
#
_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?

alpine tulip
#

getText (configfile >> "CfgWeapons" >> "arifle_AK12_GL_lush_F" >> "baseWeapon")->"arifle_AK12_GL_khaki_F"
Sanity check, am I the only one?

gaunt depot
#

Yep, I also have it like this

#

Looks like arifle_AK12_GL_lush_F was arifle_AK12_GL_khaki_F at some point

solid marten
#

@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

rapid badge
gaunt depot
#

Can't find a command that mass removes the googles

solid marten
#

what a mess

alpine tulip
#

What is this window after all? It is very frustrated to close this whenever it opens while I tweak the changelog

solid marten
solid marten
#

apparently addWeapon removeweapon works with all assigned items, always worked

#

what a mess

solid marten
#

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 blobdoggoshruggoogly

regal nimbus
#

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.

sinful kettle
#

no. that command is pretty much useless. it also has a lot of delay

devout wave
solid marten
gray wharf
#

it was that in OFP at least - setCaptive + removeAllWeapons

limpid rune
#

was extremely frustrating to have something that was almost useful

unborn acorn
dreamy bane
#

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

gray wharf
dreamy bane
#

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 ๐Ÿ™‚

gray wharf
#

just don't make mistakes

dreamy bane
#

lol

gaunt depot
#

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

solid marten
#

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

alpine tulip
#

I think no, never heard of

gaunt depot
#

Nope

tropic jewel
#

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;

https://youtu.be/Ial9o7p6q00

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

alpine tulip
#

How the cargo platform/museum parts configured? I'm interested

tropic jewel
#

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.

alpine tulip
#

Hmm

#

Softcoded solution is nice indeed

daring wagon
#

We just need a hash map with classes as keys and snap data as values blobcloseenjoy

#

Just checked the code. That's already the way you do it.

tropic jewel
tropic jewel
#

Posting here was more about how to best make the data and functionality available.

desert trench
#

Any chance to get these picked up?

  1. 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

  1. 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

  1. 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

desert trench
#

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

untold sky
#

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.

desert trench
#

๐Ÿ‘Œ

gaunt depot
#

A thought about nearGroups and nearLeaders: How about making inArea\inAreaArray\inAreaIndexes work with groups?

untold sky
#

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

gaunt depot
#

Then you could do:
allGroups inAreaArray _trigger

untold sky
#

When I saw that request I thought that was already a thing

gaunt depot
#

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

untold sky
#

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

gaunt depot
#

Is there allGroups SIDE like units SIDE? ๐Ÿค”

devout wave
#

groups side

gaunt depot
#

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

untold sky
#

alt syntax for "leader" sounds easy.
adding new leaders command feels too feature creep

gaunt depot
#

Is there a monthly quota for new commands provided by BI? ๐Ÿค”

#

Thought seriously leader ARRAY is fine too

untold sky
#

next we'll have drivers and gunners and commanders with array of vehicles and such more stuff. If we work like that

gaunt depot
#

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 ?

untold sky
#

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

gaunt depot
#

๐Ÿค”

uncut briar
gaunt depot
#

How about both commands and hardcoded optimisations for applying single commands? FeelsGoodEnoughMan

gaunt depot
#

allGroups apply {averagePosition _x} inArea...

untold sky
#

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));

uncut briar
#

I guess something similar could be done for select?

gaunt depot
untold sky
#

yeah sure

gaunt depot
#

count, select

untold sky
#

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

gaunt depot
#

I'll have a good playing around with it

gaunt depot
untold sky
#

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)

gaunt depot
#

๐Ÿค”

untold sky
#

aw no dev branch this week actually

untold sky
#

Most important part, we need to find a name for this process ๐Ÿ˜„
How about short-circuiting ๐Ÿค” Or direct evaluation

gaunt depot
#

Blast Processing

#

The Real Virtuality has blast processing, the Enfusion engine doesn't!

regal nimbus
#

Any chance of extending this optimisation to binary commands?

#

You could do pretty much anything with it by chaining applys then :P

untold sky
#

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 meowfacepalm

#

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;

notlikemeowcry

gaunt depot
#

๐Ÿค”

untold sky
#

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

gaunt depot
#

This is beginning to look like SQF dark magic

untold sky
#

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!!! ๐Ÿ˜  )

rose cloak
#

inb4 chaining 484 applies because it's faster than single 4-instruction one

outer frigate
#

dedmen chanting around his computer with a massive cloak on sacrificing miller to the sqf gods to get 90x better code performance

untold sky
#

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

untold sky
#
_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
untold sky
#

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]]

desert trench
#

Outstanding ๐Ÿ‘

untold sky
#

looks like no binary commands and no arrays for now

untold sky
#

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

regal nimbus
#

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.

sinful kettle
#

can't be _forEachIndex tho due to backward compat meowsweats

regal nimbus
#

oh, because you might be using apply inside a forEach?

untold sky
#

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]]

untold sky
untold sky
#

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

untold sky
#

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.

regal nimbus
#

raises eyebrow

#

maybe one day SQF will be fast enough to write stuff in it :P

uncut briar
#

Add PBR renderer to RV, let dedmen work on it 1-2 years more and it will be viable for Arma 4 pepe_laugh

#

|| and we can forget about that Refunder thingy ||

near cedar
#

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

untold sky
#

AI related stuff notlikemeow
fun

uncut briar
#

make a FT ticket with repro.

untold sky
#

AI related stuff is unlikely to be fixed

near cedar
#

i am aware how to give feedback, hold on ๐Ÿ˜„

untold sky
#

sometimes does happen though for major enough things. Which I think this is not

uncut briar
#

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.

near cedar
#

(I couldn't think of a proper name for the ticket anyway, which i also wanted to ask about)

uncut briar
near cedar
#

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"?

uncut briar
#

"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.

near cedar
#

I don't have the ability to attach a mission sadly, my gaming pc is on the other side of the planet notlikemeow

#

i'll add the repro in summer, or maybe someone else volunteers (perhaps the person that brought it up originally in GM discord)

near cedar
#

would improve immersion noticeably i think

gaunt depot
desert trench
#

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:

west onyx
#

โ€œplayers [east,west]โ€ to return list of sided players

gaunt depot
#

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?

gaunt depot
#

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

untold sky
#

notlikemeow 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.

gaunt depot
#

SQF performance gains month?

alpine tulip
#

Dedmen of the day I guess

gray wharf
#

Enfusion is cancelled guys, Arma 3 just got +9001% perf!

alpine tulip
#

Over 9000?!

alpine tulip
#

Can't we just invest Dedmen DLC?

gaunt depot
#

I'll buy 3

gray wharf
gaunt depot
gray wharf
#

what have I done now

untold sky
#

wow OFP had script types for Vector, Matrix3, Matrix4 ๐Ÿค”
Seems they were never used tho

gaunt depot
#

Deemed too hard for us SQF plebs I guess notlikemeow

untold sky
#

// this return same result as (bool)(this & with)
Followed by a 60 line function notlikemeow

gray wharf
#

"why make it simple whenโ€ฆ"

untold sky
daring wagon
#

@gray wharf We should document these findings on the biki. For historical reasons and to have something to smile About in the future

gray wharf
#

I want to fight depression, not feed it