CleverRaven / CleverRaven/Cataclysm-DDA

mapgen set/point entry doesn't work with merged maps.

Open
#35,409 0 comments 0 reactions 0 assignees View on GitHub
Map / Mapgen
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
200

Description

# Describe the bug

When trying to use
```
"set": [
{ "point": "trap", "id": "tr_rollmat", "x": [ 11, 15 ], "y": 9, "repeat": [ 2, 4 ] },
{ "point": "trap", "id": "tr_rollmat", "x": [ 56, 61 ], "y": 18, "repeat": [ 2, 4 ] },
{ "point": "trap", "id": "tr_rollmat", "x": [ 56, 61 ], "y": 19, "repeat": [ 2, 4 ] }
]
```
on a merged map (3x1), I discovered that set/point can't read past x: 23. In the above example, the 2nd two entries don't spawn any rollmats. The first entry will spawn a set of mats in each OMT (see screenshot)

# Steps To Reproduce
Try adding a set/point in a merged map that exists past the first OMT.

# Expected behavior

I'd like this to work like loot spawns for defining the x,y coordinates.

# Screenshots

No mats from the latter 2 entries in the exercise room. 3 instances of mats from the first entry in the hallway:
![image](https://user-images.githubusercontent.com/39442864/68512395-4792f100-0246-11ea-8c49-4e7abea71975.png)

# Versions and configuration

- OS: Windows
- OS Version: 10.0 1903
- Game Version: 0.D-9180-gfcbe9b8 [64-bit]
- Graphics Version: Tiles
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]

# Additional context

I can supply a save upon request but it has un-merged files in it that this example depends on.

Contributor guide

Open the contributing guide

Research direction

Start by locating the mapgen handling for the "set" entries with "point" coordinates and trace how coordinates are interpreted across merged maps. Compare that behavior with loot spawn coordinate handling, then reproduce the 3x1 merged-map case; done means entries beyond the first OMT spawn at their specified coordinates.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.