About the "not tame" issue? It is really annoying not being able to wartrain spawned animals.
EDIT: Almost forgot why I came here in the first place...
I was looking through the scripts that come with Masterwork when I discovered "announcements" and "announcements2", both examples of... less than stellar codding.
Not to belittle anyone but... Well "inefficient" would be an excellent description.
And so I present "announce.lua" a simple script that takes two arguments, a message and a color.
Example: announce "Something happened!" COLOR_LIGHTRED
If no color is provided it defaults to white, the message is required
local args = {...}
if not args then qerror("Needs an argument.") end
-- Your message.
local text = args[1]
-- COLOR_BLACK
-- COLOR_BLUE
-- COLOR_GREEN
-- COLOR_CYAN
-- COLOR_RED
-- COLOR_MAGENTA
-- COLOR_BROWN
-- COLOR_GREY
-- COLOR_DARKGREY
-- COLOR_LIGHTBLUE
-- COLOR_LIGHTGREEN
-- COLOR_LIGHTCYAN
-- COLOR_LIGHTRED
-- COLOR_LIGHTMAGENTA
-- COLOR_YELLOW
-- COLOR_WHITE
local color_id = args[2]
if not color_id then color_id = "COLOR_WHITE" end
local color
-- Ugly, but it works
if color_id == "COLOR_BLACK" then color = COLOR_BLACK
elseif color_id == "COLOR_BLUE" then color = COLOR_BLUE
elseif color_id == "COLOR_GREEN" then color = COLOR_GREEN
elseif color_id == "COLOR_CYAN" then color = COLOR_CYAN
elseif color_id == "COLOR_RED" then color = COLOR_RED
elseif color_id == "COLOR_MAGENTA" then color = COLOR_MAGENTA
elseif color_id == "COLOR_BROWN" then color = COLOR_BROWN
elseif color_id == "COLOR_GREY" then color = COLOR_GREY
elseif color_id == "COLOR_DARKGREY" then color = COLOR_DARKGREY
elseif color_id == "COLOR_LIGHTBLUE" then color = COLOR_LIGHTBLUE
elseif color_id == "COLOR_LIGHTGREEN" then color = COLOR_LIGHTGREEN
elseif color_id == "COLOR_LIGHTCYAN" then color = COLOR_LIGHTCYAN
elseif color_id == "COLOR_LIGHTRED" then color = COLOR_LIGHTRED
elseif color_id == "COLOR_LIGHTMAGENTA" then color = COLOR_LIGHTMAGENTA
elseif color_id == "COLOR_YELLOW" then color = COLOR_YELLOW
elseif color_id == "COLOR_WHITE" then color = COLOR_WHITE
else qerror("Bad color.")
end
-- only works in fort/adv mode, not in main menu/startup.
if not dfhack.isMapLoaded() then
qerror('Map is not loaded.')
end
dfhack.gui.showAnnouncement(text, color)