Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: (Minor) Improved Capitalization on Custom Stone/Ore Names  (Read 699 times)

Exponent

  • Bay Watcher
    • View Profile
(Minor) Improved Capitalization on Custom Stone/Ore Names
« on: July 23, 2008, 05:45:00 pm »

I was experimenting with modding the stones and ores in the game, and was making different types of iron ore that would produce a varying amount of bars depending on the quality of the ore.  I decided I would use the -, +, *, ≡, and ☼ symbols around the phrase "iron ore" to indicate the quality.  I generated a world, and checked out the results, and I got something like the following when using (k) to examine the stone:  "Rough +iron Ore+".  The word "iron" isn't capitalized, but the word "Ore" is.  Further experimentation confirmed that the substring "+iron" is considered a word, and "+" is not a character that can be capitalized.  The "i" in "iron" isn't at the beginning of the word, so it never even gets considered.  Other symbols seem behave the same way, including parentheses.

So my minor suggestion is to improve the code that parses phrases into words in order to find the first letter of each and capitalize it.  Make it treat symbols more like whitespace, so that "rough +iron ore+" gets turned into "Rough +Iron Ore+" instead of "Rough +iron Ore+".  This probably isn't limited to just stone/ore names; a lot of other things are likely affected as well.  But hopefully the code is all in one single consolidated location.
Logged