Jump to content

naught

Member
  • Content Count

    99
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by naught

  1. AI Caching and Distribution Script v1.0.2.4 - v1.0 RC 4 By Naught GitHub: https://github.com/dylanplecki/ArmaScripts/tree/master/Arma%202/Unit%20Caching Issues: https://github.com/dylanplecki/ArmaScripts/issues Download: https://github.com/dylanplecki/ArmaScripts/releases/tag/UCD_1_0_2_4 Orignal Thread: http://forums.unitedoperations.net/index.php/topic/21527-ai-caching-and-distribution-script/ Description An SQF script designed to dynamically cache and distribute AI units across machines for maximum performance. This script will be my first fully-autonomous script, meaning no setup required! This script is completely plug-and-play, with no dirty work required. It will cache all AI units and spawn them when players get close to them, and will automatically distribute AI across multiple headless clients. And the best part is is that you can still use your current method of AI spawning, whether it's through the editor or via a script. The only requirement is making a headless client slot, which is very simple and shown below. Now mission makers who have been too intimidated by the script knowledge needed to make headless client or cached/respawning AI missions can utilize all of the performance benefits that it brings with them! Even users who already have implemented headless client will benefit from the script immensely due to the pure efficiency of it's caching and distribution mechanisms, which are much better than most which are already implemented in missions. Features Fully plug-and-play, simply drag-and-drop the script into your mission and it autonomously works its magic. Works with nearly all AI spawning scripts on any machine. Caches AI units, meaning all units but a group's leader (configurable in config.sqf) are saved and deleted, and then respawned when players get close. Dynamically allocates units to headless clients, meaning that if headless client(s) are available, it will transfer AI to them. If any HC's are open, the server won't process any AI. And it does all of this automatically. Fully configurable caching settings in the config.sqf, including some experimental vehicle caching (not currently recommended). Built using my new Object-Oriented-Programming (OOP) framework for high-performance OOP code. Built for speed and performance. Headless Client If you choose to enable AI distribution (on by default), make sure you create a headless client unit like this: http://archive.plecki.net/img/hc_example.png (1042 kB) Requirements Arma 2 OA [1.62] Arma 3 [any version] CBA [any version] Known Issues AI unit caching may not be compatible with script which count AI, like end-scripts. An easy fix would be to end the mission on the absence of all AI, and not a percentage. AI unit caching doesn't work well with AI vs AI scenarios, and shouldn't be used unless players are always in close proximity to the action. Has a CBA dependency for the reliable CBA_fnc_players and the even better XEH. AI distribution may break scripts which modify AI behaviour (such as UPSMON). To fix this, an advanced user may use the "CACHE_UNIT_SPAWN_FNC" definition to define a function to load and process on every cached unit spawn, such as this (where "MY_fnc_unitSpawn" contains code with differentiates between vehicles and units and runs scripts accordingly): {_this call MY_fnc_unitSpawn;} // _this == _spawnedObject Changelog 1.0.2.4 [FIXED] Crewed vehicles retain their states over caching and distributions. [FIXED] Units now properly retain set positions if specified before caching/distribution. [FIXED] Vehicles are no longer distributed (needless operation). [FIXED] Setting of vehicleVarName should now propagate to all machines. [FIXED] Renamed array manipulation function to match syntax (minor edit). 1.0.2.2 [FIXED] AI no longer flee when their group is cached (work-around). [FIXED] Library linkages now correctly handle others' exceptions. [FIXED] 'No entry in CfgMagazines ...' error has been fixed (due to currentMagazine command). [FIXED] Rewrote the caching functions to check for all exceptions at the correct points. 1.0.1.8 [FIXED] 1.0.1.7 regression which caused caching checks to spin infinitely. 1.0.1.7 [FIXED] Units' volatile shifts to leadership are now accounted for while caching. [NOTE] SSD crashed, proceeding without testing (for now). 1.0.1.6 [FIXED] Possible error in config.sqf with wrong types. [FIXED] Enabled CBA caching of static files for release version. 1.0.1.5 [NEW] Initial public release.
  2. SQF Crypt Script Version 1.0 By Naught Download: http://pastebin.com/iH1uF3Vh (all of the documentation is included in the file) Hello all! So I've been playing around with binary in SQF, and I've managed to develop a really neat encryption script completely in SQF. Currently it only employs the RC4 stream encryption algorithm, but can be fitted to support more. It's full encryption, just as you would get as if you were coding in C! But it's only currently running at 6 kB/s in the unscheduled environment. Note: Encryption may not produce the same values as another program might, as all 0 values in the encrypted text are converted to the value 256, as SQF counts values of 0 as null-terminations of strings. Example #define CRYPT_KEY "my_secret_key" private ["_text"]; _text = "Hello World!"; hint _text; // Outputs "Hello World!" _text = [1, "rc4", _text, CRYPT_KEY] call ALiVE_fnc_crypt; hint _text; // Outputs "ïÇ(RÃ"NdØ}O" _text = [0, "rc4", _text, CRYPT_KEY] call ALiVE_fnc_crypt; hint _text; // Outputs "Hello World!"
  3. Object Oriented SQF Scripting v1.3.1 - v1 Commercial Distribution b1 By Naught GitHub: https://github.com/dylanplecki/RBS/blob/master/addons/rbs_main/h/oop.h Issues: https://github.com/dylanplecki/RBS/issues Download: https://raw.github.com/dylanplecki/RBS/master/addons/rbs_main/h/oop.h Description What is object oriented programming? From Wikipedia, the page being a recommended read for anyone interested in the possibilities of object-oriented programming (OOP), So, as you can see, Arma is already largely object-oriented with its extensive use of vehicles, units, players, shapes, groups, locations, and so on. So wouldn't it be logical to fully carry this syntax over to the SQF scripting language? So what can I do with it? Instead of having long, drawn-out lists of functions all centered around the same goal, we can instead have one object with many functions (behaviors) and variables (states) integrated within it. This practice can simplify complex tasks by utilizing our minds natural thinking pattern of internal and external interaction - or what "I" do, and what "they" see. For example, in Arma we can have an object such as a "platoon", and that platoon is made up of Arma groups. Instead of making an array holding a list of all of these groups, and then having functions for adding/removing groups from the platoon, we can just have a platoon object, with an array of groups as one of its states and have the adding/removing of groups as some of the platoon's behaviors. A pseudo-sketch of this object would look like this: class Platoon { array Groups; function AddGroup(group); function RemoveGroup(group); }; So now all the programmer has to do is create a new Platoon and add/remove groups directly to the object - easy, right? Features Human-readable syntax that closely resembles PHP's OOP integration. Extensively documented source-code for ease-of-use. Only one header file, and it's fully macro-based, and only executed by the preprocessor. Implements full class-based object inheritance. Compiles to full-speed SQF code, so no need for run-time interpretation! Allows for public, protected, and private class members, for instituting complex objects and inheritance. Full support for polymorphism (to the limits of the SQF syntax). Small memory footprint - all functions are static, and no code is unnecessarily duplicated. Support for constructors and deconstructors. Completely recursive via the MEMBER macro. Allows for static variables, which are persistent to all classes of the same type. Note: Objects cannot be copied to other machines just by sending the object variable - all data members (object variables) need to be serialized (preferably to an array), transferred, and then added to a new object on the remote machine. Examples Sorry for the weird indentation, that's what I get for working in Linux. Basic Example (probably doesn't work): #include "oop.h" CLASS("StatSheet") // Player Statistics Sheet Object PRIVATE STATIC_VARIABLE("scalar","playerCount"); // Static variables are shared amongst all instances of this class PRIVATE VARIABLE("object","player"); PRIVATE VARIABLE("scalar","kills"); // Scalar == Number PRIVATE VARIABLE("scalar","deaths"); PRIVATE VARIABLE("scalar","score"); PUBLIC FUNCTION("object","constructor") { // Accepts an object as a parameter private ["_player"]; _player = _this; INC_VAR("playerCount"); // Increases the member by 1 MEMBER("player",_player); // Sets the member to the given value MEMBER("kills",0); // Important to initialize all necessary members MEMBER("deaths",0); MEMBER("score",0); }; PUBLIC FUNCTION("nil","deconstructor") { // Accepts no parameters (nil) DEC_VAR("playerCount"); // Decreases the member by 1 DELETE_VARIABLE("player"); // Must delete all members on deconstruction to avoid memory leaks DELETE_VARIABLE("kills"); DELETE_VARIABLE("deaths"); DELETE_VARIABLE("score"); }; PUBLIC FUNCTION("","addKill") { INC_VAR("kills"); MEMBER("kills",nil); // Return total kills }; PUBLIC FUNCTION("","addDeath") { // Also accepts no parameters (same as "nil", or "" == "nil") INC_VAR("deaths"); MEMBER("deaths",nil); // Return total deaths }; PUBLIC FUNCTION ("scalar","addScore") { // Accepts scalar (number) as parameter MOD_VAR("score",_this); // Adds the param to the member, ie. (0 + 1) }; PUBLIC FUNCTION("","getKills") FUNC_GETVAR("kills"); // Shorthand for getting variables PUBLIC FUNCTION("","getDeaths") FUNC_GETVAR("deaths"); PUBLIC FUNCTION("","getScore") FUNC_GETVAR("score"); ENDCLASS; EXAMPLE_fnc_addStatTracker = { private ["_unit", "_stats"]; _unit = _this select 0; _stats = ["new", _unit] call StatSheet; ["addScore", (score _unit)] call _stats; _unit setVariable ["stats", _stats]; }; EXAMPLE_fnc_remStatTracker = { private ["_unit", "_stats"]; _unit = _this select 0; _stats = _unit getVariable ["stats", {}]; // All objects are actually a "code" type _unit setVariable ["stats", nil]; ["delete", _stats] call StatSheet; }; Advanced Example: /* Title: Hashmap Library Author: Dylan Plecki (Naught) Version: 1.0.3.1 - v1.0 CD b1 API Example: _hm = ["new"] call UCD_obj_hashMap; ["insert", ["key", value]] call _hm; _val = ["get", ["key", defaultValue]] call _hm; ["erase", "key"] call _hm; ["delete", _hm] call UCD_obj_hashMap; License: Copyright © 2013 Dylan Plecki. All rights reserved. Except where otherwise noted, this work is licensed under CC BY 4.0, available for reference at <http://creativecommons.org/licenses/by/4.0/>. */ #include "oop.h" // Required /* Group: Hashmap Object */ CLASS("UCD_obj_hashMap") // Unique unordered map PRIVATE VARIABLE("array", "map"); PUBLIC FUNCTION("","constructor") { #define DFT_MAP [[],[]] // Since param macros can't correctly parse comma-delimited arrays MEMBER("map",DFT_MAP); }; PUBLIC FUNCTION("","deconstructor") { DELETE_VARIABLE("map"); }; PUBLIC FUNCTION("array","get") { // ["key", default], returns value (any) private ["_map", "_index"]; _map = MEMBER("map",nil); _index = (_map select 0) find (_this select 0); if (_index >= 0) then { (_map select 1) select _index; } else {_this select 1}; }; PUBLIC FUNCTION("string","get") { // "key", returns value (any) private ["_args"]; _args = [_this, nil]; MEMBER("get",_args); }; PUBLIC FUNCTION("array","insert") { // ["key", value], returns overwritten (bool) private ["_map", "_index"]; _map = MEMBER("map",nil); _index = (_map select 0) find (_this select 0); if (_index >= 0) then { (_map select 1) set [_index, (_this select 1)]; true; } else { _index = count (_map select 0); (_map select 0) set [_index, (_this select 0)]; (_map select 1) set [_index, (_this select 1)]; false; }; }; PUBLIC FUNCTION("string","erase") { // "key", returns success (bool) private ["_map", "_index"]; _map = MEMBER("map",nil); _index = (_map select 0) find (_this select 0); if (_index >= 0) then { private ["_last"]; _last = (count (_map select 0)) - 1; (_map select 0) set [_index, ((_map select 0) select _last)]; (_map select 1) set [_index, ((_map select 1) select _last)]; (_map select 0) resize _last; (_map select 1) resize _last; true; } else { false; }; }; PUBLIC FUNCTION("","copy") { // nil, returns hashmap (array) MEMBER("map",nil); }; PUBLIC FUNCTION("array","copy") { // [hashMap], returns nothing (nil) MEMBER("map",_this); }; ENDCLASS; Success Stories AI Caching and Distribution Script Object-Oriented Hashmaps Object-Oriented Marker
  4. IMPORTANT: This thread has been moved from its original position in the Arma 3 Completed Addons section to here for use primarily by server administrators; sorry for any confusion. SQF RCON Extension Release 1.0.1.4 - v1.0 Alpha b4 By Naught A remote SQF console addon and extension for Arma 2 & 3. GitHub | Download | Wiki | Issues Overview This projects aims to create a simple method for remotely administering Arma servers in a way which has never been possible before. The game engine itself has been inaccessible to remote administrators, but now it's possible to execute code and retrieve return values via this RCON extension. Note that this project is currently in its alpha stage, so there's a possibility for bugs or issues. That aside, I test release each time for full functionality, so it's reasonably stable. Remote Console The remote console was designed for simplicity and extensibility, so it was built completely in web-standard languages such as HTML, CSS, and javascript. This allows it to be completely customizable and accessible on nearly all machines. Since the console is built using the aforementioned web-standard methods, you can host the console on an external web server for global access from many administrators. You may also custom-skin and edit the console to your desire to fit your needs! Extension The extension was programmed in C++ to allow direct communication between the game engine and the backend Mongoose webserver. The latter is a super-light high-performance HTTP web server which handles the RESTful RCON requests and sends them to Arma. The extension was designed to not only accept requests from the standard remote console described above, but from any program which can make HTTP POST requests. This means that any developer can create a program which interacts with Arma externally through the RCON protocol described in the developer documentation below. Download You can download the latest version of the SQF RCON addon by visiting the repository's releases section. Requirements SQF RCON requires either Arma 2 OA 1.62 or Arma 3 1.00 or greater. An Arma 2 OA/CO installation requires the CBA addon. Installation Download the latest version of the SQF RCON addon by referencing the above heading. Copy the "@sqfrcon" folder to your Arma addons directory, which is most likely your Arma installation folder. Either add the addon to your favorite Arma launcher (such as play.withSix) or to your -mods command-line argument. Go to the extracted "@sqfrcon\sqfrcon.cfg" file and edit the configuration to your desired need. The file is extensively commented for ease-of-use. Start the game and load a mission to allow for the remote console to connect. Open the console by navigating to "@sqfrcon\console" and opening the "index.html" file in your browser of choice. Developer Documentation RCON Protocol Specification Extension Documentation Possible Use Cases Replacement for deprecated Gamespy protocol to retrieve server statistics. Web-based after action battle recorder and playback. In-game player review system with accompanying external database and web application. Remote connection to another game (such as Steel Beasts or Falcon BMS). Interaction with forum/community software or Teamspeak. And so many more... ---------- Post added at 23:12 ---------- Previous post was at 23:08 ---------- Update 1.0.1.4 This update is an important fix, so it is recommended for all users. This release is an alpha release, so it may still contain bugs or other issues. If you find any, post them here for resolution. Download SQF RCON v1.0.1.4 Changelog [NEW] Remove CBA dependency in Arma 3. [FIX] Fix a small typo in the FSM which could cause 503 errors in the console.
  5. Just realized that it's UPSMON's fault, if I remember correct it checks to make sure it's run on the server or else it exits. So remove anything that would do so, the most common code being "if (!isServer) exitWith {}", or you could just change it to "if (hasInterface && !isServer) exitWith {}".
  6. IMPORTANT: THIS THREAD IS DEPRECATED. Please see the new thread here in the Arma 3 - Servers & Administration forum. This thread is being kept alive for documentation purposes; all new inquiries should be posted to the above thread. SQF RCON Extension Release 1.0.1.3 - v1.0 Alpha b3 By Naught A remote SQF console addon and extension for Arma 2 & 3. Bitbucket | Download | Source | Issues Overview This projects aims to create a simple method for remotely administering Arma servers in a way which has never been possible before. The game engine itself has been inaccessible to remote administrators, but now it's possible to execute code and retrieve return values via this RCON extension. Note that this project is currently in its alpha stage, so there's a possibility for crippling bugs or issues. That aside, I test release each time for full functionality, so it's relatively stable. Remote Console The remote console was designed for simplicity and extensibility, so it was built completely in web-standard languages such as HTML, CSS, and javascript. This allows it to be completely customizable and accessible on nearly all machines. Since the console is built using the aforementioned web-standard methods, you can host the console on an external web server for global access from many administrators. You may also custom-skin and edit the console to your desire to fit your needs! Extension The extension was programmed in C++ to allow direct communication between the game engine and the backend Mongoose webserver. The latter is a super-light high-performance HTTP web server which handles the RESTful RCON requests and sends them to Arma. The extension was designed to not only accept requests from the standard remote console described above, but from any program which can make HTTP POST requests. This means that any developer can create a program which interacts with Arma externally through the RCON protocol described in the developer documentation below. Download You can download the latest version of the SQF RCON addon by visiting the repository's downloads section. Requirements SQF RCON requires either Arma 2 OA 1.62 or Arma 3 1.00 or greater, along with any compatible version of CBA. Installation Download the latest version of the SQF RCON addon by referencing the above heading. Copy the "@sqfrcon" folder to your Arma addons directory, which is most likely your Arma installation folder. Either add the addon to your favorite Arma launcher (such as play.withSix) or to your -mods command-line argument. Go to the extracted "@sqfrcon\sqfrcon.cfg" file and edit the configuration to your desired need. The file is extensively commented for ease-of-use. Start the game and load a mission to allow for the remote console to connect. Open the console by navigating to "@sqfrcon\console" and opening the "index.html" file in your browser of choice. Developer Documentation RCON Protocol Specification Extension Documentation Possible Use Cases Replacement for deprecated Gamespy protocol to retrieve server statistics. Web-based after action battle recorder and playback. In-game player review system with accompanying external database and web application. Remote connection to another game (such as Steel Beasts or Falcon BMS). Interaction with forum/community software or Teamspeak. And so many more...
  7. I did make a post in this thread about using UPSMON, although not tested it may work: http://forums.bistudio.com/showthread.php?170539-AI-Caching-and-Distribution-System&p=2594890&viewfull=1#post2594890 This is because units are deleted and then respawned in at mission start, so you have to re-run UPSMON on them.
  8. I couldn't imagine what in the framework would cause a properly configured headless client to CTD, as Arma usually guarantees against such a case, and I've tested it on other headless clients before successfully. But I have fixed a few points in the code where I could see where an interface-less client could crash, and I've pushed the changes to the master branch on GitHub: https://github.com/unitedoperations/core-framework Since it's based in the core only, you can either re-download the framework or run the update PowerShell script in the core folder.
  9. Core Mission Framework RC Stable Release - Revision 3 By Naught & Olsen A fully modular mission framework for Arma 2 & 3. Github | Download | Wiki | Issues Overview The Core mission framework is a structure designed to expedite the development of missions and to improve the overall quality of standard components. It showcases efficient programming standards and utilizes performance-enhancing systems to provided the best user experience for both mission developers and players. The Core mission framework is a pet-project of the United Operations community, but due to its success, we've decided to release it to the public for full use. The framework is currently in its release-candidate stage, meaning that it may still have bugs or issues, but has been tested extensively. Features Fully Modular - Meaning that everything is configurable! Large Libraries - Functions for nearly everything. Extensive Logging - A full logging system designed like it should be. Many Bundled Modules - You can expect these modules to be top-notch in performance and usability. Seamless Headless Client Integration - Easily implement headless client into your mission via the headless_client module. High Performance AI Caching - Dramatically increase the performance of your mission through fully transparent AI caching. Integrated Team Roster - View who's on your team and check their description while in-game via the team_roster module. Easy Gear System - Easily configure unit and vehicle loadouts via the included macro-based gear system. Amazing Building System - Allow players to build fortresses in-game using the building_menu module. Many More Useful Modules - The framework comes pre-packaged with many necessary components such as AO limits, a briefing manager, a CBA flexi menu helper, JIP teleport, automatic marker control, setup areas, a spectator system, and much more! Showcase Mission The Core mission framework is bundled with a showcase mission designed in Arma 2 to show the basics of creating a mission and how to implement the Core mission framework. The mission is fully-functional, so all you have to do is create a new folder in your missions directory called CO14_Apple_Core.utes and copy the framework there. It's recommend that all mission makers who haven't used this framework before study the showcase mission to get a feel of how to create Core framework missions and how to optimize for performance. Requirements The Core mission framework requires only requires either Arma 2 OA 1.62 or Arma 3 1.00 or greater. Arma 3 support does work, but is currently not tested regularly. Documentation If you're new to the framework, please read these pages in-order to get the best understanding of how to create good missions with Core. Structure Installation Configuration Updating
  10. The key can be stored only server-side, where server admins would need to register or do something of the sort to get access. Or even better, you could encrypt data on clients and only decrypt it with the server, or create a system similar to how SSL/TLS works (which actually can use the same RC4 algorithm) to help eliminate hacking. Or you can pull a key from a server with a remote address on htmlLoad, which I think works (it's written in ALiVE to do that for the news feed, but I haven't actually tried it)... But anyways I love your idea about using it in-game to add a cyber element to the mix! I didn't even think of that.
  11. Updated to RC 3 - Revision 5 This release is the third release-candidate release of the framework. This means that bugs and issues may still be present, but the framework has been thoroughly tested and is deemed stable. This update fixes a major bug in the gear module and is strongly recommended to apply. As this update also fixes issues with modules, the built-in update.ps1 PowerShell script will not completely update the framework and its included modules, but only the core. A full update is required. Changelog Major gear module fix (gear duplication & locality bug). Miscellaneous updates to ai_caching and showcase mission module list. Update actor and environment libraries. This release may be downloaded from Github, or from this direct link.
  12. Updated to Revision 3 This release is the first release-candidate release of the framework. This means that bugs and issues may still be present, but the framework has been thoroughly tested and is deemed stable. This revision is mostly related to the framework's core, updated legibility, performance, and diagnostics functionality, as well as adding a few more core functions. It is a minor update and not necessary for performance, durability, or other enhancements. Changelog Add licensing file and description. Reference the LICENSE.md file for more details. Update line spacing in module SQF files for legibility. Add logging for the modules' post-init benchmarks. Add an actor library for the actor-based programming model. Update core structure for easily removing libraries for implementations in other projects. Miscellaneous other fixes and enhancements. The framework may be downloaded from Github, or from this direct link. If you have an older version of the framework, you may update the core by running the update.ps1 PowerShell script in the core folder.
  13. I've spent a little while optimizing the module, and here are the current stats for loading the CQB module on my client machine in Altis: MIL_CQB INIT BENCHMARKS: ------------------------------ Fresh Game Start (2% Density): 26.0 seconds Fresh Game Start (50% Density): 44.7 seconds Running Game Start (2% Density): 08.7 seconds Running Game Start (50% Density): 28.6 seconds Included in latest development build, and will be available in the next release. Also, if it took hours, may I ask if you were using synchronized units with the CQB module? That has been fixed also. If you find any other slowdowns, please notify me to fix! :)
  14. We recently licensed the work under the CC BY-NC-SA 4.0 license' date=' which is essentially the same as the APL-SA, but the code may be used in other games (such as VBS or TOH). So yes, this project may be used in the Make Arma Not War contest under the current license.
  15. Yes they work for both Arma 2 and Arma 3, although the framework was designed for the former, so some things may be a bit odd in Arma 3 (can't think of anything now). It's totally portable between games too! Just change the mission.sqm and the loadouts and you should be good. Also, thanks Foxhound for releasing this content on Armaholic! I really appreciate how far above an beyond you go for us content creators :)
  16. naught

    lineIntersectsWith Issues

    Make sure that you're using ASL position format - ie. you're using getPosASL to pass positions to the functions. You can see how to convert via this page. Other than that, I'd make sure that you're not ignoring that object which you want to be checking, and that the flags on lineIntersectsObjs are configured correctly.
  17. Tupolov, I just checked his host, and all servers are VPS. They also say that they support ALiVE on their web page, but obviously they do not. This seems like a small-scale business, so you might want to talk to them about not tricking their customers. Spectre, you currently are not operating on a dedicated server, meaning that you are sharing a server with other users. They give you dedicated hardware resources, meaning that you are guaranteed those resources at any time, but you are still sharing them. The service is a complete rip-off, since you can get cheaper and much more powerful dedicated servers at sites like OVH or similar. You can get twice the power somewhere else for the same price or cheaper, but that also means you need to manually configure them, which will take quite a bit of networking/Windows/computer knowledge. Also, Arma runs like crap on VPS (like half of the performance to a comparable dedicated solution, same specs and all), so I'd highly recommend you go the dedicated server route if you want.
  18. He's saying that there are 5 groups registered under the server, and that they may or may not all be your own. Who is your current host? And it may still be a dedicated server, but operating under NAT multiple dedicated server may have the same external IP address. Since I saw that your original IP address was 192.168.1.5 from a previous post, and assuming that's from your dedicated server, it is operating under a router with NAT enabled. I'd recommend finding a better host then, but only if that's the case. OVH dedicated servers are dirt-cheap and freaking amazing BTW, if you're paying too much.
  19. The sleep within the SQF environment isn't what's causing the FPS drops. This "sleep" is designed to delay execution in a scheduled environment after 0.3 ms. And I say "sleep" because, due to SQF's single-threaded environment, it actually just yields to the back of the execution stack and waits it turns patiently for the other scheduled SQF scripts to run. This means that after a script takes longer than 0.3 ms to run, it's latest next run time can be calculated by simply multiplying the number of scheduled scripts by 0.3 ms. And since these scheduled scripts aren't actual OS threads, the switching between them can be much more efficient due to the shared memory and execution environments, depending on how they were implemented. DarkWanderer, in response to your latest post, I believe that the only usages for the OS-level sleep command would be in the netcode, and that any other under-utilization would derive from generic memory contention scenarios. Also, if it were to be a mutex-related issue, either the CPU usage would increase due to the busy-wait, or they would've implemented a yield-type pattern into a custom mutex wrapper; but the latter would be a cancer for any knowledgeable game developer, since it relinquishes power that can be used for something else within the game engine itself. To the OP, if you want to test whether the slowdowns are caused by either internal netcode or memory contentions, simply start the server with 500+ AI without any connected clients and then monitor the FPS. The engine should not need to send/wait for packets, so if the netcode were the issue, the system will either run at at least 90% usage on at least one core (shouldn't be a prolonged 100% due to internal switching mechanisms) or will dramatically increase the FPS. Also, there's no need for what was said in this thread, and some of the comments are just completely immature. Keep it on topic, or ignore it.
  20. I've looked over this, and although you can store functions with this method, you cannot execute them, which is the functionality this addon needs. Maybe at one point they'll update Arma 2 OA with some of the features that came with Arma 3 such as initialization of function libraries, but I don't see it happening.
  21. Although this would be much easier and remove the CBA dependency, in order to keep the addon backwards compatible with Arma 2 (currently necessary), I have to use CBA's XEH system for script execution due to the lack of CfgFunction automatic execution in Arma 2. I may consider the idea of creating two addons, one for Arma 2 with CBA required, and another for Arma 3 with no dependencies using the above method.
  22. Thanks! :) I'm very interested in what people will do with it outside of the original console I provided. I'm already working within my community to use it as a replacement to the deprecated Gamespy protocol for pulling the player count, assets, time, mission and world name, deaths, and things like that for analysis.
  23. FPS Monitoring Script v1.0.2.1 - v1 Release Candidate b1 By Naught Github: https://github.com/dylanplecki/ArmaScripts/tree/master/Arma%202/FPS%20Monitor Issues: https://github.com/dylanplecki/ArmaScripts/issues Download: https://raw.github.com/dylanplecki/ArmaScripts/master/Arma%202/FPS%20Monitor/fpsmon.sqf Original Thread: http://forums.unitedoperations.net/index.php/topic/21280-fps-monitoring-script/?hl=fps+monitor Description This script can monitor and report the FPS of all machines in a mission - server, headless clients, clients, and even your own! It will silently hint to you (on a specified interval) your FPS, the server's FPS, all of the headless clients' average FPS, and all of the players' average FPS. Now you can know how well other players are running the mission, if the server is gasping for CPU cycles, whether you should optimize a script or not, or if the headless client is running fast enough to handle your huge AI load. And it's as easy as locally loading a running a function! This function can even be loaded from a debug console and run, as it requires no dependencies other and CBA be loaded. Here's an outline of what the silent hint will look like: Local FPS: minFPS - avgFPS Server FPS: minFPS - avgFPS / count Headless FPS: avgMinFPS - avgAvgFPS / count Client FPS: avgMinFPS - avgAvgFPS / count Note: This script can be loaded and executed on any machine, without a need to install anything on the others. Here's an image of the [old] initial version if you're interested: Syntax call FPSMON_fnc_monitor; // Turns off script delayInt call FPSMON_fnc_monitor; // Turns on/off script with delay [delayInt] call FPSMON_fnc_monitor; // Turns on/off script with delay Requirements Arma 3 1.0 Arma 2 OA 1.62 CBA A2/OA/A3 1.0 Note: The dependency on CBA is due to the CBA_fnc_globalExecute function being required for the ability to load the function on one machine yet execute it on all - If you want to make a fork of this script using the BI_fnc_mp function to remove the CBA dependency, be my guest, and post it up here.
  24. Yes, it will automatically transfer all units to the HC upon its connection to the server. Any dynamically created units will also move to the HC when they're spawned.
  25. Hey spirit! I'm glad that you like my work :) So a few things about the current status of this script. Firstly, I'm still not too comfortable with the way that AI are removed from vehicles and then replaced back into them since Arma is very ambiguous about how its AI crewing system works, and I couldn't get the AI to reliably remount into certain vehicles after distribution in Arma 2. Note that this issue is only present when a headless client is connected. This is mostly because Arma 2 is missing the valuable command of assignAsTurret, but I've heard from others that just using moveInTurret or any of the similar commands is enough. So after hours of testing I couldn't get to the same conclusion; no matter what combination of commands I used, some AI either refused to enter their vehicles or got out of the immediately. You can look at the trouble code if you would like, I haven't done much testing with the issue in Arma 3 since I needed an immediate fix in Arma 2 at the time. The affected code is in "\scripts\unitCaching\lib\caching.sqf", lines #145-183. I assume that the testing needed to ensure compatibility with all situations would take a few hours of which I haven't had recently. Luckily it's a fairly simple component that anyone can look at and understand. And about the checking for enemy AI for spawning cached units, I just released a new version on the Github repository (version 1.0.3.1) which adds support for detecting both near players and enemy AI. It does add a little bit of processing overhead, but not nearly as much as I anticipated, so it's a very workable solution. Note: it hasn't been tested :P I wrote this while I was very tired so please excuse any errors or such.
×