Page MenuHomeFeedback Tracker

InventorySlot string cannot be overriden into an array
Closed, ResolvedPublic

Description

Currently if an item is defined in config.cpp with an inventorySlot as string, it will not allow to be overriden as an Array. It has been tested in multiple ways.
Could you please update config variable inventorySlot to be ONLY array? For example Hatchet has inventorySlot="" in the config which disables the possibility of making it into an array through modding.

From:
inventorySlot="CableReel";
To:
inventorySlot[]=
        {
            "CableReel"
        };

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
General
Steps To Reproduce

Create new mod. Create config.cpp with following code. Then spawn item Civilian belt and 4 hatchets. Attachment is not allowed.

class CfgSlots
{
	class Slot_Hatchet1
	{
		name="Hatchet1";
		displayName="Hatchet1";
		ghostIcon="shoulderleft";
	};
	class Slot_Hatchet2
	{
		name="Hatchet2";
		displayName="Hatchet2";
		ghostIcon="shoulderleft";
	};
	class Slot_Hatchet3
	{
		name="Hatchet3";
		displayName="Hatchet3";
		ghostIcon="shoulderleft";
	};
	class Slot_Hatchet4
	{
		name="Hatchet4";
		displayName="Hatchet4";
		ghostIcon="shoulderleft";
	};
};

class CfgVehicles
{
	class Clothing;
	class Inventory_Base;
	class CivilianBelt: Clothing
	{
		attachments[]=
		{
			"Belt_Back",
			"Belt_Right",
			"Belt_Left",
			"Hatchet1",
			"Hatchet2",
			"Hatchet3",
			"Hatchet4"
		};
	};
	class Hatchet: Inventory_Base
	{
		inventorySlot[]=
		{
			"Hatchet1",
			"Hatchet2",
			"Hatchet3",
			"Hatchet4"
		};
	};
};

Event Timeline

Jest added a subscriber: Jest.Jan 24 2020, 2:31 PM
Jest added a comment.Jan 24 2020, 2:33 PM

I second Helkhiana's request and think it would be a great change for the modding community for there are many mods right now adding slots to all sorts of things and running into issues. I think her solution is likely the most realisticaly achievable and am fine with that, but wanted to add that it would be even better if it were possible to register these slots scriptside much like we do actions/recipes. Thank you for your time!

Geez closed this task as Resolved.Jan 30 2020, 12:20 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Thank you for the report Helkhiana.
The issue has been fixed internally and will be fixed on Steam in the future.
Regards,
Geez

thank you. i've seen the change in 1.07 experimental. should we make a new ticket for the suggestion of being able to add/remove slots through script?

Geez added a comment.Feb 4 2020, 12:46 PM

Hell Helkhiana.
Please do so.
Regards,
Geez