ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Updated StandardLibrary

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.

Re: Updated StandardLibrary

Postby Lazzah » Mon Oct 01, 2018 4:17 pm

saabie wrote:Good catch. I think I must have been half asleep when I did the "Taking Characters" task, it needed several fixes.
I have uploaded a fixed version StdLibTest.taf to the first post above, and fixed the StandardLibrary on GitHub.

Thanks for that, saabie. However, having looked at the revised demo file I cannot help thinking you have made it rather over-complicated for old gits like me with all the new functions that I find hard to follow, such as %character%.Name(Force,Objective) - what on earth does that mean!? :?

I have tried to create a GET POLLY task, where I use the action SET PROPERTY 'PLAYER CAN PICK UP THIS CHARACTER' OF CHARACTER 'POLLY' TO 'SIT ON SHOULDER'. but when I run the game and type GET POLLY I get an ADRIFT error pop-up: Bad Expression: Sit_On_Shoulder. :(

Also, having picked up Polly and put her on my shoulder she is, however, sadly missing from my inventory or if I type X ME. :roll:
WIP: The Lost Labyrinth of Lazaitch
ALSO AVAILABLE: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run!

COMING SOON: Magnetic Moon, Starship Quest & Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2219
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Updated StandardLibrary

Postby saabie » Tue Oct 02, 2018 10:43 am

%character%.Name(Force,Objective) simply prints the word me, you, him, her or it (the objective pronoun) depending on the person-perspective setting of the game and the gender of the character being referenced.
%Player%.Name(Force,Possessive) similarly prints my, your, his, her, or its (The possessive pronoun) for the player character.

I assumed that the "Player can pick up this character" property would be set in the developer and never changed.
ADRIFT runner does not like you selecting a property that was not selected when the game starts, so if you need to be able to change the setting during the game I will need to add another state and a restriction to test it.

The examine me / inventory commands don't show Polly because ADRIFT itself does not currently have any way to test what characters are on a given character. The only way around this would be for you to add your own specific run-after tasks to examine and inventory that test if Polly is on Player.
There is no way to do this in a general way in the standard library.
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby Lazzah » Tue Oct 02, 2018 12:05 pm

saabie wrote: %character%.Name(Force,Objective) simply prints the word me, you, him, her or it (the objective pronoun) depending on the person-perspective setting of the game and the gender of the character being referenced.
%Player%.Name(Force,Possessive) similarly prints my, your, his, her, or its (The possessive pronoun) for the player character.

Understood....I think! :)

saabie wrote:I assumed that the "Player can pick up this character" property would be set in the developer and never changed.
ADRIFT runner does not like you selecting a property that was not selected when the game starts, so if you need to be able to change the setting during the game I will need to add another state and a restriction to test it.

Ok thanks! :)

saabie wrote:The examine me / inventory commands don't show Polly because ADRIFT itself does not currently have any way to test what characters are on a given character. The only way around this would be for you to add your own specific run-after tasks to examine and inventory that test if Polly is on Player.
There is no way to do this in a general way in the standard library.

Ok, easily understood! :yeah:
WIP: The Lost Labyrinth of Lazaitch
ALSO AVAILABLE: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run!

COMING SOON: Magnetic Moon, Starship Quest & Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2219
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Updated StandardLibrary

Postby Campbell » Fri Oct 05, 2018 8:45 am

This is brilliant saabie, thanks very much for doing this. One of the main reasons I'd designed the library this way was to make it easy for other people to contribute, so it's excellent to finally see that happen.

:bravo:
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4620
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Updated StandardLibrary

Postby saabie » Sat Oct 06, 2018 1:29 am

Thanks.
Let me know if you think I should change anything or if any of the new features should be in a separate library.
Once it is all tested and everyone is satisfied with it I can do a pull request to your GitHub if you want.
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby Lazzah » Sat Dec 29, 2018 12:29 pm

Hi saabie,

I wanted to see if my existing games will run OK using your updated standard library, so I updated the current standardlibrary on an old laptop which runs Windows 7. One of my games ran perfectly well but then I noticed that the player movement messages were being repeated AFTER the location texts when you made any move. See image below.

MM.JPG
MM.JPG (33.68 KiB) Viewed 1546 times


Not sure what is causing this but it needs to be fixed.
WIP: The Lost Labyrinth of Lazaitch
ALSO AVAILABLE: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run!

COMING SOON: Magnetic Moon, Starship Quest & Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2219
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Updated StandardLibrary

Postby saabie » Sun Dec 30, 2018 1:12 am

I can't duplicate this myself, so I would need a copy of your updated game to see what is happening.
Did you "import" the updated library or did you use the library auto-update feature?
I will PM you my EMail address if you want to send the game to me to debug.

In general though I would not recommend updating an existing game made with the old standard library as there could be conflicts if you happened to create a key in your game that is the same as one I added to the updated library. This is especially true if you have modified standard library tasks or added specific tasks that override standard library tasks that I have modified.
Unfortunately, if you want to work on ADRIFT games with different libraries, you need to have a different user login for each one or else turn off the library auto-updates in the settings.
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby saabie » Mon Dec 31, 2018 5:04 am

The problem with SOCC is that both the updated library and your game modified the "Player Movement" task, causing a conflict.
Deleting the new "Move Character" specific task from the Player Movement folder seems to fix the problem, but I really can't recommend ever upgrading the library for any game that has modified the standard library in any way.

I have not been able to find the problem with the game that wont open at all, I will probably need to add some debugging code to my own runner to see why it doesn't load and that will take time.
In fact both of your sample games crashed my runner :-)
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby Lazzah » Mon Dec 31, 2018 12:50 pm

Hi saabie,

Thanks for that. TBQH I don't know why you added the MOVE PLAYER specific task anyway, the general PLAYER MOVEMENT task has worked perfectly well ever since I have been using ADRIFT.

It is actually very worrying when you say that BOTH the games I sent to you crashed your new runner. Unless you can find out what is causing this crash, if your runner ever became standard then none of my games will run on it! :shock: :cry:

Has any other ADRIFT author tried running their games with the updated standardlibrary? :anyone:
WIP: The Lost Labyrinth of Lazaitch
ALSO AVAILABLE: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run!

COMING SOON: Magnetic Moon, Starship Quest & Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2219
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Updated StandardLibrary

Postby saabie » Mon Dec 31, 2018 2:25 pm

The MOVE PLAYER task was added to fix a bug, something to do with moving while on or in objects I think (I'll look it up in the morning).
SOCC had one odd thing, the map data has a route north from "By Fountain" when there wasn't one, but the ADRIFT runner just ignores it so it is not a problem.
What is crashing my runner with SOCC is a perfectly normal looking command "[open/uncork] [bottle]" which is perfectly OK, so it must be some weird bug in my program that only happens extremely rarely. I'm debugging it now.
DFF wont even load in the developer, so there must be a real incompatibility with my library, possibly something that you changed or deleted in the old standard library that the new one needs.
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby saabie » Thu Jan 03, 2019 12:56 am

The "Move Player" specific task was added to fix this bug report:
#19147 get off objects before moving does not run player movement wrote:IF you tried to move while on an object you would (first get off it) but not do move.
Fixed by making these run-before specific tasks and moving with a run-after.
Also calling a task to do the same if player inside of a container.

I fixed the problems that were preventing your games loading in my runner. (It was infinitely looping if a task contained a 2nd command line identical to the first one but longer and with a space+bracket as first extra characters, or if a command had a / outside of brackets).

The reason DFF does not load in either the developer or ADRIFT runner seems to be that object128 is missing but is being referred to by a task or property.
I can't see why my library library would delete it, but I will keep looking to try to find out what happened.
saabie
 
Posts: 972
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Updated StandardLibrary

Postby medusacadenza » Fri Apr 19, 2019 2:35 pm

Thanks for doing this saabie. Really helpful.
medusacadenza
 
Posts: 2
Joined: Fri Apr 19, 2019 2:29 pm
Location: UK

Previous

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 7 guests