OpenTTD / OpenTTD/nml

Request: Add variable for xy coordinates of industries

Open
#218 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
59
Forks
46
Avg merge
11d 15h
Merged PRs (30d)
3

Description

Industries and industrytiles currently have no way of knowing their location on the map, unlike houses which have x_coordinate and y_coordinate variables. I would like to request similar variables for industries.

My desired use case is generating Import/Export industries only near the edge of the map. Another case would be separating the map into quadrant "regions" with different primary resources (coal, iron, etc) available in each.

On Discord, @andythenorth informs me that "80+ var 00" contains the xy coordinates of the industry's northernmost tile, per this page.

I am not knowledgeable enough to know how to use this, and the depreciated syntax page of the docs suggested opening a feature request to formally implement this in NML.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified. Start by comparing the existing house x_coordinate and y_coordinate variables with industry and industrytile handling, then consult the linked industry-array coordinate reference and deprecated-syntax documentation. Done means NML exposes equivalent industry coordinates for the requested map-region and edge-of-map use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.