Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Successive Embark (from retired, not abandoned fortresses)  (Read 1433 times)

Thundercraft

  • Bay Watcher
    • View Profile
Successive Embark (from retired, not abandoned fortresses)
« on: February 07, 2013, 11:40:19 am »

In spirit, this is a continuation of the Reuse dwarves from abandoned fortresses suggestion thread. However, I wish to discuss the modding and practicality of the idea with v0.34 and current tools and techniques.



I don't suppose there's been any more official talk of having the option to retire a fort in a legacy manner?

But, at least in terms of modding, it is now - technically - feasible. Sort of.  (See this post in the DFusion thread and this thread for details.) Still, it requires technical knowledge and hacking the game. It's not at all a straightforward process and there's a chance to mess up.

I recently asked here in the new DFHack thread about further possibilities. I had hoped to hack the location of items and creatures to instantly move everything to a new embark at a different part of the world map. Sadly, according to Quietust, it cannot be done. :(

Anyway, here's part of Rumrusher's response (moved here to stay on topic):

I wonder to know what's your problem?.. oh wait you want migrants from a retired fort, they should move over to the new site easily in the upcoming migrant waves. Though the units are stuck in a pool of natural citizens of the civ and might take a couple sessions.

Interesting, but it's not what I'm talking about. I want to choose a selection of dwarves from my old fort to migrate to a new location to start a new one - as founders, not migrants. But more than that, I also wanted to bring along a selection of domestic and exotic animals and maybe some caged critters. In addition, I really want to select piles of supplies and stuff from my old fort to bring along - maybe even an artifact or two.

More importantly, there is a reason to bring along creatures from my old fort instead of buying new animals on embark or from caravans. A good one:

DF actually has some degree of genetics simulation. (See v0.31 Talk:Butcher.) There can be a surprising degree of variation in terms of a species' HEIGHT, BROADNESS and LENGTH. (Not to mention variation in hair, eye, and tissue colors. See TLCM_GENETIC_MODEL and other creature tokens.) And these traits can be inherited by offspring. In some cases an unusually large "breed" of dogs in DF can be butchered for more meat than an unusually small "breed" of donkeys. A lot of it seems a roll of the dice. But one can intentionally breed big specimins that produce more meat (or visa versa). And larger specimins are also a bit more powerful in combat.

But all that work in breeding super-cows or super-warbears would be largely wasted if one cannot bring them along for a new embark.

...though if you want people from another site to visit you could jump into adventure mode and walk them to the next site.

I thought about that. A lot! If push comes to shove, I might. But that method seems very tedious and fraught with peril. Boring, even. Embarking to a destination halfway across the world map could take a long time. And I would imagine I'd run into some nasty stuff along the way and most of the party would perish along with most of the goods.

That's just it: How would I haul a bunch of stuff across the world in adventure mode? Does 0.34 adventure mode allow the use of pack animals now? Fortress mode does not allow dwarves to use animals as pack animals - unlike caravans.

Can I have them carrying bins filled with stuff at the moment I retire the fort and turn them into adventurer companions? Maybe have them use wheelbarrows or minecarts? There would be no tracks for the minecart...

Well, I suppose I could do a "hopscotch" method. That is, I could move all I wanted to the edge of the map in fort mode, switch to adventure and move beyond the edge, then switch back to fort mode and move stuff again... rinse and repeat. But that's quite tedious. Even more so if one has to dig tunnels underground for a safe route, complete with minecart tracks.

Ah... I have an idea on a faster method (if it works):

One can use DFHack commands to change the location of items and creatures instantly. So one could have stacks of items and creatures a lined up for "rapid short-range teleporting". Then do a legacy-style fort retirement and switch to Adventurer Mode. Next, have a script to teleport everything to the edge of the map in the direction you want to go (N/S/E/W). And then keep repeating the teleport until you get where you want to go.
« Last Edit: February 07, 2013, 12:10:03 pm by Thundercraft »
Logged

Thundercraft

  • Bay Watcher
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #1 on: February 07, 2013, 11:45:49 am »

Like I said, I would prefer to just relocate my old dwarves and stuff. But I can think of another way. It involves "cloning" the dwarves, creatures, and items I want to take along by transforming new stuff into copies of the old.

I think one could write a GUI program - let's call it "Embark Infinity" - that would list all the dwarves, creatures, and items in your fortress. (That is, something like a very primitive and very simplistic version of Runesmith or Dwarf Therapist.)

Then you would use this program to select exactly what you want to bring along. It would save all this data, right down to the personality, skills, stats, etc, of each dwarf. And then it would use DFHack functions to literally erase these dwarves, creatures, and items from the game.

This should be doable: DFHack's "autodump-destroy-item" command destroys items. And the "slayrace" command can target an individual.

Next, Rumrusher's method to retire a fort - legacy style - is used. Among other things, it involves using DFusion to temporarily turn the area into a "lair" (to prevent item scatter on abandon fort) and changing the game "mode" back and forth between Fortress and Adventurer.

Some or all of this might have to be done manually. But I suspect it could be automated. I'm hoping Embark Infinity could be written to send commands to DF as keystrokes directly. (If nothing else, perhaps an AutoHotKey script could be used?)

Then it's time to start a new fortress. The number of starting dwarves is hacked to match the number of dwarves you chose to bring from your old fort. The simple_embark function in DFusion (now a plugin in DFHack) can do this.

Obviously, you do a lot of this manually, like selecting the new site. Prepare Carefully is chosen. When it comes time to choose supplies, a number of dogs or cats is chosen to match the number of creatures you picked to bring along in Embark Infinity.

So now you're at the new embark location and you have the chosen number of placeholder dwarves and placeholder dogs/cats, a muskox, a wagon, and some items.

Transforming your starting dwarves into clones of the dwarves you chose from your old fort (now deleted) in Embark Infinity should be possible. After all, Runesmith allows one to edit dwarves like that. And DFHack's in-game "Dwarf Manipulator" tool allows most of what is needed.

Transforming those dogs/cats/muskox into the creatures selected from your old fort should also be possible with existing tools, at least with a bit of effort. I'm not sure if it is functional (updated) in the latest DFHack, but DFusion had an "Embark expander" and a race change tool which allowed one to change the race (and gender?) of creatures.

Transforming the items from embark into the ones selected is much more troublesome, but doable within strict limits. DFHack as a "changeitem" command to change the material and quality of an item. That would allow, say, changing normal quality tower-cap buckets, iron anvils, and copper picks into masterful gold versions. (But not, say, transforming copper picks into cages.)

Obviously, this is hugely limiting. There are not many items available for embarking and availability is randomized and depends on what other civs have. Even so, there are some items that are always (or nearly always) available, such as copper picks and dogs.

However, DFusion also has some other tools for item manipulation and there is some hope for other possibilities. DFHack has a lot of potential, though it might come to coding and developing one's own plugin for this.

I've already thought of a third option: One could mod in a custom workshop that could take certain raw materials and transform them into certain final products. This could be abused to get around some of the item hacking limitations.

One possibility is having an "Arcane Teleporter" that is "harmful to living specimens". And it's a one-shot deal, requiring wagon wood to fuel it. The end products could be a long list of stuff. And each unit of wood could provide a large stack of them. Example: One unit wagon wood might "teleport", say, 20 gold minecarts. And DFHack's changeitem could change them to masterful. Though, obviously, one could not "teleport" an artifact this way.

Again, I think a lot of this could be automated and done by sending keystrokes or something direct.
« Last Edit: February 07, 2013, 11:49:35 am by Thundercraft »
Logged

Avelon

  • Bay Watcher
  • [ETHIC:INDULGE_IN_MYSTICISM:UNTHINKABLE]
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #2 on: February 07, 2013, 02:01:04 pm »

My knowledge of DF utilities and memory hacks is extremely limited, but if you want your old items on a new embark, it is possible to set your strength extremely high. One thing you might consider is genning a world with a custom outsider race whose attribute ranges are maximized and can fly, has nopain, no thirst, no hunger, etc.

You can load up on a rather large amount of items (you may be surprised). You might find it advantageous to throw in a reaction to instantly make a backpack from nothing:

Spoiler (click to show/hide)

Just an idea for one aspect of what you're asking about.

Also, I'm not sure, but don't some of the utilities let you directly edit dwarves' attributes, skills, name, preferences, relationships, etc.? So for dwarves at least if you saved a template of the dwarves you wanted, you could manually alter the dwarves in-game as they migrate...not ideal for sure, but it's something.


----

You seem to actually have the second part well outlined. I somehow managed to not see your second post (I swear I scrolled down before posting!).

So that just leaves items. Well, can those utilities MOVE an item? If so, you can use reactions when you switch to Adv. mode to transmute items. Combined with something that can macro, implementing a world gen mod with, say, 100 placeholder reactions that Embark Infinity can alter would allow you to convert items into other item types, and then you can use the other methods named to alter the quality and materials used.

For improvements, a single reaction which takes any item as reagent can be used to add any GET_MATERIAL improvement from a second item, but you'd probably want a separate reaction for each improvement material UNLESS one of those programs can also edit the materials used in improvements. In which case, you are set!

It's important though to consider that the items will need to be stacked up in a certain order to automate the reaction-conversion process, and that Artifacts CANNOT be re-made in this way, unless you can convert any item into an artifact after-market. Even then it will not bear the mark of its maker and will not have the correct artwork, unless I'm sorely underestimating the ability of one of the utilities you'll be using. For those, you'd HAVE to manually lug them from one site to the other with an adventurer, but only having to transport 1 page of items has the advantage of improving your survivability when fast traveling in a *REAL* world with many hostile civs and etc.

Two Urists up for this idea, I've craved something similar! If you get it working, I will be lurking nearby to snatch up your success and make it my own. ;) Good luck!!!
« Last Edit: February 07, 2013, 08:24:24 pm by Avelon »
Logged
Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able, and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God? - Epicurus

Avelon

  • Bay Watcher
  • [ETHIC:INDULGE_IN_MYSTICISM:UNTHINKABLE]
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #3 on: February 07, 2013, 02:32:33 pm »

I felt a double post was healthier for the purpose of this input than modifying the previous post. Please excuse me.

So to summarize, Embark Infinity needs to do all of this:

  • Either as a standalone or as a plugin to Runesmith/DTherapist/DFHack, EI must be able to read and write post-gen information for an entity (specifically: dwarves, preferably all creatures).
  • Compile from either mined or selected data 3 lists: Dwarves, other entities (creatures), items.
  • BONUS: GUI that lets you quickly edit the lists by searching for undesireable things such as 'INORGANIC:COPPER' or specific traits in descriptions, and cull them from the list. Click on a single culled item to add it back to the list, if you have exactly 1 stone item to bring along, cull stone, find that item, re-enable it.
  • Edit a text file containing reactions' PRODUCT lines to produce item types that CANNOT be embarked with (foreign items, anything that is not on the 'all dwarf civs have this' list - unfortunately this will disinclude liquids in the current version).
  • BONUS: Execute each of the reactions on the list with the click of a button while in adventure mode. No reagent is necessary. This can be accomplished by simply creating a custom macro to be executed within DF itself to perform each reaction the required number of times until it is done. It could also output an autohotkey script or something else if that's preferable.
  • MEGA-BONUS: Come pre-bundled with said reactions file which already has every such item available, and instead, EI will generate the macro used to create each item.
  • ULTRA-BONUS: Also the ability to toggle 'Adventure mode' and 'Fortress' mode to add or remove the ADVENTURE_MODE_ENABLED tag so that it doesn't interfere with ACTUAL adv. mode mods which add crafting abilities.
  • Edit the material and quality of each item it produced accordingly. One easy way to do this would be to set the material for every item in the above reactions to something you would not normally use for that type of item, i.e. cloth weapons, stone clothing, etc. It will check only for items of the odd type and use those as it goes down the list to convert them to the expected product.
  • Edit the dwarves and creatures of the expedition to match the saved profiles.
  • Edit migrants to match saved profiles not already implemented until it reaches the end of the list or runs out of migrants (at which point the rest of the list remains 'unresolved' and EI will pick up where it left off next time you run the 'Convert migrants' function).

Sounds about right? From what I've gathered from what you said about other programs being able to do, ALL of this is completely doable in the current version; the only thing you won't be able to retrieve automatically is an artifact.
« Last Edit: February 07, 2013, 02:38:53 pm by Avelon »
Logged
Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able, and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God? - Epicurus

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #4 on: February 07, 2013, 07:50:30 pm »

Avelon: your reaction won't work, your material isn't well-formed. It should be:

PLANT_MAT:REED_ROPE:THREAD

I'm not sure if rope reeds are REED_ROPE, either.

Avelon

  • Bay Watcher
  • [ETHIC:INDULGE_IN_MYSTICISM:UNTHINKABLE]
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #5 on: February 07, 2013, 08:27:47 pm »

PLANT:REED_ROPE in plant_standard.txt, I believe that's the right file, yes?

Fixed, thank you.

Do you have any insight on the topic at hand? Or know someone who might be interested in tackling the project itself?
Logged
Is God willing to prevent evil, but not able? Then he is not omnipotent.
Is he able, but not willing? Then he is malevolent.
Is he both able, and willing? Then whence cometh evil?
Is he neither able nor willing? Then why call him God? - Epicurus

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #6 on: February 07, 2013, 08:29:13 pm »

Nope. I only have knowledge in the lua writing for DFHack :P

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Successive Embark (from retired, not abandoned fortresses)
« Reply #7 on: February 08, 2013, 03:11:20 am »

Hmm... It could work. E.g. if you know how to switch from/to fort mode.

then a small script that equips ALL the items (from some area or something) to one dwarf. A small script that makes all (again from some area or sth) to be your companions (or at least travel in same group, limitation: no pets and other non-important units). Then move to other site (pre embarked and abandoned, or created in some other way), switch to fort mode again.
Also you could be teleported to the other site. The tech (...) is there it just needs to be integrated into one thing and some minor things solved (e.g. where to keep the list of nemesis_id(s) of all the units that need to moved while you travel and so on...)


references:
Spoiler (click to show/hide)