# I am trying to do a stardew valley grid like.

**URL:** <https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [February 27, 2025, 3:47pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937 "2025-02-27T15:47:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 27, 2025, 3:57pm UTC](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937/2 "2025-02-27T15:57:45Z")

</div>

> [@SemagSSB](#):
>
> I even tried using Instanced Static Meshes (ISM), but then the blocks don’t have individual data table variables

ISM instances have an index, and that’s all you need. The data is kept in an `int (index) | struct` [Map](https://dev.epicgames.com/documentation/en-us/unreal-engine/working-with-maps?application_version=4.27) and retrieved as needed. It would not reside in the tile itself.

In short:

- have a single actor with many ISM components, acting as a manager
- tiles can be moved between ISMs if needed
- have a struct representing the tile’s data
- the manager actor holds onto tMaps keeping track of tiles’ state

It takes a while to get one’s head around it but it is quite performant. There are obviously quirks and gotchyas you’ll discover along the way. You will need to understand how instance indexing works, too.

Once you feel comfortable with ISM, you could tackle HISM which _can_ provide further performance boosts under right circumstances.

* * *

At this point, you may also want to start looking into:

> **[Storing Custom Data in Unreal Engine Materials Per-Primitive | Unreal Engine...](https://dev.epicgames.com/documentation/en-us/unreal-engine/storing-custom-data-in-unreal-engine-materials-per-primitive)**
>
> An overview of the Unreal Engine Custom Primitive Data workflow for storing custom data per primitive that's accessible through Blueprint.

Here’s a very crude example:

> [@How to add a hit count (health points) to individual instances?](https://forums.unrealengine.com/t/how-to-add-a-hit-count-health-points-to-individual-instances/227176/2):
>
> The name of the game is Custom Primitive Data (check docs at the bottom). The material for a brick: each instance stores a float which is used to Lerp between 2 colours (to visualise hits remaining) this can (and probably should) get prettified Making a brick wall: create a bunch of instances and store their data in an int | int Map instead of an integer, you could have a struct and hold all kind of data here; perhaps this brick is worth some coins, or explodes when destroyed and …

---

_[View the full topic](https://forums.unrealengine.com/t/i-am-trying-to-do-a-stardew-valley-grid-like/2362937)._
