Skip to content

feat(trackmania): MapTable module - #8132

Open
SobakaPirat wants to merge 22 commits into
Liquipedia:mainfrom
SobakaPirat:map-links
Open

SobakaPirat wants to merge 22 commits into
Liquipedia:mainfrom
SobakaPirat:map-links

Conversation

@SobakaPirat

@SobakaPirat SobakaPirat commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Сomplete rework of how the maps are shown and how they are stored for Trackmania wiki
The problems this module solves #8120

LPDB

  • All maps are saved to the global tournament_maps variable so they are not overwritten when the module is reinvoked
  • The tournament_maps are stored in the maps field of tournament_<tournament_name> (the wiki variable set by the infobox, the page title is used as fallback)

Tournament information -> Maps

[
  {
    "map": "You shall not pass",
    "author1": {
      "flag": "United Kingdom",
      "page": "Pac",
      "displayName": "Pac"
    },
    "author2": {
      "flag": "Germany",
      "page": "Piranha_(German)",
      "displayName": "Piranha"
    },
    "author3": {
      "flag": "Canada",
      "page": "Carl_Jr.",
      "displayName": "CarlJr"
    },
    "links": {
      "trackmania-io": "https://trackmania.io/#/leaderboard/123"
      "trackmania-exchange": "https://trackmania.exchange/mapshow/321"
    }
  },
]

How did you test this change?

https://liquipedia.net/trackmania/User:SobakaPirat/MapTable

изображение

@SobakaPirat
SobakaPirat requested review from a team as code owners September 24, 2026 17:15
@SobakaPirat
SobakaPirat marked this pull request as draft September 24, 2026 17:47
@SobakaPirat SobakaPirat changed the title feat(Links): add map links for trackmania feat(trackmania): MapTable module Sep 27, 2026
@SobakaPirat
SobakaPirat marked this pull request as ready for review September 27, 2026 04:42
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
@hjpalpha hjpalpha linked an issue Sep 27, 2026 that may be closed by this pull request
@hjpalpha hjpalpha added the g: trackmania Trackmania Games label Sep 27, 2026

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw Module:MapPoolTable is a module that already exists on the git
maybe it could be extended to be usable by trackmania too (instead of creating a new module)

Comment thread lua/wikis/commons/Links/PriorityGroups.lua Outdated
Comment thread lua/wikis/commons/Links.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
@SobakaPirat
SobakaPirat marked this pull request as draft September 29, 2026 00:12
@steve020607

Copy link
Copy Markdown
Collaborator

Why use local function for all of it?

@SobakaPirat

Copy link
Copy Markdown
Contributor Author

fwiw Module:MapPoolTable is a module that already exists on the git maybe it could be extended to be usable by trackmania too (instead of creating a new module)

  Trackmania MapPoolTable
Links external internal
Mappers multiple 1
LPDB yes no
Images external internal

Plus, MapPoolTable looks bad without map images, because of the horizontal scrolling

@SobakaPirat

Copy link
Copy Markdown
Contributor Author

@steve020607

Why use local function for all of it?

I dropped the class related stuff as Hjpa recommended, also it was necessary for splitting the module
#8132 (comment)
#8132 (comment)

@SobakaPirat
SobakaPirat marked this pull request as ready for review September 30, 2026 01:25
@steve020607

Copy link
Copy Markdown
Collaborator

Probably for that it should follow under Features/

Comment thread lua/spec/maptable_parse_spec.lua
'',
map = 'https://trackmania.exchange/mapshow/'
},
['tmio'] = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just an fyi: means we need bot runs on trackmania with merging this

Comment thread lua/wikis/trackmania/Features/MapTable/Api/Mappers.lua
Comment thread lua/wikis/trackmania/Features/MapTable/Api/Store.lua
Comment thread lua/wikis/trackmania/Features/MapTable/Components/Display.lua
Comment thread lua/wikis/trackmania/Features/MapTable/Lib/Parse.lua
Comment thread lua/wikis/trackmania/Features/MapTable/Controller.lua
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
Comment thread lua/wikis/trackmania/Features/MapTable/Types.lua
Comment thread lua/wikis/trackmania/MapTable.lua Outdated
@hjpalpha

hjpalpha commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

@steve020607

Why use local function for all of it?

I dropped the class related stuff as Hjpa recommended, also it was necessary for splitting the module #8132 (comment) #8132 (comment)

technically could move most into a local table
but imo local functions are fine
as long as it is no global functions we are good :)

@SobakaPirat
SobakaPirat marked this pull request as draft September 30, 2026 07:46
SobakaPirat and others added 4 commits September 30, 2026 10:55
Co-authored-by: hjpalpha <75081997+hjpalpha@users.noreply.github.com>
Co-authored-by: hjpalpha <75081997+hjpalpha@users.noreply.github.com>
Co-authored-by: hjpalpha <75081997+hjpalpha@users.noreply.github.com>
@mbergen

mbergen commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

IIRC the LPDB "maps" field is limited in length, and with this amount of info stored in it you'll run into issues pretty fast.

Comment thread lua/wikis/trackmania/Features/MapTable/Api/Store.lua Outdated
@hjpalpha

Copy link
Copy Markdown
Collaborator

IIRC the LPDB "maps" field is limited in length, and with this amount of info stored in it you'll run into issues pretty fast.

it stores into lpdb_datapoint with most of the data going into extradata

@hjpalpha hjpalpha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems okay (on phone)

Comment thread lua/wikis/trackmania/Features/MapTable/Components/Display.lua
@SobakaPirat
SobakaPirat marked this pull request as ready for review October 2, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

g: trackmania Trackmania Games

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MapTable module for trackmania

4 participants