Difference between revisions of "Talk:Statstrings"

From UFOpaedia
Jump to navigation Jump to search
(Response)
Line 4: Line 4:
  
 
: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.  [[User:Arrow Quivershaft|Arrow Quivershaft]] 13:16, 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.  [[User:Arrow Quivershaft|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.--[[User:Schnobs|Schnobs]]

Revision as of 22:10, 23 October 2007

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