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:
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2131
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: 922
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:
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2131
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: 4619
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: 922
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Previous

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 5 guests

cron