Jump to content

Recommended Posts

gf-set-custom-loadout-script-version-100

GF Set Custom Loadout Script - Mod

by

 

GEORGE FLOROS [GR]

 

 

Description:

GF Set Custom Loadout Script , Set your Custom Loadout to AI and 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 Set Custom Loadout Script 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 colours 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:

It is also included a mod version , posible to unpack and edit.
It is possible to set the loadout also for the spawned units.
There is an exclude list available or add in the init of a unit:
this setVariable ["Var_GF_Set_Custom_Equipment", true];
More information inside the .sqf

 


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:

v3.0
Added extended options , in order to spawn a different loadout for each side.
Several Fixes.

v2.0
Added files for :
CUP mod , RHS mod , Unsung mod ,
with different variables for everyone.
Full ACE3 mod list
Added options for Ravage mod and ACE3 mod.
Several fixes.

 

v1.0


Forum topic:

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

 

 

 

Armaholic

GF Set Custom Loadout Script

 

 

  • Informations about exlude or spawn :
Spoiler
On 10/5/2018 at 11:38 PM, GEORGE FLOROS GR said:

In order to exlude or spawn , you can do it with many ways:

 

  • You can  write the classnames in the Exclude lists ,

 

  • you can add in the init of the unit :


this setVariable ["Var_GF_Set_Custom_Equipment", true];

you can add in the code at the last lines :



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

 

  • you can also spawn this for a certain unit :

name this unit  ex : GF_SCE_1



GF_SCE_1 spawn GF_Set_Custom_Equipment;

 

  • you can also spawn this for a certain unit in the Editor :

add this in the init of a unit :



null = this execVM "GF_Set_Custom_Loadout\GF_Set_Custom_Loadout.sqf";

and add instead of the spawn code in the end :


_this spawn GF_Set_Custom_Equipment;
  • or only for player :

player spawn GF_Set_Custom_Equipment;
  • or  for everyone :

null = {_x spawn GF_Spawn_Custom_Equipment;}forEach allUnits;

 

 

 

There is also available a Mod with userconfig to apply settings:

 

  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites

Cool script, George! Do you think there would be a way to adjust the Exclude List so that it could exclude factions or sides? I'm not sure if that's within the scope of what you're doing with this script of if it would be useful to everyone, but for my community it would almost be like a quick and dirty way to create a new mod with a new faction.

  • Thanks 1

Share this post


Link to post
Share on other sites

@GEORGE FLOROS GR Looking through this script and wondering if it would be OK to leave the credits to you in there but eliminate the stuff I would not need/use ever like zombies and ravage mod junk?

  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, diehardfc said:

adjust the Exclude List so that it could exclude factions or sides?

 

Hello there diehardfc !

 

Thank you very much !

 

In order to exlude or spawn , you can do it with many ways:

 

  • You can  write the classnames in the Exclude lists ,

 

  • you can add in the init of the unit :
this setVariable ["Var_GF_Set_Custom_Equipment", true];

you can add in the code at the last lines :

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

 

  • you can also spawn this for a certain unit :

name this unit  ex : GF_SCE_1

GF_SCE_1 spawn GF_Set_Custom_Equipment;

 

  • you can also spawn this for a certain unit in the Editor :

add this in the init of a unit :

null = this execVM "GF_Set_Custom_Loadout\GF_Set_Custom_Loadout.sqf";

and add instead of the spawn code in the end :

_this spawn GF_Set_Custom_Equipment;
  • or only for player :
player spawn GF_Set_Custom_Equipment;
  • or  for everyone :
null = {_x spawn GF_Spawn_Custom_Equipment;}forEach allUnits;

 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Nichols said:

stuff I would not need/use

 

Hello there Nichols !

 

Thank you very much !

 

You can do anything you like !

I have just add a list there , for Ravage and ACE mod.

Share this post


Link to post
Share on other sites

Picture playing the #infantry showcase :
vctuYdvfQWKL2r6g4QqGkQ.png

 

 

I have forgot to add the list with all the gear  so ,

i have include this in the next update , there are some fixes and also there will be available , extra lists for CUP and Unsung mod .

Share this post


Link to post
Share on other sites

Updating :

 

Changelog:

 

v2.0
Added files for :
CUP mod , RHS mod , Unsung mod ,
with different variables for everyone.
Full ACE3 mod list
Added options for Ravage mod and ACE3 mod.
Several fixes.

Share this post


Link to post
Share on other sites
On 5/10/2018 at 6:47 PM, diehardfc said:

a quick and dirty way to create a new mo

 

Hello diehardfc !

 

Check also here :

 

 

Share this post


Link to post
Share on other sites

Thanks. But I still have no idea what part to edit to give ravage enemies the loadou I want?>

 

There is so much info. I'm opening GF)set custom loadout sqf

  • Like 1

Share this post


Link to post
Share on other sites

#By the way i need to update this as well !

 

So , you can add 4 copy of this script, that you can fill the arrays , with the items from any mod that you want and at the end of the script, where the spawn part is , you will add the selected side that you want to apply the change:

 

&& ((side group _x) == east)

 

and you will use unique global variables , for every script as :

 

GF_SCL_Primary_Weapon_array

should be ex:

GF_SCL_Primary_Weapon_array_east

maybe for the east side units.

PS: caution with the global variables !

 

and then , once you will create , for ex. 3 .sqf for different loadouts for 3 sides,

execute them also in your init or initserver.sqf

 

ex:

[] execVM "GF_Set_Custom_Loadout\GF_Set_Custom_Loadout_east.sqf";
[] execVM "GF_Set_Custom_Loadout\GF_Set_Custom_Loadout_west.sqf";
[] execVM "GF_Set_Custom_Loadout\GF_Set_Custom_Loadout_independent.sqf";

 

  • Like 1

Share this post


Link to post
Share on other sites

Question?

How to lock an enemy vehicle so that a player can not taken. (Tank / APC / Armored car / plane / helicopter).

AI drives that vehicle and AI can get back to that vehicle, but not the players.


sry wrong page.......................................................................................................................

Edited by Casio91Fin
sry wrong page
  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Casio91Fin said:

How to lock an enemy vehicle

 

This can be a new script !

Just for the curiosity ,

Why didn't you post this question to a topic like Compilation List of my GF Scripts ?




//________________  Author : [GR]GEORGE F ___________ 09.12.18 _____________

/*
________________ GF_Lock_Vehicles ________________



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 Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/


//	If you want the script to run only in the server use the code below
if(!isServer) exitWith {};

diag_log "//________________ GF_Lock_Vehicles _____________";

systemchat "GF_Lock_Vehicles    I n i t i a l i z e d";

//________________ GF_Lock_Vehicles ____________


GF_Lock_Vehicles = { 

_this setVehicleLock "LOCKEDPLAYER";	

};


[] spawn {
	while {true} do {
    _time = diag_tickTime + 10;
    _i = 0;
    waitUntil {
        _i = _i + 1;		
        diag_tickTime >= _time
    };
	
	{	
		if ( 
		(!(_x getVariable ["Var_GF_Lock_Vehiles",false])) && ((_x isKindOf "Car") || (_x isKindOf "Tank") || (_x isKindOf "Air") || (_x isKindOf "Ship")) 
		
		) then {
		
		_BIS_fnc_objectSide = [vehicle _x, true] call BIS_fnc_objectSide;
		if (!(_BIS_fnc_objectSide == playerside)) then {
			_x call GF_Lock_Vehicles}
			
			};						
			_x setVariable ["Var_GF_Lock_Vehicles",true];	

			{waitUntil (damage _x == 1 || {!canMove _x});
			_x setVariable ["Var_GF_Lock_Vehicles",false];
		};
	}forEach vehicles;

	};
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Really sorry but I still don't understand.

 

SO I have 3 different sqf files for independent , blu for and opfor. yet I still have no idea what to put in them.

 

Do you have a template which is blank where the weapons/gear is, then I can just fill the classnames?

 

thanks for help.

 

Share this post


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

Do you have a template which is blank where the weapons/gear is, then I can just fill the classnames?

 

I will post a solution below, but generally it's easy to do this with notepad ++ for example.

Share this post


Link to post
Share on other sites
Just now, CHICKENLICKEN said:

thanks for your help

 

no problem , just hung on !

Just to know also this script is about to update !

I just need to do some stuff first to some other scripts !

Share this post


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

Any news?

 

I'm going to update also this script and i have also to do the same for some other , so you will wait a little bit , but it will be very soon !

Share this post


Link to post
Share on other sites
On 12/12/2018 at 3:47 PM, CHICKENLICKEN said:

Ok no problem, thanks you!

 

Changelog:

v3.0
Added extended options , in order to spawn a different loadout for each side.
Several Fixes.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

It's uploaded in armaholic , but not available yet !

Once is up everything is already sorted out.!

  • Like 1

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

×