labels.ini

Discuss the future of Warzone 2100 with us.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

labels.ini

Post by aubergine »

Do the section names in labels.ini have any significance?

An example of some labels from cam1a's labels.ini:

Code: Select all

[position_0]
pos = 5184, 2112
label = "artifact1pos"

[position_1]
pos = 2496, 4032
label = "artifact2pos"

[position_2]
pos = 1856, 1600
label = "artifact3pos"
I wasn't sure if there was some significance to calling all position labels [position_X] where X is an incrementing number.

Also, does the numbering need to be contiguous?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: labels.ini

Post by Per »

The numbering does not need to be contiguous, just unique. The word in front, of course, denotes what kind of label it is. So, yes, the section name matters.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: labels.ini

Post by aubergine »

Thanks for info.

In future version would there be a willingness to alter labels.ini so it's more like this?

Code: Select all

[artifact2pos]
pos = 2496, 4032
type = POSITION
Just seems more semantic to use label name, which is unique, as section title and then specify the type along with other data.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: labels.ini

Post by vexed »

The stuff in the brackets is what the C++ code looks to find.
If you name it anything, then you need a way to tell the code what it should be scanning for.
Same with the stuff below the brackets, you can't name it anything you want, for the same reason.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.