[SOLVED]IFa3 player 'skins' reverting to arma 3 default soldiers

I have a WW2 wasteland server im working on running Iron Front, I've so far got vehicle spawns set to ww2 vehicles, store config setup so the vehicles can be bought, but im having a little issue with player spawning. In the editor i replaced all the playable characters with Iron Front soldiers, and even for testing i put in a few default soldiers from arma3. Apon spawning, the class i select, gets randomized to Arma 3 units.

What do I need to do to have it so players actually spawn as Iron Front soldiers and not default arma 3 units?

Re: IFa3 player 'skins' reverting to arma 3 default soldiers

« Reply #1 posted: Jul 18, 2021, 11:29 AM »
Create a sqf file, called "startuniform.sqf" and put it in your folder "scripts".
Write this inside startuniform.sqf:

Code: [Select]
waitUntil {!isNull player};       
_unit = _this select 0;
removeUniform _unit;
_array = ["uniform1","uniform2","uniform3"];
_clothing = selectRandom _array;
_unit forceAddUniform _clothing;

if(true) exitWith{};

This code is only for the uniform. If you also want to change vests, helmes etc, create another array for each of them.
 Here you should find the uniform classnames: https://forums.bohemia.net/forums/topic/127617-classnames/

Go into init of each playable unit and write into their inits:

Code: [Select]
call{null = [this] execVM "scripts\startuniform.sqf";
this addeventhandler ["respawn","_this execVM 'scripts\startuniform.sqf'"];}

If you only want to change the faces, you could use setFace: https://community.bistudio.com/wiki/setFace
A list of available faces can be found here: https://community.bistudio.com/wiki/Arma_3:_CfgIdentities#Faces
Open "show text" below "faces"
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2610

Re: IFa3 player 'skins' reverting to arma 3 default soldiers

« Reply #2 posted: Jul 19, 2021, 09:37 PM »
The proper way to do it is to replace the item names in client\functions\getDefaultClothing.sqf with those from the Iron Front config.

Re: IFa3 player 'skins' reverting to arma 3 default soldiers

« Reply #3 posted: Jul 20, 2021, 08:59 AM »
Nice

The way I did it is because I was into Antistasi Mod lately.