Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: The power of NONE  (Read 1272 times)

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
The power of NONE
« on: October 20, 2019, 05:57:48 am »

So, i was screwing around with color patterns and discovered that

Code: [Select]
[COLOR_PATTERN:PATTERN_NONE]
[PATTERN:STRIPES]
[CP_COLOR:NONE]
Will not crash DF but will actually produce a text such as, and i quote: "His tail fur is striped " in the creature description and

Code: [Select]
[COLOR_PATTERN:PATTERN_NONE]
[PATTERN:NONE]
[CP_COLOR:NONE]
Will produce NO TEXT(yes, literally nothing) in the creature description. The only side effect of this is the errorlog spam and Dwarf Portrait crashing when attempting to draw a creature wth such a pattern.

Also DF is totally fine with a pattern with only a single CP_COLOR such as:
Code: [Select]
[COLOR_PATTERN:STRIPES_WHITE]
[PATTERN:STRIPES]
[CP_COLOR:WHITE]
Which will produce "His tail fur is striped white" for example, in the creature description.

So it seems that DF handles bad tokens pretty gracefully. Just the fact alone that this works in patterns already has quite a few applications but it makes me wonder whether there are other unexpected tokens where something like this works...

Spoiler (click to show/hide)
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: The power of NONE
« Reply #1 on: November 04, 2019, 10:51:41 pm »

Could also define a color whose name is the empty string for this.