Page 1 of 1

Script hack to enable coordinates display

Posted: Sat May 07, 2016 8:41 pm
by Robotron
Quite a while ago a workaround was posted that enabled showing the coordinates of any hex under the date display. While knowing the coordinates is nice to have for the player and absolute vital if you want to mod the game for various reasons, the workaround prevented selecting units. Here is a way to enable coordinates while keeping anything selectable:

open the script "main.hud.lua" found in data/scripts/ui

and insert this line

Code: Select all

 hud:GetText("turn_text"):SetText(hex.x .. "," .. hex.y.. " " .. game.turn)
into lines 523 and 620 of an unmodified V1.66 installation.

The x,y coordinates and current turn will then be displayed in the date display. :)

Re: Script hack to enable coordinates display

Posted: Sat Aug 25, 2018 3:08 pm
by Tulius Hostilius
Outstanding! Works perfectly! Thanks!