The place to discuss the ADRIFT Interactive Fiction toolkit

Changing scenarios how?

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.

Changing scenarios how?

Postby P/o Prune » Sun May 15, 2016 1:30 pm

What’s the easiest way to do this?
In my game I have two scenarios, one that takes place during the day and another that takes place during the night.
This means that I have a lot of the same locations with different descriptions. Not only that, but there are objects in the day scenario that isn’t there in the night scenario and vice versa.
I could make a variable called Night and then make an alternate description of the locations with the restriction that variable Night must be equal to 1, but how do I handle all the different objects then?
Or I could start all the night scenario locations and objects in location hidden and then swap them with the day scenario when variable Night is equal to 1. Either way, it looks as if I’m in for one H*** of a job.
Any suggestions? (No rocket science, please :wink: )
D-Day V.5 in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 47Kb
User avatar
P/o Prune
Site Admin
Posts: 4282
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: Changing scenarios how?

Postby Jjbee62 » Sun May 15, 2016 2:29 pm

This won't be rocket science, because I'm not entirely certain about this.

Make groups for your rooms, rooms that are affected by day/night and rooms that aren't affected. You can set a property/restriction, for each group, to display a different long or short description. That would allow you to do a generic location description modification, depending on if it is day or night. If you broke your locations up into multiple groups, you could probably handle most of it without an alternate description for every location. Then just have a task which sets whether it is day or night.

You should be able to do the same with object groups, although it's probably more complicated, because you're not just changing a description, you're moving the objects.
Posts: 64
Joined: Fri Apr 15, 2016 5:20 pm

Re: Changing scenarios how?

Postby Lumin » Sun May 15, 2016 3:32 pm


Object groups Night and Day so that all objects that shouldn't be seen can quickly be swept away to Hidden when the sun rises or sets. Placing multiple objects in specific locations when they're supposed to be available is trickier though.

An object property applied to the special objects for each room, maybe? So you can at least tell it to put all day_beach objects or night_graveyard ones in place at once instead of dealing with each individually.
Currently working on: A big fat fantasy CYOA using this sweet map.
User avatar
Posts: 1903
Joined: Fri Aug 06, 2004 5:48 pm
Location: Texas
Points: 34

Re: Changing scenarios how?

Postby DazaKiwi » Mon May 16, 2016 10:43 am

Hey Po.

I have put together a demo with how i would do it, no rocket science here. The demo gives an explanation of what i did in the intro, i did not hide any objects as per say so this is a fake hide method which i think would be easier to work with as hiding objects in large numbers is easy but putting them back to the right locations and also where they were ie. on an object etc would be a nightmare and not possible i don't think. So this method simply hides the mention of the objects that have the property 'Daytime Objects' selected. The Examine Objects task has been modified to accommodate occurrences where a Daytime object has been placed or moved by the player or event etc to a Lights Location where even at night they will display because they are in a lit area.

I did try another variant of this (i wont upload that version as it sort of worked but not well) that added all objects with the property "Daytime Only" to an object group which had a property within it to blank out the description in "What to show when at location" with <!----> for night time but when day time switch is made the original description in those objects in the same "what to show.." gets wiped (is that a bug or no?) Which is a shame as that method would of been less work, ie. not having to create two alt desc for night and day for every object that is going to be hidden at night. I might write that up as a suggestion for Group properties for the future. But i wonder if the <!-- --> was the culprit. I Will have to do more tests to make sure will update later. *update* the comment code <!-- --> which is needed to hide the object being mentioned, if removed in the object group i mentioned will still list the object and still wipe the original text. Putting it back does the job- but when the objects are removed from that group the original desc as mentioned is wiped.

I hope this is what you wanted Po? Although, if you have a lot of objects there would be a lot of manually adding alt desc for day and night and adding a couple of restrictions for them once you modify the Examine objects task.
(17.46 KiB) Downloaded 92 times
User avatar
Posts: 562
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Changing scenarios how?

Postby Lumin » Mon May 16, 2016 5:25 pm

Thanks Daza. In theory I'd have uses for this to so I'll have a look at that file.

One thing I thought of was simply having completely separate room for day and night, but something would have to be done to cover the player dropping objects in one or the other.
Currently working on: A big fat fantasy CYOA using this sweet map.
User avatar
Posts: 1903
Joined: Fri Aug 06, 2004 5:48 pm
Location: Texas
Points: 34

Re: Changing scenarios how?

Postby ElliotM » Mon May 16, 2016 6:25 pm

Either prevent the player from dropping objects at all or only in those areas, or have a lost and found where these objects get moved to at the transition. You'd probably need to give them all a unique property and move them only if they are on the floor or something. Static objects can exist in more than one place. While a player will never be able to move them, I believe any object that is placed on or inside them if they are also a supporter or a container will make them accessible from any location the parent static object is located.
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 6 guests