Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Tool to teleport the Embark Wagon and it’s contents. #3366

Open
A-CuriousCat opened this issue May 13, 2023 · 11 comments
Open
Labels
idea Suggestions, etc.

Comments

@A-CuriousCat
Copy link

Please add a tool to allow the user to teleport the Embark Wagon and it’s contents to a chosen cursor location. Myk says that the code can be refactored from deep-embark.

@myk002 myk002 added the good first issue Good for newcomers label May 14, 2023
@myk002
Copy link
Member

myk002 commented Jun 19, 2023

actually, looking at deep-embark, maybe this problem isn't as solved as I thought it was. deep-embark actually teleports all the wagon contents and scatters them around the target position, and then removes the wagon itself. it does not move the wagon building. perhaps it is more complicated than I thought it was to move a building safely.

@myk002 myk002 added idea Suggestions, etc. and removed good first issue Good for newcomers labels Jun 19, 2023
@A-CuriousCat
Copy link
Author

actually, looking at deep-embark, maybe this problem isn't as solved as I thought it was. deep-embark actually teleports all the wagon contents and scatters them around the target position, and then removes the wagon itself. it does not move the wagon building. perhaps it is more complicated than I thought it was to move a building safely.

Did you see my conversation with Rumrusher and Bumber, starting here?

@myk002
Copy link
Member

myk002 commented Jun 21, 2023

yeah, that's certainly a start. Plus fixing occupancy flags (that is, the tiles need to have their "I have a building" and "you can walk/build here" flags set properly). I'm just very suspicious that if it were this easy, then deep-embark would have done it already.

@A-CuriousCat
Copy link
Author

A-CuriousCat commented Jun 21, 2023

Why not ask the person who wrote deep-embark?

Edit:

I just tried looking and I can’t find the file in the DFHack repository that deep-embark is defined in. I also tried searching the DF forums, but I couldn’t find any references to it (other than your post) in the first page of search results (and the remaining 33 pages all just said that no results could be found…).

@myk002
Copy link
Member

myk002 commented Jun 21, 2023

Scripts are in a separate repository: https://github.com/DFHack/scripts/blob/master/deep-embark.lua

The primary author is @AtomicChicken

@AtomicChicken
Copy link
Member

AtomicChicken commented Jun 22, 2023

Thanks @A-CuriousCat for bringing this to my attention (I haven't been very active on GitHub lately). Looking back, I believe I had experimented with moving the wagon directly, but ultimately decided to move the wagon contents instead so as to accommodate for the rare case of cramped caverns lacking a large enough area (3x3 walkable tiles) to fit the wagon into, and more so as it was my (subjective) opinion that properly implementing underground wagon "embarks" logically necessitates the verification of a wagon-accessible path between the target location and the edge of the cavern map. Checking for the existence of such a path would significantly complicate the code, markedly prolong the script execution time, and occasionally result in failure due to no such path being available. Scattering the wagon contents allowed for increased flexibility and simplicity, and I may have also found the visual result appealing, drawing parallels to the campsites of underground animal people tribes.

I don't explicitly remember whether I encountered any problems of note when moving the wagon building directly. As has been pointed out previously, the code by Rumrusher referenced above is certainly incomplete without properly updating the relevant tile flags.

@A-CuriousCat
Copy link
Author

Thanks, @AtomicChicken! So, considering that my initial idea was for the script to "magically" teleport the embark wagon from one place to another (with making sure that there's enough room for it at it's destination being left up to the user), it looks like @Rumrusher's solution should work (with the inclusion of the aforementioned polishing, of course). Though it does make me wonder if the script should at least check the 3x3 area around the destination to make sure that the wagon can be placed there and abort with an error message if it can't. Another question is what should happen if the user tries to teleport the wagon to a destination that hasn't been revealed yet. Should the script work as usual, or should it always refuse such an attempt at teleportation into the unknown? Anyways, I think I'll see what @myk002 has to say, now that you've chimed in...

@myk002
Copy link
Member

myk002 commented Aug 9, 2023

I think this is entirely feasible, and should probably be implemented as a generic building teleporter. Moving a wagon should be no different from moving a trade depot or a workshop. And whereas deep-embark is a gameplay mod that is not moving the wagon because of the artistic vision of the author, we can implement this as a plain old Armok tool.

It wouldn't even be that hard to support area select and move entire groups of buildings. It's simple to copy the layout with blueprint and the suitability of the target location can be checked with quickfort, then instead of creating new buildings, we'd just move the existing ones.

@ab9rf
Copy link
Member

ab9rf commented Aug 9, 2023

moving a building with machine components (such as a screw pump or axle or the like) requires additional processing and should probably be excluded, at least initially

also be careful about moving building in or out of a civzone

@A-CuriousCat
Copy link
Author

A-CuriousCat commented Aug 12, 2023

I think this is entirely feasible, and should probably be implemented as a generic building teleporter. Moving a wagon should be no different from moving a trade depot or a workshop.

Ok. I agree that it’d be better as a generic building teleporter. Btw, what happens if you teleport a building that a zone was created from?

@myk002
Copy link
Member

myk002 commented Aug 12, 2023

In v50, that no longer happens. Zones are no longer created from buildings. They'd have to be moved separately.

Perhaps what we need here is a commandline tool that moves a single thing -- building, zone, or stockpile -- with a GUI layer that supports area select.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Suggestions, etc.
Projects
None yet
Development

No branches or pull requests

4 participants