v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Vjek

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
==UPDATE NOTE==
 
NOTE:  This page is no longer updated.  These scripts are maintained with the normal DFHack distribution now, on github.  Everything below this line is officially out of date as of June 1, 2016.
 
 
 
==The Scripts==
 
==The Scripts==
 
Scripts for Dwarf Fortress 34.10 with DFHack 34.10:<br>
 
Scripts for Dwarf Fortress 34.10 with DFHack 34.10:<br>
 
First, the links to the actual scripts...
 
First, the links to the actual scripts...
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/brainwash.lua brainwash]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/brainwash.lua brainwash]
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/elevate_mental.lua elevate_mental]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/elevate_physical.lua elevate_physical]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/make_legendary.lua make_legendary]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/rejuvenate.lua rejuvenate]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.10/armoks_blessing.lua armoks_blessing]
 
 
 
And now, scripts for Dwarf Fortress 34.11 with DFHack 34.11:<br>
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/brainwash.lua brainwash]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/elevate_mental.lua elevate_mental]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/elevate_physical.lua elevate_physical]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/make_legendary.lua make_legendary]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/rejuvenate.lua rejuvenate]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/armoks_blessing.lua armoks_blessing]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11/pref_adjust.lua pref_adjust]
 
 
 
And more, scripts for Dwarf Fortress 34.11 with DFHack 34.11r2 or DFHack 34.11r3:<br>
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/brainwash.lua brainwash]
 
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/elevate_mental.lua elevate_mental]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/elevate_mental.lua elevate_mental]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/elevate_physical.lua elevate_physical]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/elevate_physical.lua elevate_physical]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/make_legendary.lua make_legendary]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/make_legendary.lua make_legendary]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/rejuvenate.lua rejuvenate]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/rejuvenate.lua rejuvenate]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/armoks_blessing.lua armoks_blessing]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.10/armoks_blessing.lua armoks_blessing]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/34.11r2/pref_adjust.lua pref_adjust]
+
And now. scripts for Dwarf Fortress 34.11 with DFHack 34.11:<br>
  
Here's the same scripts re-done for DF 40.12 & DFHack 40.12
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/brainwash.lua brainwash]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/brainwash.lua brainwash]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/elevate_mental.lua elevate_mental]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/elevate_mental.lua elevate_mental]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/elevate_physical.lua elevate_physical]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/elevate_physical.lua elevate_physical]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/make_legendary.lua make_legendary]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/make_legendary.lua make_legendary]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/rejuvenate.lua rejuvenate]
  
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/rejuvenate.lua rejuvenate]
+
[http://dl.dropbox.com/u/1339319/df_scripts/34.11/armoks_blessing.lua armoks_blessing]
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/armoks_blessing.lua armoks_blessing]
 
 
 
[https://dl.dropboxusercontent.com/u/1339319/df_scripts/40.08/pref_adjust.lua pref_adjust]
 
  
  
 
So, how do these work?  These .lua files linked above are scripts written in the [http://en.wikipedia.org/wiki/Lua_%28programming_language%29 Lua] programming language.  DFHack, as of at least 34.10, includes an interpreter that will parse and execute code written in [http://en.wikipedia.org/wiki/Lua_%28programming_language%29 Lua].
 
So, how do these work?  These .lua files linked above are scripts written in the [http://en.wikipedia.org/wiki/Lua_%28programming_language%29 Lua] programming language.  DFHack, as of at least 34.10, includes an interpreter that will parse and execute code written in [http://en.wikipedia.org/wiki/Lua_%28programming_language%29 Lua].
 
<br>
 
<br>
With each new release of DFHack, there are updated variables, functions and other changes to deal with.  As such, there will be a delay between new releases and when some of these scripts will work.<br>  
+
With each new release of DFHack, there are updated variables, functions and other changes to interface.  As such, there will be a delay between new releases and when some of these scripts will work.  However, feel free to modify any and all of the scripts as much as you wish.  Let the code be free!  Fly code, fly!
However, feel free to modify any and all of the scripts as much as you wish.  Let the code be free!  Fly code, fly!
 
 
<br><br>
 
<br><br>
 
Now what does each script do?  A good starting point!
 
Now what does each script do?  A good starting point!
 
 
==Information about each script==
 
==Information about each script==
 
===brainwash===
 
===brainwash===
 
The brainwash script modifies the personality traits of a single dwarf to match an ideal personality.  What ideal means will doubtless vary from person to person, but I created my ideal based on the goal that the dwarf would be as stable and reliable as possible.<br>
 
The brainwash script modifies the personality traits of a single dwarf to match an ideal personality.  What ideal means will doubtless vary from person to person, but I created my ideal based on the goal that the dwarf would be as stable and reliable as possible.<br>
 
An interesting result of my ideal personality values is that dwarves without clothing are remarkably resistant to tantrums.  In fact, I had an entirely naked fort for many months, and while all the dwarves were at zero happiness, there were no tantrums, no fights, no deaths.  So, brainwashing works on dwarves!<br>
 
An interesting result of my ideal personality values is that dwarves without clothing are remarkably resistant to tantrums.  In fact, I had an entirely naked fort for many months, and while all the dwarves were at zero happiness, there were no tantrums, no fights, no deaths.  So, brainwashing works on dwarves!<br>
Modifying the script is straightforward, just adjust the values you wish by each personality trait.  Subsequent adjustments will overwrite any previous adjustments, and you can adjust a dwarf as many times or as often as you wish, as far as I can tell.<br>
+
Modifying the script is straightforward, just adjust the values you wish by each personality trait.  Subsequent adjustments will overwrite any previous adjustments, and you can adjust a dwarf as many times or as often as you wish, as far as I call tell.<br>
 
You could also make a very "unstable" and "unreliable" dwarf by modifying the values in the script, which has all sorts of entertainment potential.
 
You could also make a very "unstable" and "unreliable" dwarf by modifying the values in the script, which has all sorts of entertainment potential.
 
 
===elevate_mental===
 
===elevate_mental===
 
This script will adjust all the mental attributes of a single dwarf from whatever they currently are to the value 2600.  While 2600 is not the maximum, it's very high, and you'll find this is high enough for most common activities.  To adjust this value, pass the new value to the script as an argument.  For example: 'elevate_mental 2700'
 
This script will adjust all the mental attributes of a single dwarf from whatever they currently are to the value 2600.  While 2600 is not the maximum, it's very high, and you'll find this is high enough for most common activities.  To adjust this value, pass the new value to the script as an argument.  For example: 'elevate_mental 2700'
Line 195: Line 155:
 
To reiterate: the previous scripts work on single dwarves, this one works on all the dwarves currently on the map.
 
To reiterate: the previous scripts work on single dwarves, this one works on all the dwarves currently on the map.
 
You should be REALLY REALLY sure you want to affect ALL YOUR DWARVES before you even copy this script into your /hack/scripts/ directory, and you should definitely have a backup/save ready in case you make changes you weren't expecting.
 
You should be REALLY REALLY sure you want to affect ALL YOUR DWARVES before you even copy this script into your /hack/scripts/ directory, and you should definitely have a backup/save ready in case you make changes you weren't expecting.
===pref_adjust for DFHack34.11 (not r2, not r3)===
 
This script is slightly experimental.  It works fine, no crashes or anything overtly bad that I can see, but there may be long term consequences I'm not aware of regarding changing what Dwarves like.
 
 
This script works in two phases.  The first is:
 
 
<pre>
 
[DFHack]# pref_adjust clear
 
Clearing Preferences for Nil Gusilór
 
Clearing Preferences for Aban ïngizdîbesh
 
Clearing Preferences for Athel Umarthîkut
 
Clearing Preferences for Feb Idashzefon
 
Clearing Preferences for Tosid Losislolor
 
Clearing Preferences for Asën Uzolvúsh
 
Clearing Preferences for Zefon Kerlîgsazir
 
</pre>
 
Then, the second part of the process:
 
<pre>
 
[DFHack]# pref_adjust
 
No option supplied. Adjustment commencing.
 
Adjusting Nil Gusilór
 
Before, unit Nil Gusilór has 11 preferences
 
After, unit Nil Gusilór has 18 preferences
 
Adjusting Aban ïngizdîbesh
 
Before, unit Aban ïngizdîbesh has 10 preferences
 
After, unit Aban ïngizdîbesh has 18 preferences
 
Adjusting Athel Umarthîkut
 
Before, unit Athel Umarthîkut has 7 preferences
 
After, unit Athel Umarthîkut has 18 preferences
 
Adjusting Feb Idashzefon
 
Before, unit Feb Idashzefon has 9 preferences
 
After, unit Feb Idashzefon has 18 preferences
 
Adjusting Tosid Losislolor
 
Before, unit Tosid Losislolor has 10 preferences
 
After, unit Tosid Losislolor has 18 preferences
 
Adjusting Asën Uzolvúsh
 
Before, unit Asën Uzolvúsh has 9 preferences
 
After, unit Asën Uzolvúsh has 18 preferences
 
Adjusting Zefon Kerlîgsazir
 
Before, unit Zefon Kerlîgsazir has 16 preferences
 
After, unit Zefon Kerlîgsazir has 18 preferences
 
[DFHack]#
 
</pre>
 
The first command clears all preferences.  The second command in the process sets preferences thusly (for ALL dwarves!):
 
<blockquote>
 
'''Feb Idashzefon likes wild strawberries for their vivid red color, fisher berries for their round shape, prickle berries for their precise thorns, plump helmets for their rounded tops, prepared meals, plants, drinks, doors, thrones, tables and beds.  When possible, she prefers to consume wild strawberries, fisher berries, prickle berries, plump helmets, strawberry wine, fisher berry wine, prickle berry wine, and dwarven wine.'''
 
</blockquote>
 
If you don't clear the preferences first, the outcome will be highly variable/unpredictable.  I don't recommend it.  Clear first, then set.
 
 
Currently, there is no single dwarf version of this script, but it would be very easy to do by cutting and pasting out of the code.  The 'show' argument provides some debug detail to see each preference for each dwarf before or after adjustment.
 
As with all of these scripts, be very sure you want to do this before you start.  I don't store the old values, so once you clear the preferences, they're gone.
 
 
It is possible to set preferences to anything in the game, but these are what I want my dwarves to like.  You may want your dwarves to like different things.  If this is the case, post on the discussion page and I'll see what I can do about adding different profiles of preferences.
 
 
===pref_adjust for DFHack 34.11r2/r3===
 
This is a simplified and better version of the previous script.  Everything in one step (no need to clear first), adjustment is as follows:
 
<blockquote>
 
'''Feb Idashzefon likes weapons, armor, shields/bucklers, plump helmets for their rounded tops, iron and steel.  When possible, she prefers to consume dwarven wine.  She absolutely detests trolls, buzzards, vultures, and crundles.'''
 
</blockquote>
 
Sample use output:
 
<pre>
 
[DFHack]# pref_adjust
 
Clearing Preferences for Sodel ïtebulåb
 
Clearing Preferences for Sibrek Idnônub
 
Clearing Preferences for Atír Kanbesmar
 
Clearing Preferences for Tobul Shorastorstist
 
Clearing Preferences for Ustuth Kûbukzokun
 
Clearing Preferences for Etur Bomrekkifed
 
Clearing Preferences for Doren Duthnurudib
 
Adjusting Sodel ïtebulåb
 
Before, unit Sodel ïtebulåb has 0 preferences
 
After, unit Sodel ïtebulåb has 11 preferences
 
Adjusting Sibrek Idnônub
 
Before, unit Sibrek Idnônub has 0 preferences
 
After, unit Sibrek Idnônub has 11 preferences
 
Adjusting Atír Kanbesmar
 
Before, unit Atír Kanbesmar has 0 preferences
 
After, unit Atír Kanbesmar has 11 preferences
 
Adjusting Tobul Shorastorstist
 
Before, unit Tobul Shorastorstist has 0 preferences
 
After, unit Tobul Shorastorstist has 11 preferences
 
Adjusting Ustuth Kûbukzokun
 
Before, unit Ustuth Kûbukzokun has 0 preferences
 
After, unit Ustuth Kûbukzokun has 11 preferences
 
Adjusting Etur Bomrekkifed
 
Before, unit Etur Bomrekkifed has 0 preferences
 
After, unit Etur Bomrekkifed has 11 preferences
 
Adjusting Doren Duthnurudib
 
Before, unit Doren Duthnurudib has 0 preferences
 
After, unit Doren Duthnurudib has 11 preferences
 
</pre>
 
The current syntax within the script should make it far easier to add/customize what you want your dwarves to like or dislike.
 
 
===Comments for DF & DFHack 0.40.x===
 
Changes for 40.08..
 
 
armoks_blessing, make_legendary, pref_adjust and rejuvenate work the same as previous versions.
 
 
elevate_mental & elevate_physical, instead of setting values to an arbitrary number, instead change each attribute to their current maximum value.  However, if you provide a number (like 2600) as an argument, the script will set all attributes to that arbitrary value, as it did previously.
 
 
brainwash has undergone the most change, and requires an argument now to function.  There are considerably more personality traits in 40.x versus 34.x, so I've created four profiles for use, and creating other profiles is relatively simple.  If you run the script without an argument, it will give you descriptions of these profiles.
 
In practice, 'brainwash ideal' will replicate the past behavior of the script as closely as possible.
 
 
As always, there will likely be some tweaks, but unless there are some serious changes, these should work with all 40.x versions going forward.
 
 
===Comments for DF & DFHack 0.42.x===
 
As soon as things stabilize with DF & DFHack for the new version, I'm going to try and push all of my new content into github, rather than maintaining the scripts here.  If that proves too onerous, I'll just keep it here, but I'm optimistic github will work, and that way, the scripts can get pulled into the main DFHack scripts repository.  This does place an obligation on my part to keep things up to date, which will be new.  The format of this page isn't ideal (it should be newest first), so I'll probably switch that around too, then.
 
 
As far as script features, I'm going to try and make global and single target versions of each script for 0.42.x, in 2016, and standardize some of the shared bits of code, where it makes sense.
 
  
 
==How do I install and use the scripts?==
 
==How do I install and use the scripts?==
Line 317: Line 169:
 
For those using the scripts (or DFHack) for the first time, I highly recommend you save (or save & copy/backup) your game before you use the scripts.  It is easy to make changes you may not have intended to make, and having a backup in this case is a good idea.<br>
 
For those using the scripts (or DFHack) for the first time, I highly recommend you save (or save & copy/backup) your game before you use the scripts.  It is easy to make changes you may not have intended to make, and having a backup in this case is a good idea.<br>
  
Most of the scripts require a dwarf to be a target within the main DF interface.  This means you pause the game, press ' v ', and move the cursor so it is on top of the dwarf you want.  If there are multiple dwarves on a single tile, whichever one is selected in the list is the target of the script.  Once the target is selected, alt-tab to the DFHack command line interface, type in the name of the script (with any optional arguments) and press enter.  If all goes well, your dwarf will be modified, you can unpause the game and continue.
+
Most of the scripts require a dwarf to be a target within the main DF interface.  This means you pause the game, press 'k', and move the cursor so it is on top of the dwarf you want.  If there are multiple dwarves on a single tile, whichever one is selected in the list is the target of the script.  Once the target is selected, alt-tab to the DFHack command line interface, type in the name of the script (with any optional arguments) and press enter.  If all goes well, your dwarf will be modified, you can unpause the game and continue.
  
 
===Bugs?===
 
===Bugs?===
I've never seen these scripts crash DF, but if they do, please PM me on the forums, or e-mail via the wiki.  Note, for the moment, these scripts are meant for use with DF & DFHack 34.10, 34.11 & up to 40.12 '''''ONLY'''''
+
I've never seen these scripts crash DF, but if they do, please PM me on the forums, or e-mail via the wiki.  Note, for the moment, these scripts are meant for use with DF & DFHack 34.10 & 34.11 '''''ONLY'''''

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)