Page MenuHomeFeedback Tracker

Ability to add/remove slots for an item through script
Closed, ResolvedPublic

Description

Hi,

Currently when 2 mods add inventory slots to an item the later will overwrite the previous. This causes compatibility issues with several mods. Most common workaround right now is to maintain same names but there is a limit to this of course.

Would it be possible to add ability to add and remove slots through script so we can have freewill with the inventorySlots[] ?

Thanks,
Helkhiana.

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
General

Event Timeline

Helkhiana created this task.Feb 6 2020, 6:46 PM
Jest added a subscriber: Jest.Feb 6 2020, 6:55 PM

Submit or i'm calling police

Inkota added a subscriber: Inkota.Feb 6 2020, 7:57 PM
NiiRoZz added a subscriber: NiiRoZz.Feb 7 2020, 6:27 PM
hlynge added a subscriber: hlynge.Feb 9 2020, 8:44 AM
Ficarra1002 added a subscriber: Geez.EditedAug 14 2020, 3:27 AM

@Geez Sorry for the ping, but this is something that the would be extremely useful for us, it's a blocker for a current feature I'm working on. Do you think it's possible to get someone to look into it? Something in script that allows you to insert/remove slots, so that multiple mods can add slots to an item.

komer added a subscriber: komer.Aug 15 2020, 9:08 AM
Nehr added a subscriber: Nehr.Dec 17 2020, 11:50 AM
Spurgle added a subscriber: Spurgle.Jul 6 2021, 6:07 PM

PLZ fix, slots are getting more and more popular with modders and that just causes more and more conflicts.

Geez closed this task as Resolved.Apr 5 2022, 12:33 PM
Geez claimed this task.

Hello everyone.
The issue has been resolved for the 1.17 due to the following:

Added: Modification of arrays in rvconfig by using operator '+='

This solution can be used not only on inventoryslots[] but also on magazines[] and similar fields within the configuration.
Regards,
Geez

Can you put here at least example howto use that operator in config.cpp ? I think lot of modders are tired by reverse engineering and missing documentation.

Hunterz added a comment.EditedApr 7 2022, 8:46 AM

this way?

		attachments[]+=
		{
			"CanisterGasoline",
			"Material_FPole_Flag"
		};

Will that works also for AI config when edit AI groups ?

Geez added a comment.Apr 11 2022, 10:55 AM

Hello Hunterz.
Your example seems okay and it should work for everything.
Regards,
Geez