Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF update  (Read 2361 times)

PIB76

  • Bay Watcher
    • View Profile
DF update
« on: January 02, 2018, 09:40:10 am »

Hi all,
I just approached Df, very new here. I'm playing v043.05 and I would like to upadte to the last version 0.44.03
How should I proceed since there isn't an autoupdate button? I'm using Lazis Newb Pack, should I re-dowload the new version? What about old save?
Thanks a lot!
Logged

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: DF update
« Reply #1 on: January 02, 2018, 10:02:36 am »

Redownload the new version. Your old saves won't get any new features, only bugfixes. Re-generate your worlds.
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #2 on: January 02, 2018, 11:30:07 am »

KittyTac is correct, but somewhat terse.

If you upgrade your save only some of the new feature will be introduced, while some won't make it. You won't get any world gen artifacts, as your world didn't generate them, for instance. Apart from that you won't get access to Pedestals and Display Cases. Those are the things I know of, but there may very well be other things you'll miss out on.

The way to migrate a save between LNP versions is to install the new LNP in a new folder and copy the save game folder (regionX inside <old LNP>/<DF>/data/save).
The main recommendation is to upgrade between minor DF versions (minor changes and bug fixes) and generate new worlds for major ones. Often it's better to stay on the older version if you're attached to your fortress and change only when you're finished with it.
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: DF update
« Reply #3 on: January 02, 2018, 02:36:23 pm »

If you upgrade your save only some of the new feature will be introduced, while some won't make it. You won't get any world gen artifacts, as your world didn't generate them, for instance. Apart from that you won't get access to Pedestals and Display Cases. Those are the things I know of, but there may very well be other things you'll miss out on.

I have been able to make a world DF2017 ready, including forcing in Pedestals and Display Cases. You have to use the development tools to inject the raws, and make sure your game is backed up on the way.

Relevant Posts:
The command line inputs: http://www.bay12forums.com/smf/index.php?topic=161271.msg7652528#msg7652528
Changes to devel/inject-raws script that may be needed: http://www.bay12forums.com/smf/index.php?topic=164123.msg7652859#msg7652859

Order for updating a no-mods game:
1) Backup.
2) Replace Raws with DF2017 ones.
3) Load save, use
Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL tool ITEM_TOOL_DISPLAY_CASE4) Immediately save without unpausing.
5) Reload game, enter code
Code: [Select]
devel/inject-raws reaction "MAKE WOODEN DISPLAY CASE"6) Immediately save again without unpausing.
7) Load game. If it loads without problems, you should be ready to go.

As noted, entities will have to produce their artefacts over time in the game (so over a few years or so), and you'll have to wait a while for the entities to make use of the new functionalities.

Edit: You also have to copy over the new raws, and make relevant changes if you are on a mod. If no mods, just copy over the new raws and afterwards do the raw injection.

I did petition to have an autoupdate feature in the LNP given the success in updating worlds, but apparently it is quite difficult (and will be very OS-specific too).
« Last Edit: January 02, 2018, 02:43:06 pm by CaptainArchmage »
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PIB76

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #4 on: January 02, 2018, 05:25:23 pm »

Thank you,
It doesn't seem so easy  :D
If I choose to start again from the beginning what I should do is just to sobstitute the old 0.43.5 folder with 0.44.3 folder in the main LNP folder?
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #5 on: January 02, 2018, 05:52:57 pm »

I have been able to make a world DF2017 ready, including forcing in Pedestals and Display Cases. You have to use the development tools to inject the raws, and make sure your game is backed up on the way.


I did petition to have an autoupdate feature in the LNP given the success in updating worlds, but apparently it is quite difficult (and will be very OS-specific too).

Oh, nice! I've been curious how this works. I remember you asking about getting an automated save-file-update feature in my thread for the Lazy Mac Pack. But of all the LNP pack maintainers, I probably have the least programming skills and am the least familiar with DFHack commands. The thread for the LNP launcher software that the Lazy Mac Pack uses is here – PyLNP. They might be more likely to be able to so something like this.

From your instructions, it looks like this might be possible to implement with PyLNP creating init files with commands for DFHack to run. The parts I'm worried about is getting it to load the save file a second time for the second round of injections. I'm not sure how that would work. The other tricky issue is making sure those DFHack update script commands get removed from the init files after the save file is updated.
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: DF update
« Reply #6 on: January 02, 2018, 11:33:14 pm »

I am aware that there are issues with accessing folders taking the base folder as the root one the program is in, because normally the main folder on Mac is (or was) the user root folder (whereas most programs would have to access from the application folder, etc). This was an issue in C++, maybe in python as well.

Here's the process you'd need to execute:

1) Firstly, check any differences between the raws of the save and the unmodified raws of the game in 0.43.05 (or indeed, the older version). If there are no differences, this check passes. If there are differences, there should be a notification given. I believe raw comparison and analysis software does exist.

This update process could probably add in adventure mode reactions to games in progress before adventure mode reactions were in place, so probably back to 0.42 if not earlier. The earliest version of an updatable save using the existing version of DFhack is 0.40.03.

2) If no differences exist, then copy the DF2017 raws over. If differences exist, there could be a way to still update it but it gets difficult. The differences are not just the additions of pedestals and display cases, there are also new tags added to creatures and the entities have available pets assigned differently.

The above can probably be done OK.

3) An active save has to be loaded, so you have to be in dwarf or adventure mode and not in a world save. The code is basically two items and one reaction, and has to be executed. Note I did them separately because I wasn't sure whether the thing would work (Good thing too because there was a problem parsing "MAKE WOODEN DISPLAY CASE" in the script at that time). Then, the game must be saved. I think this might be harder to run.

I will be doing the single-line update to the Archibald save when the current player finishes, trying as follows:

Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL tool ITEM_TOOL_DISPLAY_CASE reaction "MAKE WOODEN DISPLAY CASE"Or:
Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL ITEM_TOOL_DISPLAY_CASE reaction "MAKE WOODEN DISPLAY CASE"
« Last Edit: January 02, 2018, 11:36:18 pm by CaptainArchmage »
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: DF update
« Reply #7 on: January 02, 2018, 11:42:00 pm »

Wait, where did he say he's on Mac?
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

PIB76

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #8 on: January 03, 2018, 03:34:49 am »

In fact I'm not a MAC. Anyway thanks to all for the support. I think I will finish my old fort and start a new one when the new LNP 44.05 will be ready.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #9 on: January 03, 2018, 11:50:34 am »

I will be doing the single-line update to the Archibald save when the current player finishes, trying as follows:

Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL tool ITEM_TOOL_DISPLAY_CASE reaction "MAKE WOODEN DISPLAY CASE"Or:
Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL ITEM_TOOL_DISPLAY_CASE reaction "MAKE WOODEN DISPLAY CASE"
I'm pretty sure the second one will work.

Order for updating a no-mods game:
1) Backup.
2) Replace Raws with DF2017 ones.
3) Load save, use
Code: [Select]
devel/inject-raws tool ITEM_TOOL_PEDESTAL tool ITEM_TOOL_DISPLAY_CASE4) Immediately save without unpausing.
5) Reload game, enter code
Code: [Select]
devel/inject-raws reaction "MAKE WOODEN DISPLAY CASE"6) Immediately save again without unpausing.
7) Load game. If it loads without problems, you should be ready to go.

As noted, entities will have to produce their artefacts over time in the game (so over a few years or so), and you'll have to wait a while for the entities to make use of the new functionalities.

Edit: You also have to copy over the new raws, and make relevant changes if you are on a mod. If no mods, just copy over the new raws and afterwards do the raw injection.

I did petition to have an autoupdate feature in the LNP given the success in updating worlds, but apparently it is quite difficult (and will be very OS-specific too).
You shouldn't have to reload the game between the two invocations of devel/inject-raws. You just have to reload before attempting to do anything else in the game (unpausing, interacting with buildings, etc.). Alternatively, you can add everything in one command.

I'm not sure how auto-updating would be OS-specific at all, given that PyLNP and DFHack have good support for all platforms supported by DF.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #10 on: January 03, 2018, 12:20:12 pm »

As far as I can see a feature update would have to deal with a few issues:
- Mods, as mentioned. I'm not sure there's any reasonable ways apart from brute force (assume there are no mods) and try to detect mods and then either refuse or warn that the player will have to restore the mods manually afterwards (in the nice case the modded raws (or all of them) would be backed up as copies, which might be a good idea every time anyway).
- Detect whether the save has been updated already. This gets messy if someone has manually added half of the things, but not all.
  It also gets messy if there are several versions that do not upgrade exactly the same set, as well as dealing with an upgraded version of a porting script. It might require a modular approach where each thing added/modified is examined in isolation, an evaluation of whether that combination is feasible is made (if needed), and then the changes applied one after the other.
- Detect which set of updates to add in the case of multiple versions.
- Someone needs to identify what can and need to be updated for each version that introduce new things and then write the appropriate script to perform those updates. That someone is probably not the pack maintainer, as they usually compile things (and, as lethosor said, these scripts would probably not need to be OS/pack specific). Thus, well crafted and tested updaters could be yet another thing pack maintainers add to their packs (provided someone produce and test those first, of course).
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: DF update
« Reply #11 on: January 04, 2018, 07:01:29 pm »

I remember you asking about getting an automated save-file-update feature in my thread for the Lazy Mac Pack. But of all the LNP pack maintainers, I probably have the least programming skills and am the least familiar with DFHack commands. The thread for the LNP launcher software that the Lazy Mac Pack uses is here – PyLNP. They might be more likely to be able to so something like this.

Specifically this mentioned Mac.

The DFhack system already works on Mac, the issue is raw comparison with multiple non-modded standards.

Update material will have to be covered manually.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

lethosor

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #12 on: January 04, 2018, 07:30:21 pm »

Raws are typically not platform-specific either.
(I also finally made the change to inject-raws mentioned above, so the next DFHack release should have that.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

jecowa

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #13 on: January 04, 2018, 08:03:59 pm »

The Next DFHack will have an option to upgrade save files from DF v0.43.05 to DF v0.44?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DF update
« Reply #14 on: January 04, 2018, 09:21:46 pm »

No, devel/inject-raws in the next DFHack release will support reaction names with spaces. I was referring to this:
Changes to devel/inject-raws script that may be needed: http://www.bay12forums.com/smf/index.php?topic=164123.msg7652859#msg7652859
I don't think anyone has written a script to add new features to saves (i.e. running devel/inject-raws as above).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.