Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Smokeydapot

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Smokeydapot

  • Rank
    On the Coast

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Smokeydapot

    Custom loadout Loose ammo

    @aussie battler thanks for the reply but I already tried this method also with no success as this also creates a full stack of 20 rounds and not an intended 10 rounds. Methods tried: itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(0.5); ------------------------------------------ itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(10); ------------------------------------------------------------------------ itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); itemBs = ItemBase.Cast(itemEnt); itemBs.SetQuantity(0.5); ---------------------------------------------------------------------------------- itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); itemBs = ItemBase.Cast(itemEnt); itemBs.SetQuantity(10); While this works with rags this method doesn't work for ammo stacks sadly, I did consider also setting a negative value to remove an amount of ammo as a positive value may have been ignored but setting a negative value just removes the ammo stack. Methods tried: itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(-0.5); ------------------------------------------ itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(-10); ------------------------------------------------------------------------ itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); itemBs = ItemBase.Cast(itemEnt); itemBs.SetQuantity(-0.5); ---------------------------------------------------------------------------------- itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); itemBs = ItemBase.Cast(itemEnt); itemBs.SetQuantity(-10);
  2. Smokeydapot

    Custom loadout Loose ammo

    So i'm making some custom loadouts in the init.c file but i'm coming up against an issue and that is how to add an ammo stack other than the max rounds you get from a box of ammo. I have been trying a similar method from the init file that adds a number of Rags E.g. itemEnt = itemTop.GetInventory().CreateInInventory("Ammo_308Win"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(0.5); To hopefully create a stack of ten 308 rounds but this just creates a full stack of 20, I have also tried: itemBs.SetQuantity(10); But this also creates a full stack of ammo, Does anyone have a solution that creates a stack of loose ammo other than a full box stack of ammo ? Any help is appreciated.
  3. Smokeydapot

    Custom Loadouts

    Yes you can add a FirstAidKit with items inside it by doing something like this: ItemBase FirstA = Bpack.GetInventory().CreateInInventory("FirstAidKit"); FirstA.GetInventory().CreateInInventory ("BandageDressing"); FirstA.GetInventory().CreateInInventory ("BandageDressing"); FirstA.GetInventory().CreateInInventory ("BloodBagEmpty"); FirstA.GetInventory().CreateInInventory ("SurgicalGloves_Blue"); FirstA.GetInventory().CreateInInventory("BloodTestKit"); Weapons with attachments I do like this and they are attached to the weapons on spawn: ItemBase PrimGun = player.GetHumanInventory().CreateInInventory("Mosin9130"); PrimGun.GetInventory().CreateAttachment("Mosin_Compensator"); PrimGun.GetInventory().CreateAttachment("PUScopeOptic"); Or for weapons with battery powered attachments this: ItemBase PrimGun = player.GetHumanInventory().CreateInInventory("M4A1"); PrimGun.GetInventory().CreateAttachment("M4_RISHndgrd"); PrimGun.GetInventory().CreateAttachment("M4_CQBBttstck"); PrimGun.GetInventory().CreateAttachment("M4_Suppressor"); ItemBase PrimLight = PrimGun.GetInventory().CreateAttachment("UniversalLight"); PrimLight.GetInventory().CreateAttachment("Battery9V"); ItemBase PrimSight = PrimGun.GetInventory().CreateAttachment("M68Optic"); PrimSight.GetInventory().CreateAttachment("Battery9V"); I'm not sure on adding a weapon with a mag attached already, I do see the gun bug out if I try some options tho.
×