From 38fbf6726296d6f252c9f92a250325f27c56d3ab Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Wed, 11 Feb 2015 16:08:23 -0800 Subject: [PATCH 1/3] Make skill-change actually work with level It was trying to set the level to the string "Proficient" instead of 5, same for every other skill level. There was no workaround, especially since it expected numbers for the value. --- scripts/modtools/skill-change.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/modtools/skill-change.lua b/scripts/modtools/skill-change.lua index a28b25af9..7cdd4de67 100644 --- a/scripts/modtools/skill-change.lua +++ b/scripts/modtools/skill-change.lua @@ -36,7 +36,7 @@ arguments set the skill that we're talking about -mode (add/set) are we adding experience/levels or setting them? - -granularity (experience/levels) + -granularity (experience/level) direct experience, or experience levels? -unit id id of the target unit @@ -87,9 +87,9 @@ if args.granularity == granularity.experience then end elseif args.granularity == granularity.level then if args.mode == mode.set then - skill.rating = df.skill_rating[args.value] + skill.rating = args.value elseif args.mode == mode.add then - skill.rating = df.skill_rating[args.value + df.skill_rating[skill.rating]] + skill.rating = args.value + skill.rating else error 'bad mode' end From 5da9b804217d434a4155eae7a2364d4accd55f85 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Wed, 11 Feb 2015 16:09:22 -0800 Subject: [PATCH 2/3] Update NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 7660442ab..97bb250dd 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ DFHack Future Internals Fixes + modtools/skill-change now properly works with level granularity. New Plugins New Scripts New Tweaks From 81b37f4f60ca63289c3844c8be52e854aa48d4dd Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Wed, 11 Feb 2015 16:10:50 -0800 Subject: [PATCH 3/3] Update NEWS --- NEWS | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 97bb250dd..7951cc4d0 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,25 @@ DFHack Future Internals + Lua scripts will only be reloaded if necessary + Added support for onLoadMap/onUnloadMap.init scripts + New internal commands: + hide/show: hide and show the console on Windows + sc-script: Allows additional scripts to be run when certain events occur (similar to onLoad*.init scripts) Fixes - modtools/skill-change now properly works with level granularity. + Made PRELOAD_LIB more extensible on Linux + add-spatter/eventful: Fixed crash on world load + Gave add-thought a proper subthought arg. + fix-armory compiles and is available again (albeit with issues) + gui/gm-editor: Added search option (accessible with "s") + hack-wish: Made items stack properly. + modtools/skill-change: made level granularity work properly. + show-unit-syndromes should work + zone: Stopped crash when scrolling cage owner list New Plugins New Scripts + modtools/reaction-product-trigger: triggers callbacks when products are produced (contrast with when reactions complete) New Tweaks + tradereq-pet-gender: Displays pet genders on the trade request screen Removed Misc Improvements