Jump to content

Recommended Posts

7OuMAWx.png

GF Exported Loadouts Script - Mod

by

 

GEORGE FLOROS [GR]

 

 

Description:

GF Exported Loadouts Script - Mod , load your exported loadouts on random to ai and / or players.
You are free to do anything but i would like to give me Credits for this!
Simple and easy to use and adapt .
Have Fun !

 


Installation / Usage:

For usage instructions and information of how to use the GF Exported Loadouts Script - Mod please refer to the included documentation and/or example mission.

Place in your mission the files . There is everything included , in the initServer.sqf , to copy paste in your mission.

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.

For everything that is with comment // in front or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:

https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/

 


Notes:

GF Exported Loadouts Script - Mod , load your exported loadouts on random to ai and / or players.
It will also work for spawned units.
There is an exclude list available or add in the init of a unit:
this setVariable ["Var_GF_Exported_Loadouts", true];
It is also included a mod version , posible to unpack and edit.

 


Credits and Thanks to :

Thanks to All script contributors
Thanks to everyone who tries to do the best for this game!
Thanks to BIS for such a great platform .
Thanks to BIS Community and BIS Community Forums .
Thanks to Armaholic Community and Forums .

 

 

Changelog:

3.0
The code is completely reworked ,
in order to be more user friendly , clear and readable .
Everything now is easier and sorted also to different sides , including also more available settings.

2.1
Added some extra options.

 

v2.0
Added an option to change certain loadouts , or random to certain type of unit.
Added three examples , rifleman , sniper and every other unit.

 

v1.0


Forum topic:
- Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40336

 

 

Armaholic

GF Exported Loadouts Script - Mod

 

 

 

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

Changelog:

 

v2.0
Added an option to change certain loadouts , or random to certain type of unit.
Added three examples , rifleman , sniper and every other unit.

  • Like 1

Share this post


Link to post
Share on other sites

Alright, this should be everything needed. Just need to start customize it's bits to fitting me personally but already huge thanks for creating this script! :respekt:

  • Like 1

Share this post


Link to post
Share on other sites
27 minutes ago, Unluckymonster said:

huge thanks for creating this script! :respekt:

 

Thank you very much ,

 

but basically the half is your idea , so thank you very much as well !  :thumb:

Share this post


Link to post
Share on other sites
52 minutes ago, CHICKENLICKEN said:

East and Independent?

 

If you add certain units , you don't need to do anything more.

Share this post


Link to post
Share on other sites
6 minutes ago, GEORGE FLOROS GR said:

 

If you add certain units , you don't need to do anything more.

Ok thanks I will try. Does Ravage spawn certain units or is random from the whole side?

  • Like 1

Share this post


Link to post
Share on other sites
8 minutes ago, CHICKENLICKEN said:

Ravage spawn certain units

 

Yes , get the classnames from the editor.

Share this post


Link to post
Share on other sites
On 1/11/2019 at 6:15 PM, GEORGE FLOROS GR said:

 

If you add certain units , you don't need to do anything more.

SO i name the folder as exactly the classname from the editor?

 

I don;t understand how this works still.

 

 

Share this post


Link to post
Share on other sites
On 16/1/2019 at 6:49 PM, CHICKENLICKEN said:

SO i name the folder as exactly the classname from the editor?

 

I don;t understand how this works still.

 

giphy.gif

Share this post


Link to post
Share on other sites

Ok so here we are again !


You want to redress the spawn units of Ravage Mod.

 

So , if i remember right there are certain classnames for these spawned units.

You need to get in the editor ,

find their name and

just include them as my 2 seperate examples for the 2 riflemen and the two snipers.

 

You can name your folders and the files as you like , just check for your directories !!

 

Try a little bit and if you can't i 'm still here !!!!!   :z::thumb:

Share this post


Link to post
Share on other sites

Still doesn't work.

I put the class names here:

 


//________________ Certain Classnames option ________________

//________________ add the Classnames , that will change the loadout for the Certain Classnames option ________________

GF_Exported_Loadouts_Riflemen = [
    "O_G_Soldier_A_F",
  "O_G_Soldier_AR_F",
  "O_G_medic_F",
  "O_G_engineer_F",
  "O_G_Soldier_exp_F",
  "O_G_Soldier_GL_F",
  "O_G_Soldier_M_F",
  "O_G_officer_F",
  "O_G_Soldier_LAT_F",
  "O_G_Soldier_LAT2_F",
  "O_G_Soldier_lite_F",
  "O_G_Soldier_F",
  "O_G_Soldier_unarmed_F",
  "O_G_Sharpshooter_F",
  "O_G_Soldier_SL_F",
  "O_G_Soldier_TL_F",
  "O_G_Survivor_F"

 

 

 

Then added the rifleman loadouts 1 and 2 my loadouts. Am I missing something?

Share this post


Link to post
Share on other sites
54 minutes ago, GEORGE FLOROS GR said:

you haven't close   ];   the array


]; 

I did, I just didn't post it.


I don;'t get an error message, script intilaises, but enemies on OPfor don't have the loadout

Share this post


Link to post
Share on other sites

This is my Sqf/

 

I have one folder in loadouts named Rifleman with loadout 1 and 2, containing the loadout.

 

Quote
Spoiler

//________________  Author : GEORGE FLOROS [GR] ___________ 11.01.19 _____________

/*
________________ GF Exported Loadouts Script - Mod ________________

https://forums.bohemia.net/forums/topic/221232-gf-exported-loadouts-script-mod/

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Script - Mods , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-Script - Mods/
*/


//________________    You can add in the init of a unit to exclude     ________________    
//    this setVariable ["Var_GF_Exported_Loadouts", true];


//________________ Settings ________________
//________________ Set true or false  ________________


_Systemchat_info                                = true;
_diag_log_info                                    = true;    

GF_Exported_Loadouts_to_Certain_Classnames        = true;    
GF_Exported_Loadouts_Change_Loadout_on_Respawn    = true;    


if(_Systemchat_info) then {
systemchat "GF Exported Loadouts Script - Mod Initializing";
};

if(_diag_log_info) then {
diag_log "//________________    GF Exported Loadouts Script - Mod Initializing    _____________";
diag_log "//________________    GF_Exported_Loadouts.sqf    _____________";
};


//________________ You can add an Exclude List  ________________

GF_Exported_Loadouts_Exclude_List = [
    //    Ravage zombies
    "zombie_bolter",
    "zombie_runner",
    "zombie_walker",
    
    "B_Pilot_F",
    "B_Fighter_Pilot_F",
    "B_Helipilot_F",
    "B_helicrew_F",
    "B_soldier_PG_F",
    
    "O_Pilot_F",
    "O_Fighter_Pilot_F",
    "O_helipilot_F",
    "O_helicrew_F",
    "O_soldier_PG_F",
    
    "I_pilot_F",
    "I_Fighter_Pilot_F",
    "I_helipilot_F",
    "I_helicrew_F"
]; 
    
    
    
    
//________________ add your sqf names of the exported loadouts , in case you select allunits option ________________

GF_Exported_Loadouts_array_allunits = [
    "Loadout_1",
    "Loadout_2"
];


//________________ add your sqf names of the exported loadouts , in case you select Certain Classnames option ________________

GF_Exported_Loadouts_array_Rifleman = [
    "Loadout_1",
    "Loadout_2"
];

//________________ add your sqf names of the exported loadouts , in case you select Certain Classnames option ________________

GF_Exported_Loadouts_array_Sniper = [
    "Loadout_1",
    "Loadout_2"
];

//________________ Certain Classnames option ________________

//________________ add the Classnames , that will change the loadout for the Certain Classnames option ________________

GF_Exported_Loadouts_Riflemen = [
    "O_G_Soldier_A_F",
  "O_G_Soldier_AR_F",
  "O_G_medic_F",
  "O_G_engineer_F",
  "O_G_Soldier_exp_F",
  "O_G_Soldier_GL_F",
  "O_G_Soldier_M_F",
  "O_G_officer_F",
  "O_G_Soldier_LAT_F",
  "O_G_Soldier_LAT2_F",
  "O_G_Soldier_lite_F",
  "O_G_Soldier_F",
  "O_G_Soldier_unarmed_F",
  "O_G_Sharpshooter_F",
  "O_G_Soldier_SL_F",
  "O_G_Soldier_TL_F",
  "O_G_Survivor_F"
];

//________________ add the Classnames , that will change the loadout for the Certain Classnames option ________________

GF_Exported_Loadouts_Sniper = [
    "B_sniper_F",
    "B_spotter_F"
];


GF_Exported_Loadouts = {
    
//________________ in case you select allunits option ________________    
_allunits = selectRandom GF_Exported_Loadouts_array_allunits;


//________________ in case you select Certain Classnames option ________________    
//________________ add here your custom array to selectRandom ________________

_Rifleman = selectRandom GF_Exported_Loadouts_array_Rifleman;
_Sniper = selectRandom GF_Exported_Loadouts_array_Sniper;

//________________    GF_Exported_Loadouts_to_Certain_Classnames    ________________    
//________________    check your directory    ________________

if(GF_Exported_Loadouts_to_Certain_Classnames) then {


//________________    add here your case    ________________

//    Rifleman
if(typeof _this in GF_Exported_Loadouts_Riflemen) then {[_this] execVM format ["GF_Exported_Loadouts\Loadouts\Rifleman\%1.sqf", _Rifleman];};

//    Sniper
if(typeof _this in GF_Exported_Loadouts_Sniper) then {[_this] execVM format ["GF_Exported_Loadouts\Loadouts\Sniper\%1.sqf", _Sniper];};


//    if + allunits, uncomment below :

if(
    //________________    add here your cases    ________________
    
    (!(typeof _this in GF_Exported_Loadouts_Riflemen))
    && (!(typeof _this in GF_Exported_Loadouts_Sniper))
    
    ) then {
    [_this] execVM format ["GF_Exported_Loadouts\Loadouts\allunits\%1.sqf", _allunits];
    };

    } else {

//________________    allunits    ________________
    
    [_this] execVM format ["GF_Exported_Loadouts\Loadouts\allunits\%1.sqf", _allunits];
};


//________________    Change_Loadout_on_Respawn    ________________    

if (GF_Exported_Loadouts_Change_Loadout_on_Respawn) then {

_this addEventHandler ["Respawn", {
    params ["_unit", "_corpse"];
    _unit setVariable ["Var_GF_Exported_Loadouts",false];
}];
};

};


[] spawn {
    while {true} do {        
        {        
        if (
        ((alive _x)) 
        && (!(_x getVariable ["Var_GF_Exported_Loadouts",false])) 
        && (!((typeOf _x) in GF_Exported_Loadouts_Exclude_List)) 
        
        /*
        //________________    You can filter the side here    ________________    
        && {((side group _x) == west || 
            (side group _x) == east || 
            (side group _x) == independent || 
            (side group _x) == civilian)}
        */
        
        //    && (side group _x == playerSide)
        //    && (!(side group _x == playerSide))
        
        ) then {
            
            _x spawn GF_Exported_Loadouts;
            
            };                        
            _x setVariable ["Var_GF_Exported_Loadouts",true];
            {waitUntil {!alive _x};
            _x setVariable ["Var_GF_Exported_Loadouts",false];         
            };
        }forEach allUnits;
        sleep 5;
    };
};        


if(_Systemchat_info) then {
systemchat "GF Exported Loadouts Script - Mod Initialized";
};

if(_diag_log_info) then {
diag_log "//________________    GF Exported Loadouts Script - Mod Initialized    _____________";
};

 

 

Share this post


Link to post
Share on other sites
36 minutes ago, CHICKENLICKEN said:

This is my Sqf/

Hold on let me check this.

Share this post


Link to post
Share on other sites

It is working so, the problem should be about your exported loadout files.

 

Have you change as i 'm saying in the example ?

//	Paste your exported loadout and change this to _unit

 

Share this post


Link to post
Share on other sites

I don't understand what you mean by that?

21 hours ago, GEORGE FLOROS GR said:

It is working so, the problem should be about your exported loadout files.

 

Have you change as i 'm saying in the example ?


//	Paste your exported loadout and change this to _unit

 



I pasted my loadout. what else do I have to change?

Share this post


Link to post
Share on other sites

Here is what i have in my rifleman part:

 

Spoiler

//________________  Author : GEORGE FLOROS [GR] ___________ 11.01.19 _____________

/*
________________ GF Exported Loadouts Script - Mod ________________

https://forums.bohemia.net/forums/topic/221232-gf-exported-loadouts-script-mod/

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open _unit with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open _unit ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(_unit way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Script - Mods , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-Script - Mods/
*/


_unit = _this select 0;


//    Paste your exported loadout and change this to _unit

//________________ Paste here : ________________

comment "Exported from Arsenal by BILLY BLACK BALLS";

comment "Remove existing items";
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

comment "Add containers";
this forceAddUniform "SE_Scavenger_Coat";
this addItemToUniform "FirstAidKit";
this addItemToUniform "MiniGrenade";
this addItemToUniform "CSW_M870_8Rnd_buck";
this addVest "SE_Eastern_Tactical_Vest_Black";
this addItemToVest "FirstAidKit";
for "_i" from 1 to 4 do {this addItemToVest "CSW_M870_8Rnd_buck";};
for "_i" from 1 to 4 do {this addItemToVest "GrenadeMolotovPSENG";};
this addHeadgear "SE_Ushanka";
this addGoggles "SE_GP5";

comment "Add weapons";
this addWeapon "CSW_M870";
this addPrimaryWeaponItem "CSW_M870_flashlight_normal";

comment "Add items";
this linkItem "ItemMap";
this linkItem "ItemCompass";
this linkItem "ItemWatch";
this linkItem "ItemRadio";
this linkItem "SAN_Headlamp_v1";

comment "Set identity";
this setFace "GreekHead_A3_02";
this setSpeaker "male01gre";
 

 

Share this post


Link to post
Share on other sites
14 minutes ago, CHICKENLICKEN said:

I pasted my loadout. what else do I have to change?

 

You need to change this to _unit , as i have wrote and if you notice from the example loadouts .

 

Spoiler




//________________  Author : GEORGE FLOROS [GR] ___________ 11.01.19 _____________

/*
________________ GF Exported Loadouts Script - Mod ________________

https://forums.bohemia.net/forums/topic/221232-gf-exported-loadouts-script-mod/

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open _unit with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open _unit ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(_unit way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Script - Mods , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-Script - Mods/
*/


_unit = _this select 0;


//    Paste your exported loadout and change _unit to _unit

//________________ Paste here : ________________

comment "Exported from Arsenal by BILLY BLACK BALLS";

comment "Remove existing items";
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;

comment "Add containers";
_unit forceAddUniform "SE_Scavenger_Coat";
_unit addItemToUniform "FirstAidKit";
_unit addItemToUniform "MiniGrenade";
_unit addItemToUniform "CSW_M870_8Rnd_buck";
_unit addVest "SE_Eastern_Tactical_Vest_Black";
_unit addItemToVest "FirstAidKit";
for "_i" from 1 to 4 do {_unit addItemToVest "CSW_M870_8Rnd_buck";};
for "_i" from 1 to 4 do {_unit addItemToVest "GrenadeMolotovPSENG";};
_unit addHeadgear "SE_Ushanka";
_unit addGoggles "SE_GP5";

comment "Add weapons";
_unit addWeapon "CSW_M870";
_unit addPrimaryWeaponItem "CSW_M870_flashlight_normal";

comment "Add items";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
_unit linkItem "ItemRadio";
_unit linkItem "SAN_Headlamp_v1";

comment "Set identity";
_unit setFace "GreekHead_A3_02";
_unit setSpeaker "male01gre";

 

 

Share this post


Link to post
Share on other sites

Thanks and I run it with this:

 

if(typeof _this in GF_Exported_Loadouts_Riflemen) then {[_this] execVM format ["GF_Exported_Loadouts\Loadouts\Rifleman\%1.sqf", _Rifleman];};
 

 

?

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, CHICKENLICKEN said:

Thanks and I run it with this:

 

Yes !

 

Tell me if it's working now :tempt:

Share this post


Link to post
Share on other sites
2 hours ago, CHICKENLICKEN said:

Sorry it is working!

 

 

CHICKENLICKEN  . . .

 

frederickdouglass1.jpg

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×