武装突袭3

武装突袭3

评价数不足
Custom Faction Randomization Function
   
奖励
收藏
已收藏
取消收藏
Data Type: Mod
Mod Type: Editor Extension
文件大小
发表于
126.394 KB
5 月 5 日 上午 12:22
1 项改动说明 ( 查看 )

订阅以下载
Custom Faction Randomization Function

描述
Have you ever wanted to make an absolutely atrocious militia faction or add some light randomization to your units when creating a faction?
Well… this is your answer! Custom Faction Randomization Function or “CFRF”

As a quick explanation this function is not my own work, this function was ripped straight out of the Community Factions Project so all the credit goes to them. All I did was single out the function and take away the requirements for anything CUP related so this function (AS FAR AS I'M AWARE) can be used with any combination of mods.

How to use:
In your factions Autogen locate the unit and replace their “init” with this-
—----------------------------------------------------------------------------------------------------------------------------------
init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout; [_this] call CFP_main_fnc_randomizeUnit; reload _this};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
—----------------------------------------------------------------------------------------------------------------------------------
Now insert this into the units equipment area (I put it under respawnMagazines[]) only input the probability type if you're going to use it, and if you use weapon probability you can't add attachments.

In the blanks insert the class name of your chosen equipment which you can extract from ace arsenal by using ctrl+C and pasting the class name into the “Blank” with ctrl+V.

You can also change the probabilities of stuff spawning in by changing the number, the higher it is the more likely it is to spawn.

randomGearProbability = 100;
randomweaponprobability = 100;

uniformList[] = {
"Blank", 0.90,
};

headgearlist[] = {
"Blank", 0.90,
};

facewearlist[] = {
"Blank", 0.90,
};

vestlist[] = {
"Blank", 0.90,
};

backpacklist[] = {
"Blank", 0.90,
};



riflelist[] = {
{"GUN",{"MAGTYPE",NUMBEROFMAGS}},
0.9,
};

handgunlist[] = {
{"GUN",{"MAGTYPE",NUMBEROFMAGS}},
0.9,
};

launcherlist[] = {
{"GUN",{"MAGTYPE",NUMBEROFMAGS}},
0.9,
};

(Most issues you have with this are likely syntax errors on your part, check your work before you complain!)
(ALL CREDITS GO TO CFP)
6 条留言
vina 9 月 20 日 上午 4:22 
Thank you so much, now i finally can do my Generial Southeast Asia Militia Faction
combat1017  [作者] 9 月 19 日 上午 7:46 
Grenades and Medpacks im not too sure about.
JOSE TESTICULOS 9 月 16 日 上午 6:39 
:steamhappy:
JOSE TESTICULOS 9 月 16 日 上午 6:38 
how do you add grenades and medpacks?
combat1017  [作者] 9 月 8 日 上午 11:15 
@Josef Terboven Gaming There is no way as far as I am aware to add attachments.
Sauce 8 月 12 日 下午 3:14 
Yo, how would I setup attachments for weapons and also do you have a discord for easier communication? Might need some help setting this up for my ops.