Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Getting an adapted script to display properly? (40.24)  (Read 584 times)

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Getting an adapted script to display properly? (40.24)
« on: November 02, 2015, 03:54:14 pm »

The original, as supplied with r3:

Spoiler (click to show/hide)

I removed the # before " #df.print_color(COLOR_GREEN, "#{t.value}\n") ".

It displays the numbers, if non-zero, but no names. The script has some provision for displaying 'Unit X has a cave adaptation of Y' instead of 'Y', but it doesn't do anything. I don't know why.

The adapted version:

Spoiler (click to show/hide)

It seems to work, but the first dwarf's name isn't displayed and the last part of the last dwarf's name appears where you'd be typing the next DFHack command.

I don't know Ruby and I edited the script by copying and slightly altering what was there, so please word suggestions accordingly.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Getting an adapted script to display properly? (40.24)
« Reply #1 on: November 11, 2015, 01:41:57 pm »

Okay, it's displaying more correctly than I thought. The first dwarf's name is on the second line, and the first dwarf's cave adaptation count is on the first line. The last dwarf's name spills over into the typing area for the next command, and that last dwarf's cave adaptation count is on what should be the last line of the script.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.