X39 – User talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(Cleared as content was merged with SQF_syntax)
(Started overhaul of Extensions page)
Line 1: Line 1:
__TOC__
=FAQ=
====Where to put Extensions?====
Arma will look at the following places to find your extension files:
- In your arma installation folder (for example: ''..\arma3\yourextension.dll'').
- In your current windows system folder.
- In your current windows folder.
- In all folders listen inside the PATH variable.
- In all loaded mods root folders (for example: ''..\arma3\@ModXYZ\yourextension.dll'').


At best, you place your extensions inside some mod folder and load it.
At worst, you just throw it where the arma executable is located.
====What are Extensions?====
Extensions are ''Dynamic Link Library'' (DLL) files written in, for example, C.
====What do i have to look out for?====
Extensions fall under the same rules as executable files.
They may require additional runtime libraries or cause the game to crash.
Worst case: They contain malicious code.
====How to know which extensions can be trusted?====
Theoretically, never trust anything! Including Arma.
Technically however, this would make a boring experience, though ... some may have fun with just the windows stock programs like the glorious texteditor notepad.
Thus a better rule is: If the are sources freely available, you probably can trust the extension.
Even if you cannot read the source code, chances are that somebody out there can and would find something odd.
That will not protect you! Even someone with good reputation might add malicious code, though he does not always needs to be aware of that fact as the developer himself might be infected already and another virus just writes itself in a DLL file.
Generally spoken, avoid extensions wherever you can.
====When i call the extension method, arma freezes====
This is most likely caused by the extension taking too much time.
Due to the nature of how actual code works, an extension cannot be suspended even if used from a spawn.
You should notify the developer of said extension about this freezing issue or use the extension less extensively.
====Can i join BattleEye protected servers with my extension?====
You should avoid joining BattleEye protected servers with extensions unless the mod author explicitly states that his extension is whitelisted by BattleEye.
====Can i use extensions in my mission?====
Yes, you can use extensions in your missions, but you should consider if it is worth it.
Using extensions requires that all hosts (servers and clients) which use the extension have it installed.
Important to know here: If only the server is using the extension, the clients do not need it.
Extensions are not packed into the mission pbo.
=Creating an extension=
==Preamble==
Before we start, consider the following:
- Can what you're trying to achieve be done in pure sqf?
- Making an extension requires knowledge of a programming language. Are you capable of doing so?
- Why should a user trust you and use your extension. Is your reputation enough?
- Is it worth adding an extension for the feature you want to implement?
If the answer to any question was no, you probably should not proceed to create an extension but rather use plain SQF.
==Getting Started==
At first, we have to choose what language we want to use.
This wiki currently covers the following: '''C''', '''C++''', '''C#'''

Revision as of 09:46, 2 May 2018

FAQ

Where to put Extensions?

Arma will look at the following places to find your extension files: - In your arma installation folder (for example: ..\arma3\yourextension.dll). - In your current windows system folder. - In your current windows folder. - In all folders listen inside the PATH variable. - In all loaded mods root folders (for example: ..\arma3\@ModXYZ\yourextension.dll).

At best, you place your extensions inside some mod folder and load it. At worst, you just throw it where the arma executable is located.

What are Extensions?

Extensions are Dynamic Link Library (DLL) files written in, for example, C.

What do i have to look out for?

Extensions fall under the same rules as executable files. They may require additional runtime libraries or cause the game to crash.

Worst case: They contain malicious code.

How to know which extensions can be trusted?

Theoretically, never trust anything! Including Arma. Technically however, this would make a boring experience, though ... some may have fun with just the windows stock programs like the glorious texteditor notepad.

Thus a better rule is: If the are sources freely available, you probably can trust the extension. Even if you cannot read the source code, chances are that somebody out there can and would find something odd. That will not protect you! Even someone with good reputation might add malicious code, though he does not always needs to be aware of that fact as the developer himself might be infected already and another virus just writes itself in a DLL file.

Generally spoken, avoid extensions wherever you can.

When i call the extension method, arma freezes

This is most likely caused by the extension taking too much time. Due to the nature of how actual code works, an extension cannot be suspended even if used from a spawn. You should notify the developer of said extension about this freezing issue or use the extension less extensively.

Can i join BattleEye protected servers with my extension?

You should avoid joining BattleEye protected servers with extensions unless the mod author explicitly states that his extension is whitelisted by BattleEye.

Can i use extensions in my mission?

Yes, you can use extensions in your missions, but you should consider if it is worth it. Using extensions requires that all hosts (servers and clients) which use the extension have it installed. Important to know here: If only the server is using the extension, the clients do not need it.

Extensions are not packed into the mission pbo.

Creating an extension

Preamble

Before we start, consider the following: - Can what you're trying to achieve be done in pure sqf? - Making an extension requires knowledge of a programming language. Are you capable of doing so? - Why should a user trust you and use your extension. Is your reputation enough? - Is it worth adding an extension for the feature you want to implement?

If the answer to any question was no, you probably should not proceed to create an extension but rather use plain SQF.

Getting Started

At first, we have to choose what language we want to use. This wiki currently covers the following: C, C++, C#