Talk:Statstrings

From UFOpaedia
Revision as of 22:42, 1 August 2008 by Mannon (talk | contribs)
Jump to navigation Jump to search

Edit for clarity

The "default configuration" example was literally the default configuration, copied verbatim from the xcomutil.conf file as it comes in the archive. Are you sure that this is valid syntax? Even if the pluses work just as well, I don't think we should present a "default conf" that has already been tampered with... --Schnobs 12:13, 22 October 2007 (PDT)

I didn't realize that was taken verbatim right out of the code file. If you're looking to have machine-readable examples, or examples right out of the file, feel free to revert it; my apologies. Arrow Quivershaft 13:16, 22 October 2007 (PDT)

I tried to come up with an explanation of the syntax, but... Maybe someone whose english is better than mine should try his hand at this.

An entry consists of two parts:

  • first, the statstring that will be added to a soldiers' name. It can be anything you like, but should better be short.
  • second, the condition to trigger that string (like k:30-59), which itself is made up of two parts: a one-letter handle for the stat (like r for reactions or b for bravery), and the experience range.

Note that these are ranges: lower boundary, dash, upper boundary. Either one can be omitted if the range should be open-end. So 30-50 means "from thirty to fifty", -25 means "anything below 26" (and is equal to 0-25) and 60- means "sixty or higher" (equal to 60-255). 42, unsurprisingly, would mean "a value of exactly 42".

I'm not quite sure how some strings override others.--Schnobs

I can help with that, it's actually very simple. Single character strings accumulate. But any string with more than one character will end the search right there and no further strings will be added to the name. The strings are parsed in the order they are written in XcomUtil.cfg--Mannon 15:42, 1 August 2008 (PDT)