Search the Community
Showing results for tags 'functions'.
Found 3 results
Hello, at first sorry with my english im spanish hahaha. Im trying to use epoch functions in my script and i cant. I decided to discard them and just wait for this to do certain things when mod is loaded. But i cant access to EPOCH_fn_InstanceID to know when is loaded epoch but cant access. I tryed to load my pbo with addons requirements like epoch_server.pbo but nothing, and my bat file for load server with different options like [email protected];@EpochHive; and [email protected]; [email protected]; but these last options the only thing they would do would be to give visibility problems. if someone could help me I would appreciate. Thank you, Xtreme.
Guest posted a topic in A2: Epoch Mods (220.127.116.11)Introducion I was looking into a Problem, where the FPS drops, when players enter a City or any Place with a large amount of Objects placed. After fushing around a while i have noticed, that actually ALL Objects are being updated. This includes houses, cras cutters, bins and fences, as also Modular Buildings like Wooden Walls. So my thought was, that counting and updating all of those Objects may result in a massive Server Load. For testing purposes i made up an array with all arma2 Buildings and a check to not Update those. Result: All of these Objects where un-breakable, can't be killed or damaged anymore. Also a slight FPS increase, but nothing really "breaking". Before we Start You must notice, that these changes make all Objects invincible. Also it is highly recommended to create a Backup, before you start editing. Requierements: - PBO Manager (For editing Server Files) - A custom "variables.sqf" in you Mission Folder Setting up the Variable for Objects that should not be updated (Client side) These Changes are made in the variables.sqf, located in your Mission Folder. Changing server_updateObject.sqf These changes are made in dayz_server.pbo\compiles\server_updateObject.sqf - This does not effect any custom mods you might have installed, for example the Vehicle Key (thanks, sir - that thing is awesome). Removing unnecessary Functions This is yet still not effecting any mods (not so far i know) - but will result in a faster update of objects, because first of all we'll be using "if", instead of "switch" (If is concidered to be much faster, then switch) and secondary, we will use one function for all Hitpoint actions such as "killed", "damage" or "repair". Keep in mind, that you can customize the array of object, that should not be updated by simply adding or removing an object, but please note: DO NOT, AT NO TIME, NEVER put Objects like Doors, Safes or other Objects that requiere some sort of action - in that array. Reason: As you for example open a Door, the State well more likely the "position" of the door is being updated, forcing the door to actually open. If you forbid this, you obviously can't open Doors anymore. This does not effect Objects like for example Loot, Stairs, Ladders, etc..
What is this guide for? Actually for everyone who ever wanted to learn about file structure of Arma 2 MP environment (Epoch in this case), from beginners to a bit more advanced users alike, including script makers and editors. What is this guide not for? If you ever created your own @mod, this guide is probably not for you. Damn 1 hour long video, is it worth watching it? No, create new topic and ask someone to help you with scripts if you came here to ask that question What are benefits from watching this video? If you actually follow along, you will be able to better troubleshoot problems with server and custom scripts. You will also be introduced to file structure of Epoch server, custom variables and compiles files as well as diffmerging files for script updates or compatibility issues. Are there any requirements to follow this guide? No, grab a coffee and chill. Don't try to replicate anything, instead just try to follow along, this is a theoretical guide rather than a tutorial. What's in the video? Introduction: I am explaining reason behind this video in full detail and talking about further contents, so skip ahead to what suits you best. Structure (03:00): We will be exploring file structure from first press of a button that lets client join the server. I will be explaining about different types of files used to run a server and how they chain load each other to make up a fully working server. Topics covered: Config files, mission config (ext) file, bin files, sqm and include files. I will be covering certain less essential parts like how RAM and HDD is used while loading scripts or PBO contents on demand. Variables (16:51): This section is for admins and script makers who brings over custom variables.sqf over to mission file. I will be explaining how variables are being defined to avoid RPT errors as well as introducing to common mistakes of redefining already defined variables that are present with many scripts and their guides and how to reduce mission file size by only reusing what is required. For all modders out there, please keep your own vars within your scripts, lets stop this madness. Functions (33:15): Precompiling functions is what actually makes our servers work. In this part of guide I will explain how they make up the server structure and how you are literary loading client and server files starting from init.sqf in your mission file. Yes you read that correct. I will be explaining common mistakes server admins commit by using custom compiles file server side and how majority of admins would blindly follow bad advices/guides and force loading their client and server files twice. We will be diving into more detail about compiles.sqf client side and server_functions.sqf files explaining how common mistakes are made when installing several addons that reuse same function and how to avoid future problems. Diffmerging (47:55): Last major part of this guide. I will be explaining how to work some magic with Diffmerge (or similar tools) to keep your addons up-to-date, as well as ironing out any incompatibilities between your custom scripts. We will be looking at how to diffmerge single file, whole folders and even merge two functions together to make them compatible. Experience gained here should allow you to merge any mod (or multiple mods) out there that uses same function making them compatible again. Final words (1:08:35): Conclusion and quick review of what we have learned within an hour of this guide.