This is a modified version of Antistasi scenario for ARMA 3 that deals with some of the issues of the original version.
Antistasi is a scenario where you fight as a guerrilla liberator to flip the island to your side.This modified version has the same mechanics and the same features but improves some aspects of it.
The code was greatly simplified, cleaned, and reduced for DRY (e.g. for every 1 line added, 2 lines were deleted, I have +4 years experience as professional programmer).
To run this mission, take the following steps:
This version supports easy replacement of factions. Use the following steps:
Arma 3 Contact
Essentially, our code detects every unit from that faction, and populatesthe correct lists with the equipment (weapons, items, vests, etc.) that the units use.This way, you only need to focus on adding vehicles, groups and units; the remaining is automatic.
This version supports easy replacement of worlds. Use the following steps:
Development of this mission is easy. We currently only use the following software to do it:
![]()
Steps after installing the software above:
Step 4. guarantees that when you modify the source code in directory SOURCE (tracked by git), the files are automatically copied to the destination, and are therefore available to test on Arma 3 Eden editor.
Test that everything works:
In summary, you modified this version of antistasi and tested it.
Note that if you modify the
mission.sqm on SOURCE, you will need to load it again in the editor.mission.sqm can be modified in Eden editor for testing, but it is not copied back to SOURCE and will be lost whenyou load it again. To change this behavior, tick the box Bidirectional sync in DSynchronize.
Run
to show in the map all units (dead or alive) and locations that are currently spawned.This helps tracking if CPU is being used unnecessarily. Use
false toreverse it.
Initialization
Initialization entry point is
init.sqf . This is called by Arma itself.This script uses server.sqf , headlessClient.sqf , client.sqf in initialization/ .
Regardless of the game mode (SP or MP),
server.sqf is called on the server sideand client.sqf or headlessClient.sqf are called on non-server.
The code that has to be called on every machine running AS is
initVar.sqf .
server.sqf call serverMP.sqf or serverSP.sqf depending
client.sqf is responsible for initializing a player. This includesEvent Handling, available actions, etc.
Persistent and temporary data
This mission has a set of macros and idioms to store data.
Generically, each datum has two attributes:
The database API is used to fully serialize (save) and deserialize (load) the mission.
Distributed execution
This mission has parts (
spawn s, see below) that can be run by any client.For these parts, the server acts as a scheduler and load balancer and each client(headless or not) acts as a worker. See scheduler for details.
Spawn state and execution
The execution of certain parts of this mission is distributed across clients.This is implemented by the spawn API.
Locations
Locations are managed by the location API. They representphysical locations on the map that are spawned according to certain functionalityand can sometimes be conquered.
![]() Initialization
When the game is loaded, locations are loaded from the markers inthe
mission.sqm (initLocations.sqf ). Specifically, markers starting with a given stringare converted to locations using the following convention
Cities (
'city' ) and hills ('hill','hillAA' ) are initialized differently,see templates/world_altis.sqf to learn how.
Roadblocks
A particular type of location is the roadblock. The roadblocks are placedon the map during initialization using the markers
'AS_roadblock' andfrom the script AS_location_fnc_addAllRoadblocks .Whenever a location is taken, roadblocks for that location are created/destroyed.
FIA HQ
The FIA HQ is a location (called
FIA_HQ ) always controlled by FIA.The following scripts are relevant to change its position:
3 different events can cause the HQ to change position:
Both
fnc_HQbuild.sqf and fnc_HQplace.sqf call fnc_HQdeploy.sqf to position the permanent structures.
The HQ also has objects that can be spawned by the commander. The scripts that handle these are:
Other related functions:
Related globals:
Missions
This mission has numerous sub-missions that are spawned automatically or bya player's decision. See missions API for more details.
Player's score, rank and eligibility to command
Every player has a score that allows him become commander (
player getVariable 'score' )
The score is modified (increase or decrease) by:
The (server) script that changes a player's score is
orgPlayers/fnc_changePlayerScore.sqf .
Score defines the rank of the player. Rank is the indicator of the player's scoreand is updated on the client side periodically by
Scripts/AS_fnc_activatePlayerRankLoop.sqf (player getVariable 'rank' ).
Players can decide to become eligible to be commander (
AS_fnc_UI_toggleElegibility ).Only eligible players can become commanders.The choice of the commander happens in any of the following situations:
The script
orgPlayers/fnc_chooseCommander.sqf makes this choice. When it is called,players are ranked by score and the highest player with more than 20% of the current commander's scorebecomes the new commander. In case the commander resigns or disconnects, the highest scored player becomesthe new commander. Commander is set using orgPlayers/fnc_setCommander.sqf .
Player's money
Every player has money (
player getVariable 'money' ) that it can spend to buy vehicles, units, or score.Players donate money to other players or to FIA (gaining score) via a menu.The commander can take money from FIA via a menu (losing score).
Vehicles
Vehicles are bought by FIA or AAF, or are spawned by NATO/CSAT. Afterwards:
AAF Arsenal
The AAF has an arsenal of vehicles that it buys with AAF money.The arsenal has different categories of vehicles that are defined in
AAFarsenal.sqf and that can be modified in the templates/ (e.g. for RHS).
AAF attacks
The AAF attacks from time to time. The relevant variable that controls this is the
AS_P('secondsForAAFattack') . This variable is modified via fnc_changeSecondsForAAFattack .The script that starts attacks is the AS_movement_fnc_sendAAFattack.sqf . It is run from the loop in resourcecheck.sqf when AS_P('secondsForAAFattack') 0 . AS_movement_fnc_sendAAFattack.sqf checks whether it is worth to attacka given location, and, if yes, it spawns the attack accordingly using the missionsdefend_city.sqf , defend_camp.sqf or defend_location.sqf .
Minefields
Minefields are created and destroyed like other locations. The AAF buysminefields and places them on the map. These can be found by FIA after whichthey appear on the map (mines are still hidden and have to be found via mine detectors).The FIA commander can also create minefields on the map.
Minefields (from both sides) are deleted when they contain no mines (exploded or defused).
Relevant scripts:
Actions
Most actions consequences are defined in directory
actions/ .The list of custom actions is defined in AS_fnc_addAction .To add one of these actions to all players (from server or client) use
To add an action to a specific player/client, locally run
To remove actions, use the same function with the action name
'remove' .
Price refinements - CarouselShowing slide {CURRENT_SLIDE} of {TOTAL_SLIDES} - Price refinements
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |