I want to ask if a certain application is possible. And please forgive my ignorance. (My programming is rusty and I'm not familiar yet with Lua.):
In the Units module is the
dfhack.units.getPosition function to return the true x,y,z of a unit. And in the Items module is
dfhack.items.getPosition(item) to return the true x,y,z of an item.
Those return values. But is it possible to
change these values - to force a unit and/or an item to be instantly relocated from one position to another (such as swapping positions with an item or creature)? If so, how would one go about doing that?
Also, if the above is true, is it possible to relocate a creature and/or item instantly to a different
global position? To explain, I have an example:
Say I have a utility that - in fortress mode - reads the position of one or more creatures/items and stored the values. Then I use Rumrusher's technique of "properly retiring a fort". (DFusion hack to adjust the items so they do not scatter, civ ownership of pets, etc, etc. See
this thread and DFusion's thread for more.)
Then I start a new embark.
Now, with the saved position(s) of the creature(s)/item(s) from the now "retired" old fort - assuming they have not moved or scattered - would it be possible to relocate them to the new embark map?
I realize that the game differentiates between global and local maps. But, after the old fort is retired, what used to be local becomes global and a new embark map becomes the new local map... right? Would that pose a problem?
I thought I'd ask before further banging my head on this problem... (I really,
REALLY want to see a "Successive Embark" or let my old fort continue on while starting a new one with resources on hand. And I don't have the patience to wait for Toady to get to it one of these days. With the tools and techniques available now, I figure a hack
might be within reach.)