Character Sheets - Unit Conversion

   7

Character Sheets - Unit Conversion

Please read this post and then this one below, then return to this one!

Hey all,

We've just rolled out an update to the Character Sheet system, adding automatic unit conversion between metric and imperial for character height and weight.

This change required some internal database changes because we used to allow arbitrary text in those two fields, which has now been changed to only allow numeric values in order to ensure the automatic conversion always works. Due to the fact that we didn't want to manually go through all 6069 Character Sheets in the database, the conversion from text to numbers has mostly been done automatic, using some simple heuristics to determine what bits of the field to parse:

  1. If a unit of measure was supplied, the code assumes the field to be in that unit, taking the value as-is for metric, and converting it to metric if the unit was imperial (The database internally stores its values as metric)
  2. If two numbers were supplied, the metric one was chosen
  3. If no unit and only a number was filled in, it was assumed to be metric (as that's what the CS creator has always asked for)
  4. If no sane value was provided ("Anything goes", "Nobody knows", "Unknown", "Varies", "Don't ask a lady for her weight", etc.) the value was set to zero.
  5. Some stuff left over was updated manually (for example, some members supplied weight with/without armor, in which case the value without armor was chosen)

While this process should work perfectly for most cases, we can imagine there are cases where an incorrect value was chosen (for example when somebody filled in '6' as weight, which is a sane value in feet, but not so much in meters for most species), or the value was parsed wrong. In this case, please send an e-mail to me, Wally and Atra, no later than March 24, containing the affected Sheet IDs and correct values, and we'll make sure to get it fixed. Alternatively, you can just update your sheet and submit it, but that will not update archived sheets that may be attached to ACC fights.

--James

Two posts from James in the same day?! What wonderful magic is this!

Neat, it works. My sheet now shows both...good to see my metric was actually right once converted to imperial.

Let us all embrace the Republic units of SI measurement! Reject the Imperial lies and system! Long live the Rebellion!

Great work, James. Thank you. :)

nice ... this will make things easier

Hooray for the metric system!

Tali, I believe metric would be Republic. It is called Standard Imperial measurement after all.

You need to be logged in to post comments