ezremake
Member-
Content Count
25 -
Joined
-
Last visited
-
Medals
Everything posted by ezremake
-
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? -
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.
-
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! -
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. -
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 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? -
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? -
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. -
Only 20% of players can join my unmodded server
ezremake posted a topic in ARMA 2 & OA - Servers & Administration
Most players who connect to my server end up immediately disconnecting, and I have no idea what's causing it. My friends and I can all join with no problems, and a few random people have managed to join fine, but most players don't end up making it in. It's disheartening to spend all of this time making a map, watching all of these people trying to join, but failing to for some unknown reason. There doesn't seem to be anything reported in the RPT. It seems to happen with any map I try. -
Copy the addons folder from the Arma 2 folder to the OA folder where the dedicated server files are.
-
I'm having a hard time counting the score of groups of units. For instance, I have a trigger with the condition score p1 + score p2 + score p3 >= 10 Which works fine assuming p1/p2/p3 are all present, but if one or two of them aren't, the script doesn't run. I've even tried doing it in combinations i.e score p1 + score p2 >= 10 || score p2 + score p3 >= 10 || score p1 + score p3 >= 10 || score p1 + score p2 + score p3 >= 10 But it only works when all units are available. How do I go about doing this?
-
Counting Unit Scores
ezremake replied to ezremake's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the reply Schatten! Forgive my newbiness, but what would be the best way to incorporate that script? I've tried running it through a loop, but that just continually adds score on top of itself. **EDIT** Ended up making some adjustments, and running it through a loop. Seems to work great now. { if (!(isNil _x)) then { _unit = missionNamespace getVariable _x; _oldScore = _unit getVariable["OldScore",0]; _currentScore = score _unit; _diffScore = _currentScore - _oldScore; scoreSquad1 = scoreSquad1 + _diffScore; publicVariable "scoreSquad1"; _unit setVariable["OldScore", _currentScore, true]; hint format ["%1",scoreSquad1]; }; } forEach ["s1", "s2", "s3", "s4"]; -
MP Killed Event Handler running multiple times on dedicated
ezremake posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've created a simple mission where a team of players has to get X amount of kills within Y lives, against the AI. Pretty straight forward. For some reason, my function in the MP killed event handler is running more than once, but only in a dedicated server environment. If I play on a local multiplayer game, each death counts as one, but as soon as I'm on dedicated, each death counts as 2. In my map's init I have if (isServer) then { execVM "DynamicWeatherEffects.sqf"; execVM "setScores.sqf"; }; and inside of setScores.sqf I have the function that is called through the MP killed event handler. (Variables are predefined earlier in setScores) deathRoutine = { teamDeaths = teamDeaths + 1; publicVariable "teamDeaths"; [nil,nil,rEXECVM,"Deathint.sqf"] call RE; }; Deathint.sqf is a simple hint hint format ["Lives Lost: %1 / %2\nKills Made: %3 / %4",teamDeaths,maxDeaths,scoreSide west,scoreLimit]; I have the event handlers in the unit init lines, which I'm not sure is causing the problem or not. -
MP Killed Event Handler running multiple times on dedicated
ezremake replied to ezremake's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The event handler is just in the individual units init line Last night I tried using the regular addEventHandler using Killed instead of MPKilled, and it seems to work just fine in all environments, which is weird because of it being local. I guess I really don't understand locality as well as I'd thought in this game lol! -
[SP/MP] Rustwater Company - Epic COOP Mission
ezremake posted a topic in ARMA 2 & OA - USER MISSIONS
Rustwater Company by EzRemake Download: https://drive.google.com/file/d/0B9-2S80TsyfsWXBlV0pVT3EtTEU/edit?usp=sharing Description: You are a private military contractor with the Rustwater Company Mercenary Group. You have been placed in branch unit 6, tasked with inciting a civil war in Takistan between the local militia and the Takistani Army. All and any other third party factions are also to be targeted in this operation, as neccessary. Primary objectives consist of the routine destruction of key equipment owned by either the Militia, Army, or Private factions. Any key individuals discovered belonging to either of these factions are to be assassinated. Features: -Epic 20 objective mission +Assassinations +Hijacking +Objective Destruction - Oh so much objective destruction! -Requires team work and coordination -Many weapon types available throughout the mission, including special weapons -Random starting time and weather -Random starting weapons for all players -Small chance of being gifted a free vehicle at mission start -Singleplayer, Multiplayer, Dedicated Server & JIP compatible! Installation: Extract to Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\Missions OR MPMissions Included files: Rustwater v0.3.7.rar -Rustwater.Takistan.pbo Change log: v0.3.7 First public release! Changes will be placed here. Notes: It is normal to experience 20 seconds or so of heavy lag while units are being cached during the start up of the mission. Credits & Thanks: Murklor - Thanks for the murkspawn script Norrin - Love your revive script! Engima - Random weather and other bits and pieces -
Looking for script simillar to MurkSpawn.
ezremake replied to Mirek's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What you need to do to make this work properly on multiplayer is first make sure the while loop condition is different. I am using a simple public variable. The second thing would be to pick which units you want this script to be based around, by changing _x distance player to _x distance unitname or something similar. You could have this script checking multiple units if you really wanted to. I think if you're dealing with a general coop mission, having it run around the squad leader unit is more than enough. -
Looking for script simillar to MurkSpawn.
ezremake replied to Mirek's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was looking for a solution for despawning units once the player got so far away from them, I eventually figured it out so I thought I would share. while {alive player} do { //---delete all men further than 400 meters--- { { if (_x distance player > 400 && isNil {_x getVariable "isPlayer"}) then { _x removeAllEventHandlers "killed"; deleteVehicle _x; }; } forEach units _x; { if (_x distance player > 400 && isNil {_x getVariable "isPlayer"}) then { {deleteVehicle _x}forEach (crew _x); if (isNil vehicleVarName _x) then {deleteVehicle _x;} }; }forEach vehicles; sleep 0.5; deleteGroup _x; } forEach allGroups; }; Make sure that you setVariable ["isPlayer",1] on units which you do not want to despawn when away from other players (i.e team mates) -
Glorious Bastards by EzRemake Download: Version 0.8 Major fix https://drive.google.com/file/d/0B9-2S80TsyfscXBGcmtXM3FuTG8/edit?usp=sharing Description: It has been 73 hours since your extraction UH-1Y has been brought down into hostile territory. The Russian forces have begun to amass their arms in preparation for an upcoming war, and have taken hostile actions against all Westerners whom have crossed their paths. When your extraction helicopter was taken down by enemy forces, you and your squad were unable to procure weapons or supplies. You have been wandering three days with no food or supplies, and with the Russians becoming relentless nearby, you feel as though you and your men should take action. Your mission is to explore war torn Chernarus, while sabotaging the Russian war effort. Maintain your efforts on destroying vital Russian Communication Towers, while also destroying any other valuable military assets that you discover. Stay aware, and work as a unit, as Chernarus has been set ablaze with war, and the local Insurgents are taking advantage of the situation. Features: -Hectic combat environment. -Random spawn points with random weather and time for a truly random 'lost' starting experience. -Several side missions with awesome special weapons rewards. -Skalisky 'Dead Zone' island for an unknown challenge with unknown rewards. -Selectable AI difficulty. -Singleplayer, Multiplayer, JIP compatible! Installation: Extract to Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\Missions OR MPMissions Included files: GloriousBastards.pbo Change log: v0.8 - Fixed blue and yellow missions not spawning any loot v0.7 - Fixed sometimes randomly getting "teleport to party leader" on death - Made yellow and blue missions more lenient, no longer requires that both squads are entirely dead v0.6 R4 - Fixed spawning issues which sometimes occur v0.6 - First public release! Changes will be placed here. Notes: Dedicated server is not recommended, as spawns happen much less often. Recommended hosting from the multiplayer menu. Credits & Thanks: Engima - I learned a lot from you, thanks! Norrin - Love your revive script!
-
I'm pretty new to editing and scripting in ARMA, and was curious if the full init.sqf runs every time a player connects, or if just the JIP portion of the init.sqf Here is my init.sqf as an example // JIP player if (!isServer && isNull player) then { waitUntil {!isNull player}; [] execVM "initTeleportToSL.sqf"; server execVM "revive_init.sqf"; execVM "briefing.sqf"; }; // Run scripts for everyone server execVM "revive_init.sqf"; execVM "briefing.sqf"; execVM "DynamicWeatherEffects.sqf"; // Random starting time if a server with random start time selected in parameters if isserver then { private "_t"; _t = paramsarray select 0; if (_t == 99) then { _t = random 24 }; skiptime ((_t - daytime + 24) % 24); }; // Day and night cycle if(not isNil "paramsArray") then{ [paramsArray select 1] spawn { _skipspeed = (_this select 0)/2; while{_skipspeed > 0} do{ sleep 0.5; skipTime(_skipspeed/3600); }; }; }; 0 cutText ["", "BLACK FADED"]; if(true) exitWith {}; If someone JIP will only the (!isServer && isNull player) portion run, or the whole thing? If the whole thing runs, essentially I'd be running these other scripts twice. Also, if the full init.sqf runs every time, how would you go about predefining public variables without them being reset every time?