DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.88k stars 478 forks source link

Deduplicate scripts and plugins #1012

Open PeridexisErrant opened 8 years ago

PeridexisErrant commented 8 years ago

There are a number of DFHack commands which share functionality. They should be checked carefully, and combined where possible.

This issue replaces #735, with tighter scope.

lethosor commented 8 years ago

modtools/create-item is intended for modders. From http://dfhack.readthedocs.io/en/latest/docs/_auto/modtools.html:

modtools/* scripts provide tools for modders, often with changes to the raw files, and are not intended to be called manually by end-users.

Once it supports supports creating items in buildings/containers, and other features of createitem, I would be okay with making a createitem script that wraps the modtools one, but I don't see any clear advantages of doing that that outweigh the advantages of a plugin known to be stable.

gui/hack-wish was intended for users used to the old name. I'm not sure what the advantage of removing it would be, really, since we don't need the name for something else and the alias isn't requiring any effort to maintain.

I'm not too familiar with the other two, but they sound okay to remove to me (once forceequip is checked, etc.).

expwnent commented 7 years ago

To be honest I think nobody even used reaction-trigger-transition back when it was relevant. It's fine to remove it.

The (slight) benefit of removing gui/hack-wish would be to unclutter the output of ls. We could maintain backwards compatibility with #701 (alias command).

I agree modtools/create-item should be able to make left and right gloves with one call and then createitem should be removed.

Technically I wrote modtools/equip-item not remembering that equipitem existed, but it does seem to do the same thing. I agree equipitem is deprecated.

lethosor commented 7 years ago

Changing hack-wish to an actual alias would be good.

I have to disagree on createitem, though (see my last comment). It's simpler and more concise, supports creating items in containers and buildings, and has a lot of documentation already (including on the DF wiki). I'd be okay with replacing createitem with a wrapper script, as long as it keeps the same syntax and features, but "modtools" scripts are scripts that only modders should use (i.e. if a user has to type "modtools/" in the console to run a command, and they're not testing stuff for modding purposes, then that script is in the wrong place).