• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Reforger Modding
  • /ARMD-80
Back
1

[Feature Request] BaseGridMap + FindComponent in one class

1

State

User feedback
Issue key
ARMD-80
Access
Public
Space
Arma Reforger
Project
Reforger Modding
Creator
vlad333000
Created
Sep 29, 2026
Views
29
Platform
PC Steam
Game Version

1.8

Modlist

empty

Description

Problem

BaseGridMap is allowed to "optimize" spatial/area searches by limiting entities to check and dividing them into cells. However, with the ECS architecture, systems frequently need to work with a specific component rather than the entity itself. Currently, BaseGridMap queries return entities only. As a result, every query that needs a component has to call FindComponent() for each returned entity or do something else to map entities to components. A typical workflow becomes:

  1. Query BaseGridMap for entities;

  2. Call FindComponent() on each entity;

  3. Only now do actual work.

This partially defeats the purpose of using an optimized spatial lookup when the actual object required by the system is a component.

Proposal

Add component-aware lookup support to BaseGridMap, allowing a spatial query to directly retrieve or iterate over components associated with registered entities.

For example:

class BaseGridMap {
  int FindComponentsInRange(out notnull array<ScriptComponent> components, typename componentTypename, vector origin, float range, int mask = 0);
};

So, now you can do:

class MySystem : GameSystem {
  protected ref SomeBaseGridMap m_gridMap;

  void Register(notnull MyComponent comp) {
    m_gridMap.Insert(comp.GetOwner());
  };

  void Work() {
    array<MyComponent> comps = {};
    m_gridMap.FindComponentsInRange(comps, MyComponent, pos, r);
    foreach (MyComponent comp : comps) {
      Do(comp);
    };
  };
};
Reactions

Activity

    16 days ago
  • vlad333000
    created issue16 days ago
  • 15 days ago
  • l909
    changed state to
    ASSIGNED
    15 days ago
  • l909
    changed state to
    USER FEEDBACK
    15 days ago

You are not signed in. Please sign in to see more details and to reply.

State

User feedback
Issue key
ARMD-80
Access
Public
Space
Arma Reforger
Project
Reforger Modding
Creator
vlad333000
Created
Sep 29, 2026
Views
29