Jump to content
Fr3eMan

Mod filter script in game

Recommended Posts

Hi all!

I'm trying to implement a script for automatic selection of mod in game.
The mission normally have to start on vanilla version, but in case of server is starting with some specific mod, automatically the mission select/convert the vanilla objects to the mod objects.

I know some scripters already implement some different solutions in their own mission, but my question is if already exist a customizable script tamplate, easy to implement in a custom mission.

In case do not already exist a customizable template , anybody has any suggestion for the best solution to implement?

 

  • Like 1

Share this post


Link to post
Share on other sites

Hello there Fr3eMan !

 

It's possible to do this , but what exacly you want to succeed ?

Spawn obects , units ?

Write more about what exacly application the script will have .

  • Thanks 1

Share this post


Link to post
Share on other sites

Have to work for arsenal objects, units, vehicles and also groups.

For example, on mission start the initialization feel the presence of activated mod on server side, the script check the kind of mods present and on base a specific  priority list or selected on start mission by the player, the script start the mission spawning the objects selected(arsenal objects, unit, vehicles or groups).

So the arsenal object with classlist name "arifle_MX_F" (vanilla) have to be substitute with the class object "rhs_weap_m16a4" (RHSUSAF mod), and so on for unit, vehicles and groups.

 

Share this post


Link to post
Share on other sites
4 minutes ago, Fr3eMan said:

So the arsenal object with classlist name "arifle_MX_F" (vanilla) have to be substitute with the class object "rhs_weap_m16a4" (RHSUSAF mod), and so on for unit, vehicles and groups.

 

Mod detection :

You can use this code and add your code where instead :

 

whitelisted Arsenal :

 

For the spawned units , it's about the spawn script that you are using.

Share this post


Link to post
Share on other sites

But what exacly will be with the mission that you want , are you using a spawn script and which ?

Share this post


Link to post
Share on other sites

Something like

private _units = [Class1, class2, class3];
if (isClass(configfile >> "CfgPatches" >> "cool_infantry")) then { //Find this one in the config for the mod you're using
	_units = [cool_class1, cool_class2, cool_class3];
};

 

Share this post


Link to post
Share on other sites
1 hour ago, GEORGE FLOROS GR said:

But what exacly will be with the mission that you want , are you using a spawn script and which ?

 

I check your code GF_Mod_Check and I understand that working with the check of configfile check, and i suppose is the most simple solution for activate the mod filter.

So adding the code in the initServer.sqf if I also insert some arrays connected with the different mod classlist to be called on the virtual arsenal when spawn on map.

In the same way will change the vanilla classlist objets/groups with mod classlist objets/groups.

 

 

1 hour ago, GEORGE FLOROS GR said:

 

 

 

whitelisted Arsenal :

 

 

I usually spawn by script the arsenal in game  😉

Recently I created a function for this use in game (is under testing).

 

 

31 minutes ago, Spatsiba said:

Something like


private _units = [Class1, class2, class3];
if (isClass(configfile >> "CfgPatches" >> "cool_infantry")) then { //Find this one in the config for the mod you're using
	_units = [cool_class1, cool_class2, cool_class3];
};

 

 

I think so.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, GEORGE FLOROS GR said:

Is this mission that you want to work with or just for an example ?

 

Just a sample, this already work...
My starting question was if already exiting a script template mission shared in the community with this implementation.
Before starting to write form zero a script, I want to be sure anybody else alredy did and I than can use it.

Share this post


Link to post
Share on other sites

I have a new script that is an atomatic spawner system and by the way it's about to update .

There are a lot of scipts , easy to read and reedit with a lot of examples and it is also very easy to add custom classnames in order to use different mod .

So you can combne with the Mod Check and all together.

 

Check here if you want :

 

Just if you do like the scripts , hold on also for the update , because there will be in the code some major fixes.

  • Like 1

Share this post


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

I have a new script that is an atomatic spawner system and by the way it's about to update .

There are a lot of scipts , easy to read and reedit with a lot of examples and it is also very easy to add custom classnames in order to use different mod .

So you can combne with the Mod Check and all together.

 

 

Working also with arsenal objects?

Share this post


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

Working also with arsenal objects?

 

The script is an automatic Unit spawner.

It's not a mission.

Share this post


Link to post
Share on other sites
8 hours ago, GEORGE FLOROS GR said:

 

The script is an automatic Unit spawner.

It's not a mission.

 

Ok is  just units spawner.

Share this post


Link to post
Share on other sites

I'm doing the same thing for my mission where I want the vanilla (or Apex) stuff replaced by some mod like RHS, unsung, etc.

The way I did this for static weapons was that I put all the weapons each in their own category. Then if I want let's say "Gun1" to be replaced with "Gun1_RHS" I look for the category of Gun1 and then I can replace that with the gun from same category but from different mod.

Not sure if I explained that clearly , maybe it's just better to show example how I registered the guns in classes:

 

Spoiler


class CtiStaticWeaponsApex
{
 class east
 {
  class HmgHigh
  {
   class O_HMG_01_high_F {};
  };
  class HmgLow
  {
   class O_HMG_01_F {};
   class O_HMG_01_A_F {};
  };
  class HgmgHigh
  {
   class O_GMG_01_high_F {};
  };
  class Hgmg
  {
   class O_GMG_01_F {};
   class O_GMG_01_A_F {};
  };
  class ATHigh
  {
   class O_static_AT_F {};
  };
  class AAHigh
  {
   class O_static_AA_F {};
  };

 };
 
 class west
 {
  class HmgHigh
  {
   class B_HMG_01_high_F {};
  };
  class HmgLow
  {
   class B_HMG_01_F {};
   class B_T_HMG_01_F {};
  };
  class HgmgHigh
  {
   class B_GMG_01_high_F {};
  };
  class Hgmg
  {
   class B_GMG_01_F {};
   class B_GMG_01_A_F {};
  };
  class ATHigh
  {
   class B_static_AT_F {};
   class B_T_Static_AT_F {};
  };
  class AAHigh
  {
   class B_static_AA_F {};
   class B_T_Static_AA_F {};
  };
 };
 
 class guer
 {
   class HmgHigh
  {
   class I_HMG_01_high_F {};
  };
  class HmgLow
  {
   class I_HMG_01_F {};
   class I_HMG_01_A_F {};
  };
  class HgmgHigh
  {
   class I_GMG_01_high_F {};
  };
  class Hgmg
  {
   class I_GMG_01_F {};
   class I_GMG_01_A_F {};
  };
  class ATHigh
  {
   class I_static_AT_F {};
  };
  class AAHigh
  {
   class I_static_AA_F {};
  };
 };
 
 
}; 

 

 

Then if I want "I_HMG_01_F" to be replaced I just get the category of "I_HMG_01_F" from mod A (HmgLow) and replace it from same category (HmgLow) from mod B

 

Hope that helps

  • Thanks 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

×