ezremake
Member-
Content Count
25 -
Joined
-
Last visited
-
Medals
Community Reputation
13 GoodAbout ezremake
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
JiP Queue and Entities piling up...
ezremake replied to ezremake's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Definitely appears long uptime persistence is not this game's strong suite. I suppose that's ok though once you realize that, just going to need a new approach to a few things. Thanks for the heads up! -
I've been noticing a huge amount of 'Server: Object not found' errors in my server's RPT and did some digging into my JiP Queue and it seems like there is a huge amount of information that just isn't being removed. Most functions claim to removed themselves from the JiP queue when the objects they are bound to become null, but my #exportJIPqueue log is proving otherwise. Particularly, I'm noticing a ton of supply crate objects and vehicles, and the items that are going inside of them. It's looking like addMagazineCargoGlobal and the other CargoGlobal commands aren't removing themselves from the JipQueue when their containers become null. I've tried using all of the clearCargoGlobal functions, as well as making sure the owner of the object is the server, before deleting. This seems to be making no difference at all. I'm noticing as well, that in my logEntities log, there are thousands of these supply crates under the 'out vehicles' section, all which claim to be simulated and located at [0,0,0]. I am assuming these are the same null objects that are being held in the JIPQueue? How do I go about cleaning out the JIPQueue and deleting these objects properly? All vehicles and units are created server side, and they are deleted server side, so I have no idea why this would be an issue.
-
For those of you out there who run AI on their servers/headless clients, how much CPU are you seeing them use on average? I'm wondering how some servers manage to run hundreds of AI, when I'm personally seeing ~20-30% usage with just 16 AI units running on a 3.2Ghz dual core (nothing fancy I know, but still). Just doing a test with no scripts, 20 red ai vs 20 blue ai, and usage was on average 80%. I'm trying to figure out what kind of factors might play into making it better/worse. I know AI fighting in towns increases usage for sure, as does fighting around smokes or during night time.
-
AI > Headless client > Event handlers (Tracking Kills, etc)
ezremake replied to Col. Ben Sherman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Move your fn_handleKill.sqf to the serverside, make a precompiled function out of it. When you create your ai units, attach the event handlers like this [_aiUnitHere,["killed", {[[_this,(_this select 1)],'FN_HandleKillFunctionHere',false,false] call BIS_fnc_MP}]] remoteExec ["addEventHandler",0,true]; -
AI are dumb as bricks when localized to players
ezremake replied to ezremake's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I did a huge scale rewrite on my mission, and dialed the AI back all the way down to 10 units. I'm still seeing an average of ~30% CPU usage, even with 0 players online. I can't understand it, especially since when the server first starts with the 10 AI, the CPU usage is only about 10-15%. I figured maybe one of my loops was the problem, but I've pretty much disabled 90% of them and the CPU is still an issue. I have no idea how servers use 100s of AI without a headless client, if I can't even use 10 without 30% CPU usage.... I swear it never, ever, used to be like this. Is there a way I can actively profile my server's performance while it runs? I need to get script profiling from the active environment, running script profiling in EDEN is almost useless for me as 90% of my scripting is serverside and relies and exDB3 which EDEN can't use.. -
AI are dumb as bricks when localized to players
ezremake replied to ezremake's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I almost expected this to be the case. God Arma 3 is such a greedy game, needing 2 server machines just for something like this... My dedicated server is only a dual core 3.40ghz, so running a headless from the same machine would be pointless unfortunately. How much CPU usage would you say a player uses on average from your experiences? Does it get significantly worse when players are in the same vicinity. Does ARMA 3 take any measures when CPU hits 100%, or does it immediately just start to choke out clients with red chains? I'm trying to figure out if what I've spent months making is even going to be feasible. I honestly can't believe ~20 AI is eating up 80% of a 3.40ghz processor. -
AI are dumb as bricks when localized to players
ezremake posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I use roughly 20-30 respawning AI in my mission, and had noticed that server CPU usage would spike into the high 80s and 90s when there were enough players online to have all the AI engaged. Seeing that I do not have access to a headless client at this time, I figured I would write something to evenly distribute the AI load onto the players. This did wonders for lowering server overhead, however it seems to have come at the cost of AI functionality. When the AI is setGroupOwner'd on to players, they become dumb, shoot at a slow pace, and miss most of their shots. Using setSkill doesn't seem to do much unless the unit is owned by the server. I figured the slowdown when local to players is due to client -> server -> client communication, rather than the standard server->client. Is there any way to improve this without having to get a second machine just for AI calculations? It seems kind of over egregious for just 24 AI.... I figured my server would have been able to handle it, being 3.40ghz.. Do higher Ai skill settings increase CPU usage by any chance? -
extDB (arma3 extension linux/windows)
ezremake replied to torndeco's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Just started learning how to use extDB3, and I'm having a hard time grabbing values from the database. I am able to use INSERT and UPDATE no problem at all, but custom calls with output values show up with a bunch of extra brackets and what appears to be the returnID? even though I have that disabled. One of my functions for instance: [getMoney] ;; Prepared Statement = true ;; If set to false, uses SQL instead of Prepared Statement Return InsertID = false ;; Strip Chars = "" ;; Strip Chars Mode = 0 ;; Incase you want to override the Strip Chars from [Default] SQL1_1 = SELECT Money FROM stats WHERE PlayerUID = ?; SQL1_INPUTS = 1 OUTPUT = 1 Will return [1, [[3000]]] Stripping [] character would help in an instance like this, but would not work on stored values like loadouts. I'm also not sure how to get rid that of preceding '1', as Return InsertID = false When I issue the callExtension for these functions using either of the 'GET' functions, my whole game just crashes with nothing to the logs. Not sure if maybe I'm just using those incorrectly? Are the 'GET' functions considered Async? I'm guessing I wouldn't want to use 0:Sync often for retrieval of values? _result = "extDB3" callExtension "0:sql:getMoney:666"; -> returns [1, [[3000]]] _result = "extDB3" callExtension "4:sql:getMoney:666"; -> crashes Here's what my database looks like Link Thanks for any help! Loving the addon so far! **EDIT** I've found a rather hacky way to isolate the variables when I call them. _key = call compile format["%1",_result]; _key = _key select 1; _key = _key select 0; _key = _key select 0; Seems to get around all those pesky square brackets, it just feels as if this is not the proper way to retrieve values (correct me if I'm wrong). -
I'm running a vanilla server with no mods, and no DLC (no APEX). I have no problem connecting, and I have seen and played with a few people so I know people can connect, but I notice a large majority of people connecting get disconnected immediately. I've checked the console and RPT, and there's nothing telling there. Could this be a case of people trying to connect with client side mods active? If so, is allowing client side mods as easy as putting their keys in the server's key folder? If this is the case, which mods would be recommended to have server keys for?
-
Getting local scripts to fire once at a time
ezremake replied to ezremake's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sadly this turned out not to be the solution, the script will still fire multiple times if tripped simultaneously. Any ideas? -
Destroying vehicles with dead crew in warfare
ezremake replied to pcc's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Run this script on all vehicles you want to be cleaned, it destroys abandoned vehicles, or vehicles with dead crew after 3 minutes. If the player gets in the vehicle, the script will obviously hold off on blowing up the vehicle. _unit = _this; _stacks = 0; while {alive _unit} do { if ({alive _x} count crew _unit <= 0) then { _stacks = _stacks + 1; if(_stacks >= 3) then { _unit setDamage 1; }; }; sleep 60; }; Combine this with the master "cleaning script" that loops on the server itself: if(isDedicated) then { while {true} do { // Clean dead units {deleteVehicle _x;} forEach allDead; // Clean abandoned { _unit2 = _x; if((owner _unit2) <= 2 && _unit2 getVariable["ServerVehicle",0] != 1) then { deleteVehicle _x; diag_log "Deleted unit for no ownership"; }; } forEach allUnits; // Clean far units { _unit = _x; if ((side _unit) == east) then { if ( ({(_unit distance _x) > 800} count playableUnits) == ({isplayer _x} count playableUnits) ) then { deletevehicle _unit; diag_log "Deleted unit for too far"; }; }; } forEach allUnits; // Clean far vehicles { _unit = _x; if ( ({(_unit distance _x) > 800} count playableUnits) == ({isplayer _x} count playableUnits) && _unit getVariable["ServerVehicle",0] != 1) then { deletevehicle _unit; diag_log "Deleted vehicle for too far"; }; } forEach vehicles; sleep 300; }; }; Make sure to change the side from east, to whatever you use for your enemy AI. You can also play with the distance from 800. In addition, any vehicles in your map that you give the setVariable ["ServerVehicle", true], will be skipped by the cleaner. -
Getting local scripts to fire once at a time
ezremake replied to ezremake's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
And just as I posted this I came up with an idea to try, someone correct me if I'm wrong. Since execVM puts scripts in scheduled environment, wouldn't this issue be solved if I moved the ({alive _x} count units Group1) <= 0 To the script itself, instead of the trigger condition which is non-scheduled? That way the distance conditions can run multiple times all they want, but because the scripts are scheduled, all instances run after the first won't spawn in units? -
Getting local scripts to fire once at a time
ezremake posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've been using repeatable triggers that spawn in AI units based on a player's distance to the trigger, For instance, for the G1 trigger, which checks and lists Independent faction members, has the condition field is as follows: ({alive _x} count units Group1) <= 0 && player distance G1 <= 400 && player distance G1 >= 200 && ({alive _x} count thisList) <= 1 This works exactly as it should if a player enters the area; so long as there are no current Group1 members alive, and no other Independents in the area - the AI are spawned in at the marker location "Group1". The AI are spawned locally, as to not overwhelm the server with AI computations. The problem: If two or more players trip the trigger simultaneously, which is mostly seen with players riding in vehicles together, the trigger will run multiple times, as technically Group1 doesn't have any units yet. How can I prevent this type of overlap without having to revert to spawning units server side? -
Only 20% of players can join my unmodded server
ezremake replied to ezremake's topic in ARMA 2 & OA - Servers & Administration
I know people jump around servers, but this isn't that. Several times I've seen the same person try to connect several times in a row. The timing of the connect / disconnect messages suggests they're not even making it to the lobby. -
Copy the addons folder from the Arma 2 folder to the OA folder where the dedicated server files are.