Start up gear

Dear forum members,
for some time now we have been creating and maintaining new ways to help game server admins with questions and problems as quickly as possible, e.g. our Guides section and the Nitrado Community Discord.

Therefore, we inform you that the Nitrado Forum will be closed on March 31, 2023. We are consolidating our community support to our Discord channel, which is faster and more efficient. We have also seen incredible growth in our community due to the hard work of our moderators and our bots. We are confident that this move will ensure that we provide the best support possible for our users.

Thank you to all members for your continued use of the forum!

Assistance with all questions concerning your Nitrado service can now be found in these spots:
Community Discord: https://discord.gg/nitrado
Guides section: https://server.nitrado.net/guides
Support Wizard: https://support.nitrado.net
  • Can anyone help please


    Hi guys, I have seen a program called dayz loadout generator, but can't find it anywhere....


    On my server I want players to spawn with a random gun from pistols to military rifles with ammo, mags and bullets, silencers, scopes , a random backpack, few bits of food, canteen, all the tablets like water purify, antibiotics, vitamins etc, bandages,. The rest they can find but can defend themselves upon spawning.


    Can anyone help as I don't have a clue what to type in the init. C file. Which is why I wanted the generator as does it for you.


    making my server pvp in most area with just one safe zone. Just wanna give players a chance to defend themselves upon spawning.... Server is ready to go and all working great apart from the load out.


    If you know where to get the file, or the text I need to copy and paste in the file I'd be so thankful of any help.


    Thanks in advance

  • I don't know how you would get init.c to randomly do that. Here is my init.c for a new spawn load out:


    added after the line "SetRandomHealth( itemEnt );"


    player.GetInventory().CreateInInventory("AliceBag_Black"); // added items

    player.GetInventory().CreateInInventory("Compass"); // added items

    player.GetInventory().CreateInInventory("Canteen"); // added items

    player.GetInventory().CreateInInventory("SardinesCan"); // added items

    player.GetInventory().CreateInInventory("CombatKnife"); // added items

    player.GetInventory().CreateInInventory("MilitaryBelt"); // added items

    player.GetInventory().CreateInInventory("NylonKnifeSheath"); // added items

    player.GetInventory().CreateInInventory("PlateCarrierHolster"); // added items

    player.GetInventory().CreateInInventory("PistolSuppressor"); // added items

    player.GetInventory().CreateInInventory("CanOpener"); // added items

    player.GetInventory().CreateInInventory("M4A1"); // added items

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd"); // added items

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd"); // added items

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd"); // added items

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd"); // added items

    player.GetInventory().CreateInInventory("Glock19"); // added items

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd"); // added items

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd"); // added items

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd"); // added items

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd"); // added items

    player.GetInventory().CreateInInventory("BandageDressing"); // added items

    player.GetInventory().CreateInInventory("WoodAxe"); // added items

    player.GetInventory().CreateInInventory("SodaCan_Pipsi"); // added items

    player.GetInventory().CreateInInventory("SodaCan_Spite"); // added items

    player.GetInventory().CreateInInventory("TacticalBaconCan"); // added items

    player.GetInventory().CreateInInventory("Matchbox"); // added items

    player.GetInventory().CreateInInventory("WeaponCleaningKit"); // added items


    to add items, find the name for what you want to add in the types.xml file, copy the line and replace with desired item.

  • Thank you so much exactly what I was looki g for, a coupke of edits and I'm good to go, thank you kind sir

  • this is what i got now but cant seem to find server after restart once text added.... is something wrong??


    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();


    weather.MissionWeather(false); // false = use weather controller from Weather.c


    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);


    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();


    //DATE RESET AFTER ECONOMY INIT-------------------------

    int year, month, day, hour, minute;

    int reset_month = 9, reset_day = 20;

    GetGame().GetWorld().GetDate(year, month, day, hour, minute);


    if ((month == reset_month) && (day < reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month == reset_month + 1) && (day > reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month < reset_month) || (month > reset_month + 1))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    }

    }

    }


    class CustomMission: MissionServer

    {

    void SetRandomHealth(EntityAI itemEnt)

    {

    if ( itemEnt )

    {

    float rndHlt = Math.RandomFloat( 0.25, 0.65 )

    itemEnt.SetHealth01( "", "", rndHlt );

    }

    }


    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)

    {

    Entity playerEnt;

    playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );

    Class.CastTo( m_player, playerEnt );


    GetGame().SelectPlayer( identity, m_player );


    return m_player;

    }


    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

    EntityAI itemClothing;

    EntityAI itemEnt;

    ItemBase itemBs;

    float rand;


    itemClothing = player.FindAttachmentBySlotName( "Body" );

    if ( itemClothing )

    {

    SetRandomHealth( itemClothing );


    itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );

    if ( Class.CastTo( itemBs, itemEnt ) )

    itemBs.SetQuantity( 4 );


    SetRandomHealth( itemEnt );


    string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };

    int rndIndex = Math.RandomInt( 0, 4 );

    itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );

    SetRandomHealth( itemEnt );


    rand = Math.RandomFloatInclusive( 0.0, 1.0 );

    if ( rand < 0.35 )

    itemEnt = player.GetInventory().CreateInInventory( "Apple" );

    else if ( rand > 0.65 )

    itemEnt = player.GetInventory().CreateInInventory( "Pear" );

    else

    itemEnt = player.GetInventory().CreateInInventory( "Plum" );


    SetRandomHealth( itemEnt );

    }


    player.GetInventory().CreateInInventory("AliceBag_Black");

    player.GetInventory().CreateInInventory("Compass");

    player.GetInventory().CreateInInventory("Canteen");

    player.GetInventory().CreateInInventory("SardinesCan");

    player.GetInventory().CreateInInventory("CombatKnife");

    player.GetInventory().CreateInInventory("MilitaryBelt");

    player.GetInventory().CreateInInventory("NylonKnifeSheath");

    player.GetInventory().CreateInInventory("PlateCarrierHolster");

    player.GetInventory().CreateInInventory("PistolSuppressor");

    player.GetInventory().CreateInInventory("CanOpener");

    player.GetInventory().CreateInInventory("M4A1");

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");

    player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");

    player.GetInventory().CreateInInventory("Glock19");

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");

    player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");

    player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");

    player.GetInventory().CreateInInventory("BandageDressing");

    player.GetInventory().CreateInInventory("WoodAxe");

    player.GetInventory().CreateInInventory("SodaCan_Pipsi");

    player.GetInventory().CreateInInventory("SodaCan_Spite");

    player.GetInventory().CreateInInventory("TacticalBaconCan");

    player.GetInventory().CreateInInventory("Matchbox");

    player.GetInventory().CreateInInventory("WeaponCleaningKit");

    }

    };


    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    }

  • this is what i got now but cant seem to find server after restart once text added.... is something wrong??


    are you saying you cannot find the server in the steam client? HOPING you mad a backup of your init.c file first. If you did, just replace your edited file with the old (original) and see if you can connect then. If you can, make your server a favorite.


    I do see some extra brackets in your init.c file - I've attached my complete file to this post.

    back up your old file

    download my file 'init.txt'

    rename file to init.c (for some reason I cannot upload '.c' file extension to the forum)

    upload new file to /dayzstandalone/mpmissions/dayzOffline.chernarusplus

    restart your server


    hope that helps!

  • Thank you so much that did it m8, so appreciated

  • Hi there danfinger.

    I was looking at your setup here to set what people can spawn with as fresh and after death.
    I have tried what you have here, but it does not work.

    Any files I need to delete for it to update or? I want some better starter gear on my server that I have set, but I have tried wiping the server and restarting without any luck.

    If you have discord, can you give a shout out to Nikon#3280 ?

  • Hi there danfinger.

    I was looking at your setup here to set what people can spawn with as fresh and after death.
    I have tried what you have here, but it does not work.

    Any files I need to delete for it to update or? I want some better starter gear on my server that I have set, but I have tried wiping the server and restarting without any luck.

    If you have discord, can you give a shout out to Nikon#3280 ?

    Did you download the file I attached?

    Did you rename it from init.txt to init.c ?

    Did you backup your old init.c file?

    Did you delete your old init.c file?




    You should answer 'Yes' for all of the above for it to work right. okay maybe not for backup but you get the drift. Do all of the above and then upload my init.c to your server


    /dayzstandalone/mpmissions/dayzOffline.chernarusplus/init.c


    and I'm certain it will work.