ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is there a way to show long desc without short desc with it?

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.

Is there a way to show long desc without short desc with it?

Postby DazaKiwi » Tue May 08, 2018 3:24 am

adrift Code: Select all
%Player%.Location.LocationTo(%direction%).Description
shows the short desc first above it. I would like just to have long description, if it is possible.

The alternative is making a text property and putting the description in there and pointing to that, but that's extra work if you have a lot of locations.
User avatar
DazaKiwi
 
Posts: 530
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Is there a way to show long desc without short desc with

Postby ElliotM » Tue May 08, 2018 4:12 am

Have you tried putting that code in the Location Long Description in a Location Group? I believe it will override normal long descriptions, so it would be a convenient place to have your code in one place.

*Edit* To clarify, this is what I would do if I were moving the LD into a custom property and wanted all Long Descriptions to point to this custom property.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Is there a way to show long desc without short desc with

Postby ElliotM » Tue May 08, 2018 4:46 am

LongDescriptionGroup.taf
Not sure what you are going for, but here is an example of using Groups to 'override' and consolidate some 'code'.
(15.02 KiB) Downloaded 31 times


The above approach isn't perfect and there a few things I am doing by hand. If you're doing a custom look task, you won't have to use the Exits text property I used.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Is there a way to show long desc without short desc with

Postby DazaKiwi » Tue May 08, 2018 6:20 am

Thanks for your reply and demo ElliotM. I had made a basic custom look direction task. I did consider location group properties, but i didn't think of using them exclusively so when it comes to writing a location description just put it in the custom text of location property only and ignore the default description, simple. I don't know why i didn't think of that hehe. It might not be too late to implement this into my current game because i haven't written location descriptions yet.

So thanks again for your idea. :)
User avatar
DazaKiwi
 
Posts: 530
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Is there a way to show long desc without short desc with

Postby ElliotM » Tue May 08, 2018 9:43 am

You're welcome, I hope you find good uses for this trick. I think group properties are under used for the most part but they do have some object-oriented advantages such as inheritance. Inheritance in object-oriented programing means that you write something once then every object that inherites from the original will have the same universal code. This is why I changed the way in which long descriptions were displayed in this demo, so that they would all behave the same way. Seemed also the cleanest way I could think of to separate the short and long descriptions so that you wouldn't have to repeat things in more than one place.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Is there a way to show long desc without short desc with

Postby DazaKiwi » Tue May 08, 2018 9:46 pm

From time to time i have use group properties. But it completely slipped my mind with my problem. But in a recent demo i made http://forum.adrift.co/viewtopic.php?f=14&t=11894&p=104633#p104633 i used it to fix the renaming short location problem.
User avatar
DazaKiwi
 
Posts: 530
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 6 guests