1.56 New Commands Conversion
- https://community.bistudio.com/wiki/selectRandom
selectRandom _arr_arr select floor random count _arr - https://community.bistudio.com/wiki/apply
[1,2,3] apply {_x * 2}[[1,2,3], {_this * 2}] call ACE_common_fnc_map - https://community.bistudio.com/wiki/select
[1,2,3,4] select {_x > 2}[[1,2,3,4], {_this > 2}] call ACE_common_fnc_filter - http://feedback.arma3.com/view.php?id=26682
["one", "two", "three"] param [[1, 2, 3] find 5, "not found"]["not found", "one", "two", "three"] select (([1, 2, 3] find 5) + 1)Note:paramdoes not set the variable to private likeparams
Direct conversions:
- [x] To
joinStringfrom- [x]
CBA_fnc_join
- [x]
- [x] To
splitStringfrom- [x]
CBA_fnc_split - [x]
BIS_fnc_splitString
- [x]
- [ ] To
AGLToASLfrom- [ ]
FUNC(positionToASL) - [ ]
EFUNC(common,positionToASL)
- [ ]
- [ ] To
ASLToAGLfrom- [ ]
FUNC(ASLToPosition) - [ ]
EFUNC(common,ASLToPosition)
- [ ]
- [x] ~~To
#include "..\"script_component.hpp"(insidefunctionfolders) from~~- [x] ~~
#include "\z\ace\addons\<component>\script_component.hpp"~~ - We won't be doing this :+1:
- [x] ~~
Other improvements (just for reference, not necessary to complete this issue):
lineIntersectsSurfaces- major improvements (attach, frag, missile guideance, laser ...)getAllHitPointsDamage/setHitIndex/getHitIndex- can make repair work on sub turrets that have identical hitpoint namesgetModelInfo- should improve wire cuttersdidJIP- JIP detect incommonmagazinesAllTurrets- rearmingobjectParent
Add others in comments. Those checked off above are either done or not found in ACE3 codebase.
I don't know if remoteExec is a great idea. I haven't looked into the "security" functionality of it yet, could users theoretically break code that uses it?
@SilentSpike They've added a great deal of security functionality to it, from quick BIKI read you can now white-list things through CfgRemoteExec. I was just thinking it could be a better replacement in terms of performance for the current remote execution framework in ACE3.
I mean to say, would the "security" functionality result in ACE scripts being blocked if the user configures it a certain way
Afaik, it would. Server admins can disable RemoteExec completely.
Ah, I see.
Kinda defeats the whole purpose of the command :stuck_out_tongue: Good job BI :star2:
(Will have to look into to check that is the case, but from what I've read in passing it sounds that way too)
It's for Alive, Koth, Epoch etc... servers
Easy, drop-in stuff:
- [ ]
AGLToASLreplaces fnc_positionToASL.sqf - [ ]
ASLToAGLreplaces fnc_ASLToPosition.sqf - [ ] # include supports parent folders
#include "..\scriptComponent"
Non-trivial:
- [ ]
lineIntersectsSurfaces- amazing (attach, frag, missle guideance, laser) can all be improved - [ ]
getAllHitPointsDamage/setHitIndex/getHitIndex- can make repair work on sub turrets that have identical hitpoint names - [ ]
getModelInfoshould improve wire cutters
isJIP can probably be used for something in common
shownHUD, showHUD for https://github.com/acemod/ACE3/pull/1857
Propably magazinesAllTurrets for rearming ? @GitHawk ?
Thanks @SzwedzikPL May make determining if a vehicle can be rearmed easier
common's jip detect on line 320 in postInit is wrong and runs on all clients, replace with new isJip and then verify that fixing doesn't break anything in medical which uses that event
getAllHitPointsDamage for common_fnc_getHitPoints. I think it can solve https://github.com/acemod/ACE3/issues/2259
Can someone confirm how exactly remoteExec works? If used from the server it should still be allowed no matter what, is that correct? And so only client execution of it can be restricted.
From https://community.bistudio.com/wiki/Arma_3_Remote_Execution
Note: Server doesn’t have any limitations at place, everything is enabled and opened for him. All limitations and rules apply only for client(s).
Seems that magazinesAllTurrets and shownHUD are not available in 1.50 :|
AGLToASL - positionToASL are not equal
Our positionToASL is wrong, it converts to ASLW.
When standing on docks:
(player modelToWorld [0,0,0]) = getPosASLW player //Moves with waves (ASLW)
(player modelToWorld [0,0,0]) call ace_common_fnc_positionToASL returns ASLW
getPosASL player == aglToAsl (player modelToWorld [0,0,0]) //Static, not moving
https://community.bistudio.com/wiki/Position#PositionAGL is a great reference.
modelToWorld, worldToModel, modelToWorldVisual, worldToModelVisual, positionCameraToWorld, intersect, terrainIntersect, isOnRoad, drawIcon3D, drawLine3D, distance, moveTo, doMove, move, setDestination, buildingPos, screenToWorld, worldToScreen, AGLToASL, ASLToAGL
are all "AGL".
Because our function isn't right, we need to be careful when converting (EG, interaction menu expects the "wrong" value)
I recommend renaming positionToASL to positionToASLW during the conversion process.
#2319 #2311
Edited OP as we won't be using the relative filepaths