[Exile Mod] - UID Based Custom Loadouts?

KrisiS

Member
Hey guys,

By any off the wall chance, would you know how to make UID Based Loadouts work for exile mod?
 
Haha, I should have know that if someone would reply - it would be ShootingBlanks :)
Thanks for the reply man, it is much appreciated.. I've tinkered around with it as much as I can for now and have not come up with much.

The game has a Bambi mode, which is throwing me. Upon spawning, you become a Bambi - there is a loadout setting for the bambi - but I have no idea how to override this for a custom UID loadout.

ExileClient_object_player_bambiStateBegin.sqf:
Code:
/**
* Exile Mod
* www.exilemod.com
* © 2015 Exile Mod Team
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
private["_duration"];
disableSerialization;
_duration = _this;
ExileClientPlayerIsBambi = true;
ExileClientPlayerBambiStateExpiresAt = time + _duration;
true call ExileClient_gui_hud_toggleBambiIcon;
DeployBikeAction = player addaction [("<t color=""#00CF11"">" + ("Spawn Quad: $1000") +"</t>"),"addons\bike\spawn_bike.sqf","",-97,false,false,"",""];
ExileClientEndBambiStateThread = [_duration, ExileClient_object_player_bambiStateEnd, [], true] call ExileClient_system_thread_addTask;
true



ExileClient_object_player_bambiStateEnd.sqf:
Code:
/**
* Exile Mod
* www.exilemod.com
* © 2015 Exile Mod Team
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
*/
disableSerialization;
if (alive player) then
{
    [["Exile", "BambiStateEnded"], 15, "", 35, "", true, false, true, true] call BIS_fnc_advHint;
    ["endBambiStateRequest"] call ExileClient_system_network_send;  
};
[ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask;
ExileClientPlayerIsBambi = false;
false call ExileClient_gui_hud_toggleBambiIcon;
true


config.cpp (exile_server_config.pbo)
Code:
///////////////////////////////////////////////////////////////////////
    // PLAYER SPAWN CONFIGURATION
    ///////////////////////////////////////////////////////////////////////
    class BambiSettings
    {
        /**
         * Loadout of new bambi players
         *
         * (They will always spawn with a bambi overall - you cannot
         * change the loadout uniform)
         */
        loadOut[] =
        {
            "ItemCompass",
            "ItemMap",
            "Exile_Item_XM8",
            "ItemRadio",
            "Exile_Item_InstaDoc",
            "Exile_Item_Catfood_Cooked",
            "NVGoggles_OPFOR",
            "Exile_Item_PlasticBottleFreshWater"
           
        };

        /**
         * Enables or disables parachute spawning.
         *
         * 1 = On
         * 0 = Off
         */
        parachuteSpawning = 0;

        /**
         * Enables or disables halo jumping. Only applies
         * if parachute spawning is enabled.


etc....
etc....
etc....
etc....
 
I think I found an avenue worth exploring,, will have to check it out tomorrow as its too late now. :(
 
I really have not had much desire to even turn on my computer lately so cant guarantee i will get to this. But I think i am currently running an Exile server ... I was last month anyways, havent looked at it in a while ... so I am familiar with it.
You should be able to modify the exile_server.pbo which has a file that creates the player loadout, ExileServer_object_player_network_createPlayerRequest.sqf
You will see the code retrieves the player UID and then adds in the loadout. all you have to do is create multiple blocks for each UID. Here is a guestimate of the code. check it for syntax and matching braces ....
change this code .....
Code:
{
    _cargoType = _x call ExileClient_util_cargo_getType;
    switch (_cargoType) do
    {
        case 1:     { _bambiPlayer addItem _x; };
        case 2:     { _bambiPlayer addWeaponGlobal _x; };
        case 3:     { _bambiPlayer addBackpackGlobal _x; };
        case 4:        { _bambiPlayer linkItem _x; };
        default     { _bambiPlayer addItem _x; };
    };
}
forEach getArray(configFile >> "CfgSettings" >> "BambiSettings" >> "loadOut");
Into this code. Replace the _x with the item. I am not sure about using the https://community.bistudio.com/wiki/linkItem. You might have to incorporate the original codes call to get the cargotype and use that .... the numbers in the CASE line are each players UID for the custom loadout.
Code:
switch (playerUID) do
{

        case 00000:     {
                                   _bambiPlayer addItem _x;
                                  _bambiPlayer addWeaponGlobal _x;
                                  _bambiPlayer addBackpackGlobal _x;
                                   _bambiPlayer linkItem _x;
                                  };
 
         case 00001: 
                                  {
                                   _bambiPlayer addItem _x;
                                  _bambiPlayer addWeaponGlobal _x;
                                  _bambiPlayer addBackpackGlobal _x;
                                   _bambiPlayer linkItem _x;
                                  };
        default
                             
                                 {
                                   _bambiPlayer addItem _x;
                                  _bambiPlayer addWeaponGlobal _x;
                                  _bambiPlayer addBackpackGlobal _x;
                                   _bambiPlayer linkItem _x;
                                  };

}
 
Last edited:
Back
Top