Sticking things on things

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
Posts: 307
Joined: Sun Mar 30, 2014 9:20 pm
Points: 150

Sticking things on things

Post by The0didactus »


Given that COVID might cancel bar exams, I might actually be able to make an ADRIFT entry for IFComp after all.I have an idea for a kind of absurdist puzzle-parser that will hopefully get around a lot of the "guess the verb" issues that plague puzzle parsers with a very limited vocabulary of words that are not common in IF games.

I can imagine a few ways to handle the rough idea, but I want to know what people here think. Broadly, my question is: how to I handle attaching arbitrary objects to other objects?

I want it to be the case that there are 20 or so dynamic objects (an oxygen tank, a fuse, a lighter, a TV dinner, a uranium slug, a stick of dynamite, a submarine sandwich, etc) and a great number of static objects you can "attach" any dynamic object to (a space suit, a fusebox, a reactor, etc)

So attaching the uranium slug to the nuclear reactor gets you a nice working reactor, but attaching the submarine sandwich just leads to an irradiated sandwich. Attaching the stick of dynamite to the fuse box creates predictable and beautiful results).

Currently my plan to do this is just to rework the "put [x] in [y]" command, and make all the static objects that can carry attachments. Will this work?
User avatar
Posts: 782
Joined: Mon Feb 22, 2016 6:21 pm
Points: 291
Location: Hjørring, Denmark

Re: Sticking things on things

Post by Denk »

The0didactus wrote:Currently my plan to do this is just to rework the "put [x] in [y]" command, and make all the static objects that can carry attachments. Will this work?
It can certainly be done in many ways. The best way probably depends on what else your game needs. By reworking the "put [x] in [y]" command, I think you mean you want to utilize the existing PUT-task, so that technically the attached objects are inside the objects and you will just make sure that it is expressed differently, e.g. "Inside the box is a coin." could be changed to "A coin is attached to the box." ?

That would be an advantage if you intend to move the parent object around, as the "attached" object then always will follow the parent object (e.g. the box in the above example). But then you would have to make all the parent objects containers and that could be a problem if one of the parent objects is a real container, e.g. a basket. It can definitely be done, but might not be that easy to avoid all problems.

Perhaps reworking the "put [x] ON [y]"-task would be slightly better but causes most of the same problems as the above.

I think I would go for a new "Attach %object1% to %object2%", especially as you say that you can only attach objects to static objects, which normally don't move around, but if they do, you will have to move the attached object with them. You will probably have to give the objects an "attached"-property so you can always check it to see which object another object is attached to.

In any case, it is certainly doable but requires a bit of work.
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
Post Reply