Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Accessibility Utility v1.04  (Read 22974 times)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Accessibility Utility v1.04
« on: April 17, 2016, 01:39:03 am »

Accessibility utility
Version 1.04
By Dirst

Download from DFFD
Discussion thread
Backup location

A set of simple commands for the DFHack console to aid in navigating the map, suitable for DF 0.42 and 0.43.  Comments and suggestions are welcome.  The current version includes four DFHack scripts.

Installation is simple.  Unzip Accessibility.zip onto your Dwarf Fortress folder.


access.lua
This script prints instructions for using the Accessibility utility.

access
General instructions are printed if "access" is typed alone.

access help
More detailed documentation is available by typing "access help".


bookmark.lua
This script defines, updates and deletes persistent bookmarks on the map.

bookmark help
Prints a short summary of the bookmark comamands.

bookmark list
Lists all current bookmarks, if any.

bookmark drop foo
Deletes a bookmark named foo.

bookmark clear all
Deletes ALL bookmarks.  Note the space between "clear" and "all" as a safety feature.

bookmark foo
Creates or updates the bookmark named foo at the current cursor location.  If the cursor is not present, the bookmark will be set as the center of the on-screen map.


goto.lua
This script will move the map (and cursor if it is present) to a specific location.  The goto script has two modes: bookmark and coordinates.

goto help
Prints a short summary of the goto commands.

goto foo
Moves the map to the bookmark named foo, if it exists.

goto # # #
Moves the map to the specified X, Y, Z coordinates.


whereami.lua
This script reports your current location as X, Y, Z coordinates and a very terse description of the tile such as "SOIL WALL" or "POOL FLOOR".
whereami will also report if the current location is recorded as a bookmark.

Known issues:
Bookmarks saved with version 1.00 (if you somehow acquired it) have incorrect Z coordinates.
Screen center is incorrect if the Text Will Be Text plugin is active, although the cursor location is accurate.
« Last Edit: July 29, 2016, 10:14:49 pm by Dirst »
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Accessibility mod v1.01
« Reply #1 on: April 17, 2016, 04:13:52 am »

Always wished to have that!

Thanks!!!

Already included it in your modder dir inside HDFPS as a developper addon ("LoadPriority": 3100 and "Dev": true) normal playable addons like The Earth Strikes Back! have instead  ("LoadPriority": 1100 and "Dev": false) and are always visible after generation without clicking over the dev button.
Then when you click over generate raws you have:
Spoiler (click to show/hide)
And clicking over Dev button you have:
Spoiler (click to show/hide)
I am an absolute lua noob here, so I am assuming that if I rename (bookmark.lua, goto.lua and whereami.lua) into (ACCESSIBILITY_bookmark.dfcom.lua, ACCESSIBILITY_goto.dfcom.lua and ACCESSIBILITY_whereami.dfcom.lua) the ACCESSIBILITY_ namespace part will not break the lua lib functionality.
Is it that true?

Argh! the calling namescript changes and is too verbose, reverted to your original defaults...
Spoiler (click to show/hide)
Finally the addon.md
Spoiler (click to show/hide)

« Last Edit: April 17, 2016, 08:17:35 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility mod v1.01
« Reply #2 on: April 17, 2016, 04:51:08 pm »

For those of you wondering what that whirlwind of jargon was, Abadrausar has been compiling an extensive collection of mods for use in the Rubble system.  Rubble is a great tool for mixing and matching mods, but a tad overpowered for this application.  If you use Rubble (and people do download the Rubble version of my other mod), by all means use the Rubble module that Abadrausar made.  If not, use the DFFD download link in the first post.

Ideally, this package will be useful and stable enough to get incorporated into the main DFHack distribution.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Heretic

  • Bay Watcher
    • View Profile
Re: Accessibility mod v1.01
« Reply #3 on: April 18, 2016, 12:34:26 am »

I'm coding mostly on c++ and c# but idea looks great and scripts are mostly simple, so i will try to help if i would have time.
PTW, It's great!!!
Logged

TheBiggerFish

  • Bay Watcher
  • Somewhere around here.
    • View Profile
Re: Accessibility mod v1.01
« Reply #4 on: April 18, 2016, 06:07:00 am »

PTW'ing.
Logged
Sigtext

It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Accessibility mod v1.01
« Reply #5 on: April 18, 2016, 02:15:45 pm »

PTW
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility mod v1.01
« Reply #6 on: April 23, 2016, 12:44:07 am »

Version 1.02 has been posted.  whereami will now add a very terse description of the tile such as STONE FLOOR or AIR EMPTY or (HIDDEN).

This can be unzipped right on top of an existing install, even while the game is running.  Just remember to copy the files over to any existing saves you might have.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Thundercraft

  • Bay Watcher
    • View Profile
Re: Accessibility mod v1.02
« Reply #7 on: May 15, 2016, 02:49:49 pm »

This looks very useful. I'll have to try it out. I'm especially glad for the whereami script as I was looking for something like that.

BTW: Since this is a tool for navigating around maps and does not actually change the game itself, I believe it should be classified as a utility, rather than a mod. May I suggest moving this to the Utilities category of DFFD, to avoid confusion?
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility mod v1.02
« Reply #8 on: May 15, 2016, 02:56:56 pm »

This looks very useful. I'll have to try it out. I'm especially glad for the whereami script as I was looking for something like that.

BTW: Since this is a tool for navigating around maps and does not actually change the game itself, I believe it should be classified as a utility, rather than a mod. May I suggest moving this to the Utilities category of DFFD, to avoid confusion?

That's a really great idea... done :)
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility Utility v1.03
« Reply #9 on: May 24, 2016, 10:05:55 pm »

Version 1.03 is up.  This one gives a meaningful error if you try to use it when no map happens to be loaded, and it now installs as a global set of scripts rather than being save-specific.

DFHack's search path gives save-specific scripts higher precedence, so the improved error handling will only work if you remove any v1.02 scripts from the raw/scripts folder.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Accessibility Utility v1.03
« Reply #10 on: July 09, 2016, 01:01:07 pm »

Please consider adding these to https://github.com/DFHack/scripts
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility Utility v1.03
« Reply #11 on: July 12, 2016, 02:31:35 pm »

Please consider adding these to https://github.com/DFHack/scripts
Thanks PE, I apreciate that.

I don't use GitHub for any DF stuff to keep as solid a wall as possible between my DF and professional lives (I work in a regulated industry with more than its fair share of people with no sense of humor).  I am not at all against someone else uploading the scripts, but they would need built-in documentation for players who stumble upon them.

I've been working on that for v1.04, and anyone interested can peek at Accessibility_1_04_alpha.zip in Dropbox.  Still needs support for people who try the standard "command -help" syntax.  Once that is fixed and I've tested it to the "probably won't burn your house down" level of safety, 1.04 will get published on DFFD and announced here.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Accessibility Utility v1.03
« Reply #12 on: July 12, 2016, 03:00:44 pm »

About a month ago I improved support for in-script docs; see eg autolabor-artisans for an example.  https://github.com/DFHack/dfhack/issues/947 will further improve the situation.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Accessibility Utility v1.03
« Reply #13 on: July 12, 2016, 07:19:40 pm »

About a month ago I improved support for in-script docs; see eg autolabor-artisans for an example.  https://github.com/DFHack/dfhack/issues/947 will further improve the situation.
Was going for something a bit different.

bookmark -help
bookmark
Sets and manages persistent bookmarks on the map.
Enter bookmark foo to create a bookmark named foo at the current location.
Any one-word string may be used except the following reserved words:
bookmark help prints a command summary.
bookmark -help prints the same command summary.
bookmark list prints a list of existing bookmarks.
bookmark drop foo erases a bookmark named foo.
bookmark clear all erases all current bookmarks. Note the space between clear and all.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Accessibility Utility v1.03
« Reply #14 on: July 12, 2016, 07:46:46 pm »

Hmm, I see what you mean - semantic highlighting would be nice to have.  (I now want to see if this can be done for all docs based on existing markup...)

The advantage of dumping the raw reStructured text markup is it unifies all the documentation for scripts - comments in the file itself, the html docs, and console help.  FWIW, I've marked up a copy below as it would appear in the console / ready for copypasting.

Code: [Select]
-- then later print(helpstr) where apropriate
local helpstr = [====[

bookmark
========
Sets and manages persistent bookmarks on the map, for easier navigation
in Adventure mode.

Enter ``bookmark foo`` to create a bookmark named ``foo`` at the
current location.  Names may be any word or string of characters which
does not contain whitespace, and is not in the command list below.

:bookmark help:         (or ``-help``) prints this help text.
:bookmark *foo*:        creates a bookmark named *foo*
                        at the current location
:bookmark list:         prints a list of existing bookmarks.
:bookmark drop *foo*:   erases a bookmark named *foo*.
:bookmark clear all:    erases all current bookmarks.

This script is best used with the `goto` and `whereami` scripts.

]====]

I also added a note that it's for adventure mode, and cross-references at the bottom which will be linked in the html.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.
Pages: [1] 2