Newbie questions: "Remove all" / Space suit restrictions.

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.
Post Reply
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Newbie questions: "Remove all" / Space suit restrictions.

Post by Ophelia »

Hello. I am an Adrift newbie, and will have lots of newbie questions!

- I have items with the property "breathable" (Helmet, boots, spacesuit).
- How would I ensure "breathable" items cannot be removed in a location that is part of the group "No oxygen", returning a "You can't remove those here, there's no oxygen!" response?
- How would I model this on an airlock door, so that it cannot be opened unless you have all three elements?

I initially tried monkeying around with task restrictions in "the Remove" task, and got the right response, but in addition, I was getting other, static items in the location, such as "You can't remove airlock door. You can't remove the vastness of space." following it. :?

Any ideas where I might be going wrong, or how best to model this?

Thanks!
User avatar
Lumin
Posts: 2362
Joined: Fri Aug 06, 2004 6:48 pm
Points: 59

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Lumin »

Hello and welcome! Sounds like an interesting game, I love sci fi.

If no one else can assist in the meantime I'll set up a demo once I get out of work. I think I know what you're doing (probably just not specifying the specific object to override the removal task for) but I have a hard time explaining this stuff without Adrift open in front of me.

Was that you that popped into the Discord earlier?
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Denk »

Ophelia wrote: Fri Jun 04, 2021 9:12 am Hello. I am an Adrift newbie, and will have lots of newbie questions!

- I have items with the property "breathable" (Helmet, boots, spacesuit).
- How would I ensure "breathable" items cannot be removed in a location that is part of the group "No oxygen", returning a "You can't remove those here, there's no oxygen!" response?
- How would I model this on an airlock door, so that it cannot be opened unless you have all three elements?

I initially tried monkeying around with task restrictions in "the Remove" task, and got the right response, but in addition, I was getting other, static items in the location, such as "You can't remove airlock door. You can't remove the vastness of space." following it. :?

Any ideas where I might be going wrong, or how best to model this?

Thanks!
One of the fastest ways of getting up to speed with ADRIFT is to attach an example (taf-file), so we can tell you exactly what is wrong. You can have good reasons for not uploading your game, but it should be possible to make a small demo where you try to apply the same techniques. Often, by doing so, you will find out what you did wrong.

Apparently, what you describe should be doable with restrictions. For instance, you may override OPEN AIRLOCK DOOR with a specific task having the right restrictions. However, keep in mind that there is a big difference between having restriction messages and not to have them. If ADRIFT encounters a restriction message when the restriction is not fulfilled, that message will be printed. But if there is no restriction message, ADRIFT will look for another task where restrictions are fulfilled.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Ophelia »

Thanks for the advice. (Yes, I popped into the Discord, briefly.)

My original test case was a bit of a mess, so I tried to remake it, but that's not working much better!
- Now I am getting a "You can't see any airlocks" message when you are wearing "Breathable" items.
- Earlier, was still getting the "You can't remove the vastness of space" message.

I've attached the .taf file, which is currently only bare-bones.
Attachments
Spacesuit-test.taf
(19.98 KiB) Downloaded 6 times
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Denk »

Ophelia wrote: Sun Jun 06, 2021 5:30 pm My original test case was a bit of a mess, so I tried to remake it, but that's not working much better!
- Now I am getting a "You can't see any airlocks" message when you are wearing "Breathable" items.
- Earlier, was still getting the "You can't remove the vastness of space" message.
I found the problem. In the "wear objects"-task, you have added the action:
[Move][Everything with property][At location][Airlock][to worn by][The Player Character]

I am not sure what you are trying to do with this action. As it is, it moves every(!) object in the airlock location to worn by the player character. Some of the objects are not dynamic objects but static (the airlocks) and this action will make them disappear.

If you simply delete this action, everything seems to work. But you probably had a reason for applying that action. If you explain why we might be able to propose another solution.

A few other details I noted:
1. When you override a library task, e.g. your task "Open Outer Airlock", the task will only run if the restrictions of the parent task (open objects) are fulfilled. The parent task always checks if the object is present. As the airlock is always in the same locations, you don't have to check the player's location in your overriding task. Nor do you need to check that the outer airlock has been seen by the player.
2. You want the outer airlock to be openable both in the airlock location and in space. Thus, the outer airlock position should not be set to "single location" but "Location group" and the group should be "Between Airlock and Space". Only static objects can be in multiple locations.
3. I recommend adding more nouns to the airlock objects. Especially as the airlock is a location, isn't it then airlock DOORS you are opening, not the airlocks? (could be my limited english though). So extra nouns such as "outer door" "airlock door" etc. I personally like to add adjectives as nouns, so the player can simply type OPEN OUTER or OPEN INNER. That's just my preference.

Once you get the hang of it, it will become much easier, so don't give up :)
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Ophelia »

That has fixed all the problems with the doors, thank-you!
That's much smoother.

Now I am just getting the "remove all" problem - but only in the space location, suggesting it is to do with my "group:no oxygen" restriction.
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Ophelia »

Similarly, is there a way to do "wear all" - so that it looks for wearable items in the location, gets them, then wears them?
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Denk »

I attach a modified version of your demo, which solves both problems below:
Ophelia wrote: Mon Jun 07, 2021 9:01 am Now I am just getting the "remove all" problem - but only in the space location, suggesting it is to do with my "group:no oxygen" restriction.
This is actually a bug in the library. However, it is quite easy to fix (when you know how :) ). ADRIFT thinks that you are trying to remove all visible objects and mentions them therefore. If you open up the task "Remove objects" and go to the pane "Advanced". Here is a big text field (If task fails and input references "all", display this...). Here you can put your message when the player has typed "remove all" while some of the objects cannot be removed. In the attached demo, I have three descriptions (default + 2 alternatives). Default is set to "You can't." but will probably never be shown. In case of no oxygen locations: "You don't want to remove anything in space.". And if you are wearing nothing: "You are not wearing anything."
Ophelia wrote: Mon Jun 07, 2021 9:01 am Similarly, is there a way to do "wear all" - so that it looks for wearable items in the location, gets them, then wears them?
Yes, it can be done in many ways. In the demo I made a "run before"-task, which picks up visible, wearable items, if you try to wear them (e.g. using "all"). It required that I removed the last restriction in the "wear objects"-task, which said that I had to be holding the object. If the parent task restrictions are not fulfilled, the related specific tasks will not run either, in this case, the task I made "Pick up before" has to run when the objects are not held. This is why I removed the last restriction in the "wear objects"-task.
Spacesuit-test - Denk1.taf
(20.17 KiB) Downloaded 5 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Re: Newbie questions: "Remove all" / Space suit restrictions.

Post by Ophelia »

Thanks for the help! I will investigate.
Post Reply