Page MenuHomeFeedback Tracker

Community Terrain Dust Effect Conflict (+= for nested arrays)
Closed, ResolvedPublic

Description

The current configuration structure for linking terrain surface types (CfgSurface entries) to particle effects that are created when entities move over it is not patchable through addon files.

Currently as it stands the CfgVehicles classes Car, Tank, Air and Man have two parameters, rightDustEffects[] and leftDustEffects[], which are arrays. These arrays contain nested arrays that are pairs of cfgSurface classnames and their linked particle effects.

This array cannot be extended by community addons, thus creating a problem where there can only ever by one addon loaded that redefines these arrays to inject their own surface definitions.

Solution:
The config operator "+=" would be the way to go here, however that operator can not extend arrays with nested arrays:

rightDustEffects[] += { {"Nested","Array"}}; // Does not patch the array.

The easiest fix to solving this here would be expanding the += operator to allow adding nested arrays to the array-parameter. This would not cause any issues with backwards compatibility.

Alternative Solution:
Changing the config structure of this into subclasses:

class rightDustEffects
{
    surfaceClassname = particleEffectClassname;
};
class leftDustEffects
{
    surfaceClassname = particleEffectClassname;
};

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
17134
Category
Config
Steps To Reproduce

No repro steps needed, this is a config structure issue.

Additional Information

Event Timeline

Mondkalb created this task.Jul 3 2018, 9:53 AM
Mondkalb edited Additional Information. (Show Details)Jul 3 2018, 9:58 AM
Uro added a subscriber: Uro.Jul 5 2018, 11:31 AM
nomisum added a subscriber: nomisum.Jul 6 2018, 9:54 AM
rizon02 added a subscriber: rizon02.Jul 6 2018, 4:14 PM
Cosmo added a subscriber: Cosmo.Jul 6 2018, 8:57 PM
Uro added a comment.May 4 2019, 1:35 AM

Any updates on this issue from Bohemia?
This has been on the issue tracker for almost a year and not even acknowledged by BI for something that would be a relatively easy fix and require minimal work on their end.

Having an un-appendable array like this is pretty backwards when someone is looking to enhance terrain surfacing by adding unique definitions for their terrains and particle effects.
Adding this feature would enable community authors to append this array without having to over-write the default Arma 3 values - which is super bad practice and would affect any other mods loaded.

I brought up that exact same issue in Mnišek... :/

dedmen claimed this task.Apr 27 2020, 12:50 PM
-Ben- added a subscriber: -Ben-.Apr 27 2020, 12:52 PM
dedmen added a project: Restricted Project.May 20 2020, 11:27 AM
dedmen moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 20 2020, 11:35 AM
dedmen changed the task status from New to Assigned.May 23 2020, 1:24 PM
dedmen set Ref Ticket to 49910.

Change
Before:

class rightDustEffects
{
    surfaceClassname = particleEffectClassname;
};
class leftDustEffects
{
    surfaceClassname = particleEffectClassname;
};

after

class dustEffects
{
    class default {
        surfaceClassname = particleEffectClassname;
    };
    class left : default {};
    class right : default{};
}
dedmen moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 25 2020, 5:43 PM
dedmen moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
This comment was removed by Dwarden.
dedmen changed the task status from Assigned to Feedback.Jun 5 2020, 12:46 PM

Arma root config

CfgDustEffectsCar {
class both {
mySurface[] = {"myEffect"};
}
class left: both {}
class right:both {}
}

same probably for Tank and Air too.
Only array entries.

Engine reads CfgVehicles >> class >> dustEffects
but we will add
class dustEffects : CfgDustEffectsCar {}
so that it reads from the root class and you only add your surfaces to the root class
Dev-branch next week.

dedmen added a comment.Jun 7 2020, 2:42 PM

CfgDustEffectsAir, CfgDustEffectsMan, CfgDustEffectsCar, CfgDustEffectsTank, CfgDustEffectsTankSmall

el76 added a subscriber: el76.Jul 27 2020, 7:12 PM
dedmen closed this task as Resolved.May 19 2021, 2:16 PM