ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Dealing with libraries

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Dealing with libraries

Postby Denk » Sun Mar 08, 2020 1:59 pm

Since I have a lot of questions on this topic, I guess it needs its own thread.

I am using the newest release of ADRIFT (5.0.35.3 from 2016) and I have added saabie's updated standard library as a library but to begin with, I leave it unticked so that I am still using the old standard library. Furthermore, I have renamed saabie's library so that hopefully, ADRIFT will not mix up the two files.

When I load a game, the library within that game is unchanged with the above-mentioned settings.

If I then untick the Standard Library, tick saabie's library instead and reload the game, I am given the question:

Library file is more recent than your adventure. Do you want to update/insert newer items?

Even if I click "no" the new library is inserted into the game. I can see this because there is now a task called "Take Character" in the "Give, Take and Drop" folder. This task does not exist in the standard library of ADRIFT 5.0.35.3, only in saabie's update.

Thus I have at least three questions:

1. Does it matter whether you click "yes" or "no" to the question: Library file is more recent than your adventure. Do you want to update/insert newer items? ???

2. Is it a bug in ADRIFT that the new library tasks etc. are inserted into the game file when clicking "no"?

3. Since the Standard Library of a game can be updated with the above settings, why has it then been proposed to have two separate user accounts?
(In any case the user has to be very careful not to open a game containing the old library when the new library is selected.)

I am aware that you can prevent overwriting the old library in your game by deselecting all libraries in ADRIFT before loading the game. But one can easily forget to do so, and then the new library overwrites your game, perhaps making it unplayable.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251

Re: Dealing with libraries

Postby Denk » Fri Mar 13, 2020 4:18 pm

P/O Prune and I have made an almost-finished version of the Danish Standard Library. When we create a new game, everything works as it should. But when we update the library into an existing game, only some of the tasks get updated. For instance, before updating our game, in the "Attacking" folder in the Standard Library, we have the tasks:
* Attack character
* Attack character with object

If I create a new game with the danish library, we have the same tasks, though translated as they should be:
* Angrib character
* Angrib character med objekt

If I update my game with the new standard library, I end up with these two tasks:
* Attack character (an original task)
* Angrib character med objekt (a translated task)

If I delete all tasks in the "Attacking" folder before I update the library, I end up with only one task:
* Angrib character

Note that I very carefully deleted the two original tasks one by one, since I am aware that if you delete many tasks in one go, the tasks are not truly deleted (this is another bug in ADRIFT).

Does anybody know what can be done to prevent this problem?
:Thanks:
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251

Re: Dealing with libraries

Postby saabie » Sat Mar 14, 2020 3:26 am

1. If you manually edit the library .amf file with a text editor you must remember to update the "<LastUpdated>" date and time of each item altered so that ADRIFT knows that it needs to be updated.
2. The <LastUpdated> datetime at the start of the library must also be later than the one of the file being updated.
3. Never delete an item from the standard library that you want to update. This creates an <Exclude> entry for the key of the item which prevents that key from ever being used again. (You can see these by exporting the updated game and looking near the end of the .amf file produced)
4. Are you updating by replacing the original StandardLibrary file with the new one? If you have both the old and new files separate and both ticked in the library list then ADRIFT is going to be very confused.
5. Are you updating using the library list or are you trying to import it?
6. Check the keys of the original items and then after the upgrade to the new Danish items to see that they are still using the same key exactly.
7. If a library item has ever been edited in a particular game, then that item wont ever be upgraded in that game.
saabie
 
Posts: 1024
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: Dealing with libraries

Postby Denk » Sat Mar 14, 2020 8:38 am

saabie wrote:1. If you manually edit the library .amf file with a text editor you must remember to update the "<LastUpdated>" date and time of each item altered so that ADRIFT knows that it needs to be updated.
2. The <LastUpdated> datetime at the start of the library must also be later than the one of the file being updated.
3. Never delete an item from the standard library that you want to update. This creates an <Exclude> entry for the key of the item which prevents that key from ever being used again. (You can see these by exporting the updated game and looking near the end of the .amf file produced)
4. Are you updating by replacing the original StandardLibrary file with the new one? If you have both the old and new files separate and both ticked in the library list then ADRIFT is going to be very confused.
5. Are you updating using the library list or are you trying to import it?
6. Check the keys of the original items and then after the upgrade to the new Danish items to see that they are still using the same key exactly.
7. If a library item has ever been edited in a particular game, then that item wont ever be upgraded in that game.

Thanks for all the information saabie!

I am pretty sure that 7 is the main problem. The game I tried to update was made inside an early taf-file where we had began to change the standard library. Since I just kept on working with the taf-file, ADRIFT thinks that I have made changes to the standard library and not that I have made a new library. I then tried to clean the game file (remove all objects, locations etc) and export the danish library. I then made a new test game based on this early version of the danish library. Finally, I tried to update the library to the final version. This time everything was updated correctly.

So it seems, that before we begin to work on a game with an early version of a library, thinking that we can update the library later when it is finished, it is important to export the library and make a game based on this library and not based on the taf-file used to create the library.

So for the future we know how to avoid these problems. :bravo:
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251


Return to ADRIFT 5.0

Who is online

Users browsing this forum: Google [Bot] and 6 guests

cron