Terrain labels (not) showing?

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Terrain labels (not) showing?

Post by kurt751 »

I have a scenario where several places have labels (like "Tower of This", "Mountain of That", for orientation purposes).
When i start this scenario (from the previous), those labels don't show, even if I'm standing on the hex. If I save the game and reload that save, they do appear. :shock:

What's going on? :hmm:
(1.16 on Linux)
User avatar
Ravana
Forum Moderator
Posts: 3577
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Terrain labels (not) showing?

Post by Ravana »

Verify on newer version.
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Re: Terrain labels (not) showing?

Post by kurt751 »

To do so I'd need to port the whole campaign to 1.18 and replay it (several scenarios), which I haven't the time right now.

What I actually asking for is if I'm doing something wrong, or if this is a known issue (1.16 must have been the newest version for a time, didn't anybody notice back then?).
User avatar
Ravana
Forum Moderator
Posts: 3577
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Terrain labels (not) showing?

Post by Ravana »

You really dont need to play anything specific. Basically open any random scenario and run your [label] commands with viewtopic.php?t=56440
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Re: Terrain labels (not) showing?

Post by kurt751 »

Thanks, but I have no knowledge of programming in general or more specifically Lua (besides knowing it exists), and thus I don't understand a single word of your (I'm sure) very interesting test method... :)
Sorry...
User avatar
Ravana
Forum Moderator
Posts: 3577
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Terrain labels (not) showing?

Post by Ravana »

It may be useful if you showed example how you set one of the labels with issue.
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Re: Terrain labels (not) showing?

Post by kurt751 »

Like this:

Code: Select all

[label]
	color="221,221,221,0"
	immutable=yes
	team_name=""
	text=_ "The Signal Tower"
	visible_in_fog=yes
	visible_in_shroud=no
	x=45
	y=15
[/label]
User avatar
Ravana
Forum Moderator
Posts: 3577
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Terrain labels (not) showing?

Post by Ravana »

Use color="221,221,221". Remove or set team_name.
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Re: Terrain labels (not) showing?

Post by kurt751 »

Will do, thanks.
But do you think this is the reason labels only appear after loading a save?
gnombat
Posts: 1103
Joined: June 10th, 2010, 8:49 pm

Re: Terrain labels (not) showing?

Post by gnombat »

kurt751 wrote: July 29th, 2026, 5:42 pm Will do, thanks.
But do you think this is the reason labels only appear after loading a save?
According to the documentation, the format is "r,g,b". So the 4th number is invalid. Because it's invalid, the 4th number probably doesn't get saved to the save file. So it just gets saved as color="221,221,221" in the save file. Then it "works" when you load it from the save file.
kurt751
Posts: 398
Joined: June 4th, 2016, 11:17 pm

Re: Terrain labels (not) showing?

Post by kurt751 »

gnombat wrote: July 29th, 2026, 6:07 pm According to the documentation, the format is "r,g,b". So the 4th number is invalid.
:shock: Actually the label code is more or less straight what the 1.12 map editor wrote so I never questioned it, even those apparently useless empty entries.
As for the 4th number, I assumed it was transparency. As I said, it's straight out of the map editor. :?
Post Reply