DFHack / dfhack

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

Add Script To Fix Bug Item Stuck in Wheelbarrow #2453

Closed lucasmitrak closed 8 months ago

lucasmitrak commented 1 year ago

Currently, dwarf fortress has a bug where items are occasionally left inside wheelbarrows[1]. This is a problem because a maximum of five wheelbarrows can be assigned to each stockpile, and if each have an item stuck inside, then items will not be delivered to the stockpile[2]. This script claims to fix that bug: https://dwarffortresswiki.org/index.php/User:Fleeting_Frames/wheelbarrow-stuckinside I do not have a computer available to test it, but fixing this bug would save a lot of frustration with stockpiles.

[1] https://www.bay12games.com/dwarves/mantisbt/view.php?id=6074 [2] https://dwarffortresswiki.org/index.php/DF2014:Wheelbarrow

ab9rf commented 1 year ago

The script is from Fleeting Frames, who is well-known to be competent. Unfortunately they hasn't been seen in any of the DF-related discords, the wiki, or the bay 12 forums for at least a year, so I don't know how we can get permission from them to incorporate this script into DFHack, and without that permission I don't know how we can move forward on this.

lucasmitrak commented 1 year ago

Thank you for following up on this. It is a shame the author did not give an open source license to his programs. If someone has the time, it would be great if someone could test if this script fixes the bug by using the save file in the bug report. I may do this if I have time but I do not have a working df-compatible computer right now. This would be useful because this fix could be posted to the bug report and players could use the script for their private use.

silverwing235 commented 1 year ago

The script is from Fleeting Frames, who is well-known to be competent. Unfortunately they hasn't been seen in any of the DF-related discords, the wiki, or the bay 12 forums for at least a year, so I don't know how we can get permission from them to incorporate this script into DFHack, and without that permission I don't know how we can move forward on this.

....I don't usually suggest this, but..have you considered emailing or otherwise contacting them directly, by whatever other means available?

ab9rf commented 1 year ago

If you can find any public information with information that can be used to contact them, feel free. I spent a half hour looking for any such information the other day and was not able to find any.

lucasmitrak commented 1 year ago

I have very good news. At the bottom of the wiki page, there is a disclaimer that states "Content is available under GFDL & MIT unless otherwise noted" [1]. The former is just a documentation license while the latter is a very free software license [2]. This means we can use the script, and any other script posted to the wiki unless the author specified another license! Therefore, to add this to dfhack, we should add this to the top of the script:

Copyright 2019 Fleeting Frames

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

However, there is still the matter of whether the bug still exists and if this script actually works or not. The bug was last confirmed to exist on version DF 0.40.24 and this script was never confirmed to actually work at all. Therefore, the next step would be to load the save from the bug report and test if the bug appears and if the script fixes it or not.

[1] https://dwarffortresswiki.org/index.php/Dwarf_Fortress_Wiki:Copyrights [2] https://opensource.org/licenses/MIT

ab9rf commented 1 year ago

I'm going to be very clear here: I'm not going to assume that Fleeting Frames was aware of that site policy when they uploaded that content. While we could probably avoid legal liability if we used the script without their permission using the argument you offer, the fact remains that we do not have Fleeting Frames' permission to use their code.

lucasmitrak commented 1 year ago

I'm going to be very clear here: I'm not going to assume that Fleeting Frames was aware of that site policy when they uploaded that content. While we could probably avoid legal liability if we used the script without their permission using the argument you offer, the fact remains that we do not have Fleeting Frame's permission to use their code.

I believe your logic to be faulty because you assume he was not aware of this disclaimer which is on the bottom of every single page. We have no reason to believe he would not want us to use this code he published publicly. With this in mind, combined with the fact that we cannot get in contact with him, I believe it is reasonably acceptable to use his code until he lets us know otherwise.

silverwing235 commented 1 year ago

I'm going to be very clear here: I'm not going to assume that Fleeting Frames was aware of that site policy when they uploaded that content. While we could probably avoid legal liability if we used the script without their permission using the argument you offer, the fact remains that we do not have Fleeting Frame's permission to use their code.

I believe your logic to be faulty because you assume he was not aware of this disclaimer which is on the bottom of every single page. We have no reason to believe he would not want us to use this code he published publicly. With this in mind, combined with the fact that we cannot get in contact with him, I believe it is reasonably acceptable to use his code until he lets us know otherwise.

Agreed.

ab9rf commented 1 year ago

Feel free to use their code; that's a decision you can make for yourself. The question we on the DFHack team have to consider is whether or not to include it in our product. And while I agree that we probably have enough legal cover should we choose to include it, for me that cannot be the end of our inquiry. Rather, for me the question comes down to whether we actually have their permission, and the reality is that we do not. As such, it would be my position that we should not include it.

myk002 commented 8 months ago

fixed with fix/empty-wheelbarrows