Merged
Conversation
Adding a new script, add-recipe. This script adds crafting recipes to the player's civilization. It is useful when eg. the civ doesn't know how to craft high boots.
cppcooper
added a commit
to cppcooper/dfhack-scripts
that referenced
this pull request
Jun 27, 2018
Squashed commit of the following: commit aed35fd Author: lethosor <[email protected]> Date: Mon Jun 25 15:31:40 2018 -0400 Add 0.44.11 to devel/save-version commit 56a209a Author: lethosor <[email protected]> Date: Thu Jun 21 10:59:11 2018 -0400 unit_flags1.dead -> inactive Follow-up for DFHack/df-structures#247 commit 72e150e Author: lethosor <[email protected]> Date: Thu Jun 21 00:45:13 2018 -0400 Adjust indentation/whitespace from DFHack#62 commit b101452 Merge: e580b16 506efce Author: lethosor <[email protected]> Date: Thu Jun 21 00:41:44 2018 -0400 Merge remote-tracking branch 'PatrikLundell/dead_misuse' commit e580b16 Merge: ee82d10 4de3d7e Author: Lethosor <[email protected]> Date: Mon Jun 18 21:46:53 2018 -0400 Merge pull request DFHack#58 from AtomicChicken/bodyswap bodyswap: minor adjustments commit ee82d10 Merge: 54a0e03 123be9a Author: Lethosor <[email protected]> Date: Mon Jun 18 21:46:12 2018 -0400 Merge pull request DFHack#57 from grubsteak/patch-1 stamper.lua - gui designation manipulator commit 54a0e03 Merge: 20bee6f 7b90330 Author: Lethosor <[email protected]> Date: Mon Jun 18 21:45:37 2018 -0400 Merge pull request DFHack#61 from PatrikLundell/deathcause Deathcause commit 20bee6f Merge: f722aee 469817b Author: Lethosor <[email protected]> Date: Mon Jun 18 21:44:59 2018 -0400 Merge pull request DFHack#63 from brndd/add-recipe add-recipe commit f722aee Merge: 7099794 028cead Author: Lethosor <[email protected]> Date: Mon Jun 18 17:51:03 2018 -0400 Merge pull request DFHack#59 from AtomicChicken/create-unit create-unit: added 'quantity' argument and random caste selection commit 028cead Merge: 89ddb81 7099794 Author: Ben Lubar <[email protected]> Date: Mon Jun 18 15:50:48 2018 -0500 Merge branch 'master' into create-unit commit 7099794 Merge: b065ce4 d0f8384 Author: Lethosor <[email protected]> Date: Mon Jun 18 16:07:55 2018 -0400 Merge pull request DFHack#64 from brndd/item-descriptions item-descriptions editor's pass commit 506efce Merge: 17a06a9 b9ffb9c Author: PatrikLundell <[email protected]> Date: Mon Jun 18 20:03:32 2018 +0200 Merge branch 'dead_misuse' of https://github.com/PatrikLundell/scripts into dead_misuse commit 17a06a9 Author: PatrikLundell <[email protected]> Date: Mon Jun 18 20:00:49 2018 +0200 reversed condition fixed commit b9ffb9c Author: Lethosor <[email protected]> Date: Mon Jun 18 13:50:33 2018 -0400 export-dt-ini: consistent case commit 3acd169 Author: Lethosor <[email protected]> Date: Mon Jun 18 13:49:51 2018 -0400 isActive -> dfhack.units.isActive commit 065138e Author: PatrikLundell <[email protected]> Date: Thu Jun 14 21:50:25 2018 +0200 flags -> functions. Hystersis for removal commit daccfaa Author: PatrikLundell <[email protected]> Date: Thu Jun 14 21:19:24 2018 +0200 Fixed a number of checks commit ecfb94a Author: PatrikLundell <[email protected]> Date: Thu Jun 14 19:31:21 2018 +0200 flag check -> function commit 401beac Author: PatrikLundell <[email protected]> Date: Thu Jun 14 19:30:43 2018 +0200 flag check -> function commit 54de259 Author: PatrikLundell <[email protected]> Date: Thu Jun 14 19:30:11 2018 +0200 resolved conflict commit bef0e25 Author: PatrikLundell <[email protected]> Date: Thu Jun 14 19:29:12 2018 +0200 flag check -> function commit b065ce4 Author: lethosor <[email protected]> Date: Tue Jun 12 12:46:31 2018 -0400 autounsuspend: skip planned buildings Fixes DFHack/dfhack#1305 commit 982f04d Author: Ben Lubar <[email protected]> Date: Mon Jun 11 18:32:56 2018 -0500 Fix more luacheck stuff. Fix fixnaked being broken with the thought/emotion changes. commit 0d12bd6 Author: Ben Lubar <[email protected]> Date: Sun Jun 10 10:04:50 2018 -0500 Fix most of the remaining luacheck issues in scripts. Scripts still to do: - gui/*.lua - exportlegends.lua - fixnaked.lua commit d0f8384 Author: brndd <[email protected]> Date: Sun Jun 10 02:50:27 2018 +0300 luacheck fix commit 1d1c4fb Author: Ben Lubar <[email protected]> Date: Sat Jun 9 06:43:58 2018 -0500 More fixes for df-luacheck. Mostly annotations, but there are a few typos fixed as well. commit 36b9fe2 Author: brndd <[email protected]> Date: Thu Jun 7 23:37:51 2018 +0300 luacheck fix commit 870e6f4 Author: brndd <[email protected]> Date: Thu Jun 7 22:40:16 2018 +0300 minor typo fix commit d04327a Author: brndd <[email protected]> Date: Thu Jun 7 22:33:32 2018 +0300 further revisions to item descriptions commit 1e73e57 Author: brndd <[email protected]> Date: Thu Jun 7 21:21:30 2018 +0300 removed superfluous variable commit 0d37a50 Author: brndd <[email protected]> Date: Thu Jun 7 21:17:27 2018 +0300 item-descriptions editor's pass Editor's pass on item-descriptions, fixing some grammar errors and improving some of the descriptions. commit 469817b Author: brndd <[email protected]> Date: Thu Jun 7 21:11:31 2018 +0300 add-recipe Adding a new script, add-recipe. This script adds crafting recipes to the player's civilization. It is useful when eg. the civ doesn't know how to craft high boots. commit 69500d4 Author: Ben Lubar <[email protected]> Date: Thu Jun 7 08:10:00 2018 -0500 More luacheck-related fixes. commit f8910a8 Author: PatrikLundell <[email protected]> Date: Wed Jun 6 15:01:03 2018 +0200 flags1.dead->flags2.killed commit 63d50de Author: PatrikLundell <[email protected]> Date: Wed Jun 6 15:00:22 2018 +0200 flags1.dead->flags2.killed commit 091c062 Author: PatrikLundell <[email protected]> Date: Wed Jun 6 14:59:46 2018 +0200 flags1.dead->flags2.killed commit 4f5ad27 Author: PatrikLundell <[email protected]> Date: Wed Jun 6 14:59:10 2018 +0200 flags1.dead->flags2.killed commit b10a928 Author: PatrikLundell <[email protected]> Date: Wed Jun 6 14:58:35 2018 +0200 Updated comment messages commit 5d0b5b1 Author: PatrikLundell <[email protected]> Date: Wed Jun 6 14:57:34 2018 +0200 flags1.dead->flags2.killed commit 7b90330 Author: PatrikLundell <[email protected]> Date: Tue Jun 5 16:09:05 2018 +0200 Identified slaughter. Stopped item override commit 82e6ffa Author: PatrikLundell <[email protected]> Date: Tue Jun 5 11:20:10 2018 +0200 Factored out two common lines commit 09f9656 Author: PatrikLundell <[email protected]> Date: Tue Jun 5 11:15:29 2018 +0200 Added race to live unit commit 9de95f8 Author: PatrikLundell <[email protected]> Date: Tue Jun 5 11:02:01 2018 +0200 Detecting live units not being dead commit 75a94ee Author: PatrikLundell <[email protected]> Date: Tue Jun 5 10:44:14 2018 +0200 dead/inactive flag -> killed commit 6b78bb5 Author: Ben Lubar <[email protected]> Date: Mon Jun 4 22:09:28 2018 -0500 Fix behavioral changes introduced in previous commit. commit 5a892c3 Author: Ben Lubar <[email protected]> Date: Mon Jun 4 21:23:28 2018 -0500 Fix bugs found while working on luacheck commit 7f18d2c Author: Ben Lubar <[email protected]> Date: Sun May 27 10:40:13 2018 -0500 [ban-cooking] Update for DFHack/df-structures@238b305. Remove undocumented debugging commands. Fixes DFHack/dfhack#1293. commit 89ddb81 Author: AtomicChicken <[email protected]> Date: Thu May 24 10:13:26 2018 +0200 modified getRandomCasteId() to avoid having to locate creature_raw again commit 9fbd247 Author: AtomicChicken <[email protected]> Date: Thu May 24 00:17:40 2018 +0200 create-unit: added 'quantity' and random caste selection - added 'quantity' argument for spawning several units simultaneously - implemented random caste selection for use upon omission of 'caste' argument - changed several instances of 'error' to 'qerror' commit 5bd8f0d Author: lethosor <[email protected]> Date: Tue May 22 10:55:10 2018 -0400 Fix "validArgs = validArgs or ..." antipattern This prevented any edits to scripts from changing the allowed arguments without removing validArgs from the script's environment somehow or restarting DF. This was pointless - script behavior can easily be modified to use new arguments, potentially leading to confusion when those arguments were rejected. commit 7b30d55 Author: lethosor <[email protected]> Date: Tue May 22 09:58:24 2018 -0400 remove-stress: fix -all for soul-less units, indentation, module support commit 27ea437 Author: lethosor <[email protected]> Date: Mon May 21 17:45:47 2018 -0400 fix/retrieve-units: also add units back to active list to counteract fix/dead-units commit 123be9a Author: grubsteak <[email protected]> Date: Sun May 20 12:21:58 2018 -0500 removed obnoxious comment sorry commit 5ef5c7f Author: grubsteak <[email protected]> Date: Sat May 19 21:16:29 2018 -0500 fixed minor indenting error commit bef9b5c Author: grubsteak <[email protected]> Date: Sat May 19 15:00:39 2018 -0500 fix title travis is a bastard commit 2ef4b23 Author: grubsteak <[email protected]> Date: Sat May 19 14:59:25 2018 -0500 move copy.lua to gui/stamper.lua commit a64b5a9 Author: grubsteak <[email protected]> Date: Sat May 19 14:58:28 2018 -0500 renaming to stamper.lua commit b67ea7d Author: grubsteak <[email protected]> Date: Sat May 19 11:37:00 2018 -0500 fixed bug commit 4de3d7e Author: AtomicChicken <[email protected]> Date: Sat May 19 09:47:15 2018 +0200 bodyswap: minor adjustments slightly modified documentation, added error message and relocated a few lines commit 157d224 Author: grubsteak <[email protected]> Date: Sat May 19 00:40:22 2018 -0500 make travis happy commit 07566b1 Author: grubsteak <[email protected]> Date: Sat May 19 00:31:56 2018 -0500 fixed title code now to for that lint.... commit 34f68d0 Author: grubsteak <[email protected]> Date: Sat May 19 00:22:20 2018 -0500 Update copy.lua commit ddea05b Author: grubsteak <[email protected]> Date: Sat May 19 00:14:34 2018 -0500 Create copy.lua commit 0b6e4a5 Author: lethosor <[email protected]> Date: Fri May 18 12:43:37 2018 -0400 bodyswap: Use unix line endings Ref DFHack#55 commit bce5c0b Merge: d747dda 9a92e1d Author: lethosor <[email protected]> Date: Fri May 18 12:41:10 2018 -0400 Merge remote-tracking branches 'AtomicChicken/bodyswap' and 'AtomicChicken/create-unit' commit d747dda Author: AtomicChicken <[email protected]> Date: Thu May 17 20:58:04 2018 +0200 removed whitespace commit 10182a3 Author: AtomicChicken <[email protected]> Date: Thu May 17 20:52:21 2018 +0200 replaced nemesis/histfig creation functions with 'modtools/create-unit' call also removed the double documentation and added module accessibility stuff commit 9a92e1d Author: AtomicChicken <[email protected]> Date: Thu May 17 10:12:33 2018 +0200 minor alterations to allow use of createNemesis() by external scripts commit 984bb31 Merge: 9f2231b fc7a37d Author: AtomicChicken <[email protected]> Date: Thu May 17 09:53:46 2018 +0200 Merge pull request DFHack#1 from DFHack/master update fork commit fc7a37d Author: lethosor <[email protected]> Date: Wed May 16 22:08:23 2018 -0400 view-item-info: stop appending newlines to descriptions more than once Fixes DFHack/dfhack#1273 commit 5e8f859 Author: lethosor <[email protected]> Date: Wed May 16 19:37:32 2018 -0400 Remove explicit keybindings from docs, plus misc docs cleanup Closes DFHack/dfhack#988 commit c7054eb Author: AtomicChicken <[email protected]> Date: Wed May 16 19:32:46 2018 +0200 Added bodyswap.lua A revived version of the long defunct "adv-bodyswap" with added functionality. This script allows the player to swap their control over to any unit present on the map in adventure mode only. Targets are specified either via their unit id or through UI selection prior to running the script. Unlike previous iterations, units lacking nemesis or historical figure data (such as wild animals) are valid and safe targets, as the script creates this data when it is missing. commit ed1b046 Author: lethosor <[email protected]> Date: Sat May 12 16:58:32 2018 -0400 room-list: support getSelectedBuilding() commit 8dfd2ec Author: lethosor <[email protected]> Date: Sat May 12 16:58:23 2018 -0400 room-list: use getRoomDescription() commit f76e417 Merge: 9504fc0 9a44403 Author: lethosor <[email protected]> Date: Fri May 11 18:54:45 2018 -0400 Merge remote-tracking branch 'AtomicChicken/create-unit' commit 9504fc0 Author: lethosor <[email protected]> Date: Fri May 11 18:44:59 2018 -0400 save-version: add current DF version, change 0 to "not saved" commit 07e75ff Merge: 2443cef 0d9d081 Author: lethosor <[email protected]> Date: Fri May 11 15:25:50 2018 -0400 Merge remote-tracking branch 'Bumber64/patch-1' commit 0d9d081 Author: Ryan Williams <[email protected]> Date: Fri May 11 12:13:46 2018 -0700 Update exterminate.rb documentation commit 2443cef Merge: 5de338b 60171e5 Author: Lethosor <[email protected]> Date: Fri May 11 12:06:35 2018 -0400 Merge pull request DFHack#53 from cvuchener/dt-tool-offsets export-dt-ini: add tool offsets commit 5de338b Merge: eddfb8e ef0860a Author: Lethosor <[email protected]> Date: Fri May 11 12:05:16 2018 -0400 Merge pull request DFHack#51 from AtomicChicken/full-heal full-heal: several fixes commit eddfb8e Author: lethosor <[email protected]> Date: Fri May 11 10:34:22 2018 -0400 Add tweak information to install-info commit 3136553 Author: lethosor <[email protected]> Date: Wed May 9 09:52:49 2018 -0400 Add devel/find-primitive commit 60171e5 Author: Clément Vuchener <[email protected]> Date: Wed May 9 10:47:04 2018 +0200 export-dt-ini: add tool offsets commit 9a44403 Author: Lethosor <[email protected]> Date: Mon May 7 13:32:56 2018 -0400 Fix whitespace commit 3113f73 Merge: f81ba57 a1cd002 Author: Lethosor <[email protected]> Date: Mon May 7 13:28:38 2018 -0400 Merge branch 'master' into create-unit commit ef0860a Author: AtomicChicken <[email protected]> Date: Mon May 7 16:41:35 2018 +0200 reset some more stuff in unit.enemy commit f81ba57 Author: AtomicChicken <[email protected]> Date: Mon May 7 15:56:14 2018 +0200 bug fixes and update - creatures of the appropriate age are now spawned as babies or children where applicable - fix: civ_id is now properly assigned to historical_figure, resolving several hostility issues (spawned pets are no longer attacked by fortress military!) - fix: unnamed creatures are no longer spawned with a string of numbers as a first name commit a1cd002 Author: lethosor <[email protected]> Date: Mon May 7 00:13:08 2018 -0400 devel/save-version: add 0.44.10 commit 9b4f443 Author: AtomicChicken <[email protected]> Date: Sun May 6 16:15:01 2018 +0200 fixed typo commit fc5dc12 Author: AtomicChicken <[email protected]> Date: Sun May 6 16:12:40 2018 +0200 cleared health flags to deal with issues that were cropping up with the healthcare system, such as healed units being operated upon commit 9c11f53 Author: AtomicChicken <[email protected]> Date: Sun May 6 15:54:20 2018 +0200 cancel active healthcare jobs so as to prevent the buggy behaviour that is produced by healing a unit whilst it is the target of medical jobs commit b13cd4d Author: AtomicChicken <[email protected]> Date: Sun May 6 13:33:27 2018 +0200 re-added wake from rest On second thought, this can be useful as it prevents units from unnecessarily walking to a hospital (rest job position) after being healed. commit 61a8f17 Author: AtomicChicken <[email protected]> Date: Sat May 5 22:36:37 2018 +0200 removed wake from rest unnecessary as resting units awake in a matter of ticks upon being healed commit f4aff0a Author: AtomicChicken <[email protected]> Date: Sat May 5 22:15:16 2018 +0200 fix melting body parts, clear infection, remove historical wounds commit 1a78d1e Author: lethosor <[email protected]> Date: Sat May 5 15:53:11 2018 -0400 gui/autogems: Add initial comment commit 6295e5a Merge: 164d9bd 65b102e Author: lethosor <[email protected]> Date: Sat May 5 12:53:14 2018 -0400 Merge branch 'gui-autogems' commit 65b102e Author: lethosor <[email protected]> Date: Sat May 5 12:45:22 2018 -0400 gui/autogems: save/load from autogems.json commit a9fb7aa Author: AtomicChicken <[email protected]> Date: Sat May 5 16:02:42 2018 +0200 removed the CleanSelf job assignment because it causes errors and is entirely unnecessary; the system will generate its own CleanSelf jobs if this is required commit 7b208ce Author: AtomicChicken <[email protected]> Date: Sat May 5 15:34:16 2018 +0200 added missing flags commit b53b361 Author: AtomicChicken <[email protected]> Date: Sat May 5 13:19:45 2018 +0200 added missing counters commit 4687275 Author: AtomicChicken <[email protected]> Date: Sat May 5 12:44:17 2018 +0200 reset limbs_fly_count commit 7d4bf81 Author: lethosor <[email protected]> Date: Fri May 4 23:32:30 2018 -0400 gui/autogems: Add documentation commit 4e113b9 Author: lethosor <[email protected]> Date: Sat Jul 1 16:52:16 2017 -0400 Restrict width of gem list commit a6d12c6 Author: lethosor <[email protected]> Date: Tue Jun 27 10:16:05 2017 -0400 Add "on map" filter commit d36edea Author: lethosor <[email protected]> Date: Tue Jun 27 09:55:37 2017 -0400 Add screen title commit 93eec26 Author: lethosor <[email protected]> Date: Mon Jun 26 21:44:50 2017 -0400 Add initial gui/autogems front-end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(had to resubmit the PR because I suck & messed up my branches; the previous PR and related discussion is here)
You know how sometimes you can't craft high boots? This is because civilizations pick the different types of armour they can craft randomly during worldgen, and this is done per slot/type, so sometimes you end up with civilizations that are satisfied with low boots and never go higher. Normally there's no fix to this other than editing entity_default.txt in the raws before worldgen, or just embarking again as a different civ and hoping that they're more cultured.
This script helps with that. It can enable unknown crafting recipes, such as high boots, face veils, or thongs, after embark. It can also enable items that can normally never be crafted by your civilization, like exotic weapons. Currently it's limited to weapons and armour, but it could probably be extended to things like instruments with some extra effort (instruments are procedurally generated, so they work slightly differently).
It should work with most raw mods, though I've only tested it with Sver's combat rework.