Carrying the Cat

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

Carrying the Cat

Post by Ophelia »

Hello. More newbie questions?

Should I model animals as characters or objects? (My guess is, both.)

If I want a cat that can wander randomly around a group of locations and be interactable, but also be picked up by the player, is there a smoother way to do this than creating a character, then creating tasks for "[get/pick up] {the} cat" and "[drop/put down] {the} cat" that removes/adds the character from that location, and adds/removes an item "cat" to the inventory?
User avatar
Lumin
Posts: 2362
Joined: Fri Aug 06, 2004 6:48 pm
Points: 59

Re: Carrying the Cat

Post by Lumin »

I know it doesn't address the main question, but you can use a Specific task instead of a General one to avoid having to cover all the possible synonyms for picking up the cat just fyi.

A task that swaps them out the way you described is probably the most straightforward, but there's usually multiple ways to do anything in Adrift. It's all just text based smoke and mirrors at the end of the day.
User avatar
BattleoftheBased
Posts: 24
Joined: Sun Mar 28, 2021 4:56 pm
Points: 15
Location: your left nostril
Contact:

Re: Carrying the Cat

Post by BattleoftheBased »

Percentage chance to flip a variable switch that shows the cat doing something every time you enter a new room, and shuts it off when you leave. When the switch is on, the cat can be picked up; picking up the cat cancels the variable check and moves object A Cat from Hidden into your arms. Dropping the cat reactivates the system.


Or just do what you were doing because I just made that as complicated as possible, lol.
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Carrying the Cat

Post by Denk »

Saabie had begun work on picking up characters in his library but the latest unfinished version is from October 2020. As I have based the Combined Library on that version, remnants of it are still present in the Combined Library, though by default you cannot pick up characters. If you select the property "Player can pick up this character", the character can be picked up. However, hardly anything is implemented. You cannot drop it, and if you examine yourself or type "inventory" the cat isn't mentioned. But it might provide some inspiration. You can look at the attached demo in the folder "Standard Library"->"Give, Take and Drop" and look at the tasks "Take character" and "Taking character" as well as the related properties.
CarryCat.taf
(30.63 KiB) Downloaded 6 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Carrying the Cat

Post by Denk »

Ophelia wrote: Fri Jun 04, 2021 9:30 am Hello. More newbie questions?

Should I model animals as characters or objects? (My guess is, both.)

If I want a cat that can wander randomly around a group of locations and be interactable, but also be picked up by the player, is there a smoother way to do this than creating a character, then creating tasks for "[get/pick up] {the} cat" and "[drop/put down] {the} cat" that removes/adds the character from that location, and adds/removes an item "cat" to the inventory?
My previous post might have been a too-hard approach for someone new to ADRIFT.

Off the top of my head, I would make a GET/TAKE %CHARACTER% task. It is a good idea to try to make such a task from scratch. If you do so, a couple of restrictions will be created automatically, so you get right responses if the character isn't present etc. The default task could simply say something like "You can't pick up %character%.Name." Then you override the task for your cat character and replace the cat character with a held cat object.
----------------------------------------------------------------------
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: Carrying the Cat

Post by Ophelia »

This is really helpful, thank-you. I will have a play with these and see how far I get. :)

- Related question: How can I make a character exist at all locations? (Talking to God, or in this case, the ship's AI.) What about all locations in a certain group, or with a certain property, such as "Powered"?
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Carrying the Cat

Post by Denk »

Ophelia wrote: Sun Jun 06, 2021 5:32 pm - Related question: How can I make a character exist at all locations? (Talking to God, or in this case, the ship's AI.) What about all locations in a certain group, or with a certain property, such as "Powered"?
You cannot make a character exist in more than one location. However, you could either implement your "character" as a static object, as static objects can be in more locations than one, or you could have a task run every turn, which moves the character to the same location as the player. This can be done with a 1-turn event that restarts every turn.

EDIT: You can also make a hybrid, e.g. only the static "character"-object is present so if the player examine or push the character etc, you get "object"-responses but the conversation-tasks can be modified so you can talk to the character in all locations.

If you need more help, just ask.
----------------------------------------------------------------------
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: Carrying the Cat

Post by Ophelia »

I think I was edging towards the 1-turn event fix for this one. Does it need a control if it starts off active?
User avatar
Denk
Posts: 907
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Carrying the Cat

Post by Denk »

Ophelia wrote: Mon Jun 07, 2021 9:07 am I think I was edging towards the 1-turn event fix for this one. Does it need a control if it starts off active?
No, if it is set to start immediately it should be fine.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Lumin
Posts: 2362
Joined: Fri Aug 06, 2004 6:48 pm
Points: 59

Re: Carrying the Cat

Post by Lumin »

Is there a reason they need to be a character specifically, rather than a response to a task?
User avatar
Ophelia
Posts: 10
Joined: Mon May 31, 2021 3:24 pm
Points: 10

Re: Carrying the Cat

Post by Ophelia »

Not necessarily. I wanted it to wander around a group of locations randomly, and potentially for the character to be able to have rubber-duck style conversation options with it, but there's a good chance everything I want could be achieved just through objects and tasks-response, as you say.
I also want it to look and feel like the other characters in the scenes, so was thinking it should behave in the same way? I shall ponder more.
User avatar
DazaKiwi
Posts: 835
Joined: Thu Oct 21, 2010 10:05 am
Points: 71
Location: New Zealand

Re: Carrying the Cat

Post by DazaKiwi »

Another way for talking to a character anywhere is to create a selection char property like "Can talk from anywhere" and in the conversation tasks in restriction add at the bottom OR Character must have property "Can talk from anywhere". I have done this before and is really handy if you have a radio/phone mechanic in the game or Ai.

I made a quick demo. The Ai is hidden btw.
Attachments
LongDistDemo_v1.taf
(15.11 KiB) Downloaded 3 times
User avatar
P/o Prune
Site Admin
Posts: 4901
Joined: Mon Jun 24, 2002 9:18 am
Points: 168
Location: Denmark

Re: Carrying the Cat

Post by P/o Prune »

DazaKiwi wrote: Thu Jul 15, 2021 12:06 am Another way for talking to a character anywhere is to create a selection char property like "Can talk from anywhere" and in the conversation tasks in restriction add at the bottom OR Character must have property "Can talk from anywhere". I have done this before and is really handy if you have a radio/phone mechanic in the game or Ai.

I made a quick demo. The Ai is hidden btw.
This is really interesting. Something I can see being used quite a lot. Good work. :bravo:
D-Day in progress 86Kb (Slowly drifting)
October 31st: 111Kb (possible entry for the parser Comp 2021 :wink: )
Post Reply