Jump to content

Converting I&A to add factions.


Recommended Posts

Hi folks. I've been working on converting I&A over to Global Mobilization, but the more I do the bigger the project has become.


Does anyone have a checklist of things I need to alter? I know it was done from vanilla to Vietnam (Sog PF), so it can be done.


Main tripping points for me at the moment is the BLUFOR arsenal and the AO's. The latter is just time and coding, TBH, but the arsenal and class loadouts has me stumped. Any advice would be most welcome.


Attached are the three files I've been working on lately.


- Fenton

GM I&A Arsenal GM Update to Ina_Config.hpp I&A Faction PACT GC

Link to comment
Share on other sites

It looks like you figured out the Arsenal file, obviously someone will have to add your stuff to the repository and test.  You'll notice there's several arrays where you're defining allowed items, built-in SQF handles those array names so it knows what to show in the arsenal based on the class of the player.  So for example only players in the Recon squad see what's defined in "InA_AllowedArsenal_reconItems" and it doesn't matter if it's Western Sahara or vanilla Altis, the array naming convention just handles it.

Link to comment
Share on other sites

Thanks Cakes. :) I'm working my way through the files as best I can.


At the moment, it doesn't looks like the arsenal is allowing items correctly on spawn, but that might be me setting the squads up wrongly. Or it could be something with running it locally.

Link to comment
Share on other sites

some more files to add if u want to




those be found in scripts defines


found in scripts vehicle

add your new playerfaction to functions/Misc/fn_factionsGetPlayerByIdx.sqf

params ["_idx"];

if ((typeName _idx) != (typeName 0)) exitWith {
    [format ["NaN was passed to function '%1', defaulting to faction 'BLU_F'!", _fnc_scriptName], "FACTION"] call AW_fnc_log;

private _faction = "";

switch (_idx) do {
    // Vanilla NATO
    case 0: {
        _faction = "BLU_F";

    // SOG PF MACV
    case 1: {
        _faction = "B_MACV";

   // Western Sahara
    case 2: {
        _faction = "BLU_WS";
    // new player faction
    case 3: {
        _faction = "BLU_GM";

    // Vanilla NATO
    default {
        _faction = "BLU_F";


and params.hpp

// General mission settings
class PlayerFaction {
    title = "Player faction, determines rewards, loadouts, arsenal content etc.";
    values[] = {0, 1, 2, 3};
    texts[] = {"Vanilla NATO (BLU_F)", "SOG PF MACV (B_MACV)", "BLU_WS" "BLU GM"};
    default = 3;

enemy faction goes to Defines


#define FACTION_VALUES {0, 1, 2, 3, 4, 5, 6}

#define FACTION_TEXTS {\
    "Random Faction based on Map/World config",\
    "Canton Protocol Strategic Alliance Treaty (CSAT)",\
    "Canton Protocol Strategic Alliance Treaty - Tropical (CSAT_T)",\
    "Altis Armed Forces (AAF)",\
    "People's Army of Vietnam (PAVN)",\
    "Sefrawi Freedom and Independence Army (SFIA)",\
    "enemy faction for gm"\

add ur new enemy faction to Defines/factions

make a new file


u can have at the layout from the other files in there

newenemyfaction has to be also added to Functions/Misc


 * Author: Whigital
 * Description:
 * Gets faction(s) from index

params ["_idx"];

private _faction = "CSAT";

switch (_idx) do {
    // Random
    case 0: {
        private _randomization = (["FactionRandomization", -1] call BIS_fnc_getParamValue);
        private _randomFactions = (getArray (missionConfigFile >> worldName >> "randomFactions"));

        [_randomization, _randomFactions] call {
            params ["_randomization", "_randomFactions"];

            if (_randomFactions isEqualTo []) exitWith {
                [(format ["Unable to get random faction list for world config (InA_Config.hpp/%1/randomFactions), defaulting to CSAT ....", worldName]), _fnc_scriptName] call AW_fnc_log;

            private _factions = [];

                private _fac = _x;

                _fac = (_fac call AW_fnc_factionsValidate);

                _factions pushBackUnique _fac;
            } forEach _randomFactions;

            InA_EnemyFactionRandomizationData = createHashMapFromArray [
                ["#randomization", _randomization],
                ["#factions", _factions]

    // CSAT
    case 1: {};

    // CSAT_T
    case 2: {
        _faction = "CSAT_T";

    // AAF
    case 3: {
        _faction = "AAF";

    // PAVN
    case 4: {
        _faction = ("PAVN" call AW_fnc_factionsValidate);

    // SFIA
    case 5: {
        _faction = ("SFIA" call AW_fnc_factionsValidate);
    // New Enemy Faction
    case 6: {
        _faction = "NEWENEMYFACTION";

    default {
        [(format ["Unknown EnemyFaction parameter (%1), defaulting to CSAT ....", _idx]), _fnc_scriptName] call AW_fnc_log;


totaly forgot about adding ur new enemy faction to



// Vanilla factions
#include "factions\CSAT.sqf"
#include "factions\AAF.sqf"
#include "factions\FIA.sqf"
#include "factions\SYND.sqf"
#include "factions\CSAT_T.sqf"

// Prairie Fire factions
#include "factions\PAVN.sqf"
#include "factions\VC_M.sqf"
#include "factions\VC_L.sqf"

// Western Sahara factions
#include "factions\SFIA.sqf"
#include "factions\TURA.sqf"

//  New Enemy Faction
#include "factions\NEWENEMYFACTION.sqf"

change default enemy faction to ur new one params.hpp

class EnemyFaction {
    title = "Enemy faction, defines enemy units, groups and vehicles";
    values[] = FACTION_VALUES;
    texts[] = FACTION_TEXTS;
    default = 6;

iam  pretty sure i forgot something any more questions lemme know

Link to comment
Share on other sites

i had a quick look into this and found some problems



i fixed most of the syntax errors but theres more wich i cant pin point what is wrong my gues is some more syntaxs errors somewhere if i find the energie to search for those

i will fix them heres what i fixed so far



maybe get Visual Studio Code with these extensions



mostly the sqf language and sqflint


some errors from my rpt


 4:26:23 Error in expression <[player, (roleDescription player)] call AW_fnc_initUnitTraits;
4:26:23   Error Undefined variable in expression: _faction
 4:26:23 File C:\Users\chicken#6\Documents\Arma 3 - Other Profiles\chicken_no6\mpmissions\Invade_&_Annex_3.gm_weferlingen_summer\Defines\factionDefines.sqf..., line 37
 4:26:23 Error in expression <);
private _faction = (_factionIdx call AW_fnc_factionsGetByIdx);

if (isNil "In>
 4:26:23   Error position: <AW_fnc_factionsGetByIdx);

if (isNil "In>
 4:26:23   Error Undefined variable in expression: aw_fnc_factionsgetbyidx
 4:26:23 File C:\Users\chicken#6\Documents\Arma 3 - Other Profiles\chicken_no6\mpmissions\Invade_&_Annex_3.gm_weferlingen_summer\Defines\factionDefines.sqf..., line 34
 4:26:23 Error in expression <r_MainAOsToComplete) then {
[true] call AW_fnc_missionPersistenceSave;

something in playerfaction stuff must be wrong


private _isRecon = ((_roleDesc find "Recon") != -1) || ((_roleDesc find "ge_army_sf") != -1); 

maybe use the LoadoutDefines_BLU_F.sqf as a reference


when i dit a new player faction i bsicly just copied over the default nato from altis and just gave them the uniforms from what ever faction i needed cause iam lazy migth be totaly wrong what iam doing there but it works somehow ;)

rpt is also complaining about params.hpp line 40 wich is

class PlayerFaction {
    title = "Player faction, determines rewards, loadouts, arsenal content etc.";
    values[] = {0, 1, 2, 3};
    texts[] = {"Vanilla NATO (BLU_F)", "SOG PF MACV (B_MACV)", "BLU_WS" "Global Mobilization NATO (GM_NATO)"};
    default = 3;

so theres something wrong with the playerfaction GM_NATO


oh a little thing

InA_AllowedArsenal_uniformsMedic = [
"U_C_Paramedic_01_F", "gm_ge_army_uniform_pilot_rolled_sar", "gm_ge_army_uniform_pilot_sar", "gm_ge_ff_uniform_man_80_orn",
InA_AllowedArsenal_uniformsMedic = [
"U_C_Paramedic_01_F", "gm_ge_army_uniform_pilot_rolled_sar", "gm_ge_army_uniform_pilot_sar", "gm_ge_ff_uniform_man_80_orn"

those sneaky , and " things but this is totaly understandable when working with those large arrays for arsenal defines


theres alot more i migth be missing here

but for arsenal defines i found all syntaxs errors unfortunately there is more in other files

Link to comment
Share on other sites

Thank you for looking in to those. I was sure I had missed a few syntax errors as I'm still not confident with SQL/SQF/SQM and those bloody commas keep ending up in the wrong place. I've been doing this almost entirely through Notepad++.

Link to comment
Share on other sites

I had a deeper look into this and changed some stuff


gm player faction will now be loaded only arsenal and rewards unit defines


todo: give the new player faction their default loadouts



enemy faction for some reason its missing a lot of units

maybe redo GMPACT.sqf



add more aos i only dit 4 just to get things going make a good main base not like me ;)

add more fobs

only put down the needed things no vehicles only one arsenal steve


add garrison buildings to


into this array



otherwise garrison spawner cant find building to put in enemy units


again theres still more stuff todo

add more side missions sub objectives

as i only added those

    class Missions {
        SubObjs[] = {

        Sides[] = {

        Prios[] = {

good luck ;)


iam still missing alot of stuff wich i cant think of atm


nearly forgot the updated file



Link to comment
Share on other sites

  • 3 weeks later...

Thanks again, I can't really emphasise how much I appreciate you going through all this.


I have updated the default loadouts for each class, and added garrison buildings to Functions/AI/fn_main_ao_garrison_spawner.sqf 


I can't find the Garrison Building Array right now, but I'll have another look later this week and the AO's are going to be easy enough to add over time.


I'll post an update soon.

Link to comment
Share on other sites

Added the following AO's.




That now covers everything to the East of the border.

Link to comment
Share on other sites

Added the following to garrison spawner, Building Array:


        // Weferlingen buildings

Link to comment
Share on other sites

garrison building fortifications is only for altis and is disabled on current InA version way to much work to add that to Weferlingen ;)

also dont forget to change params.hpp

class AOCompletionCount {
    title = "Main AO completion count";
    values[] = {-1, 20, 30, 40, 50, 60, 70, 80, 90, 100};
    texts[] = {"All", "20", "30", "40", "50", "60", "70", "80", "90", "100"};
    default = 50;


Link to comment
Share on other sites

  • 2 weeks later...

Okay, that little hiatus didn't last. Darn brain weasels.

  • Have added AOs to the West German side of the boarder.
  • Have moved main base to West Germany so we don't start off on the wrong side of the barriers, etc.
  • Have added "splash", but this will require some additional work later on. It'll do for now.
  • Main AO completion count reset.

On my "to do" list.

  • GMPACT.sqf needs a review. I can't see why it would be spawning less than a full squad per unit listed.
  • Arsenal appears to be unable to see the AT and AA launchers. All of which should be accessible to LAT and HAT troops.
  • HAT troops should also have access to the ATGM deployable static/backpack.
  • Main base needs expanding slightly, and proper decoration. Assets at the moment are fairly minimal.
  • Secondary FOBs need to be added and queued up.


Edited by Guard81
AT launchers are now in the arsenal.
Link to comment
Share on other sites

So far so good. Script-kiddie handler appears to be flagging enhanced movement, unfortunately.


Also, I think the Vortex pilots aren't working with our ATGM helos at the moment. - EDIT: Have found the section that needs to be tweaked. fn_restrictedAircraftSeatsCheck.sqf - I need to add the relevant gunship to "private _isGunship = (
    (_vehicle isKindOf "Heli_Attack_01_base_F") ||"


Any idea where I can look at a fix for either of those, please?

Edited by Guard81
Fixed one issue.
Link to comment
Share on other sites

Quick update. Bro-Nation have it up and running now on their testing/events server.


It is mostly functional, but side missions will need expanding and so will the progression FOBs. PBO attached if anyone wants a look.


I am aware that the arsenal could do with more restriction on the launchers and the OPFOR needs Communist Poland forces adding, but so far it's good enough for army work.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    Total Topics
    Total Posts
  • Create New...