ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

My Question and Answer topic

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.

My Question and Answer topic

Postby MOGz » Thu Oct 17, 2019 4:02 am

Ok, so giving it some thought, while my last two topics were really specific and very broad scope, I am coming up with a running list of minor questions and queries that I can't seem to *easily* find the answer to (I am sure the answers are out there, but sifting through topics that don't seem to answer the subjects I am putting into the search engine seems a bit slow and tedious) and figured I would better serve myself AND the board by not spamming a ton of questions and instead put them all in one place. Hopefully I can get some answers, and as things come up I will ask more (Hopefully they will help others too).

So, for now just let me run through a few of the silly questions I have accrued so far:

1) About [//s] in Text Boxes
What the heck does [//s] do? I have seen it come up contextually, but I haven't been able to see how it is used or get function out of it. It seems like something that isn't really well explained in the few areas I do look for it.

2) "Her" (No Female) Conversation Issue
I keep having a "her" and "him" issue in the runner (mostly her), where I refer to a character to test stuff, and even though I am *in* conversation, have referred to said character, and said character matches gender, I am having a return message saying (no female). I did see a topic that explained how to fix this (or explained why it happens) but I can't seem to find it, and I am not sure if it would even fix the problem. Help?

3) About Variable Key usage?
Is there a way to refer to a variable key in a text box? I have come across two very very obscure scenarios where I think it would have helped to do so rather than do %variable%, but I can't seem to find a way to refer to the key directly. One instance was to see if I could display a full list of an array...display it's contents in the runner with a task. Not sure if this is possible, but as I said, I thought it could be useful. *shrug*

4) How to display Text of a Value Property?
In a similar vein to the last one, I *have* wanted to display the TEXT of a Value Property (like weight). When using the property, it shows value on one side, and a text value on the other side. The numeric value is super useful for a variety of things I have been tinkering with, but I have had on various occasions thought "man, this would be great to be able to display the text as well." Can't seem to find a way. Although thinking about it, I will probably just look to see if anything in the Standard Library references weight like this. But if there is a super obvious way, let me know.

That should be it for now. As I said, I will just post more Q's here if they come up...hopefully fewer instances than more, but anyone new can benefit from these questions, as I said. Thanks for all the help with my questions so far everyone!
Last edited by MOGz on Thu Oct 17, 2019 7:48 pm, edited 2 times in total.
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby R2T1 » Thu Oct 17, 2019 4:17 am

Actually for others to benefit, it would be best to separate these into their own unique topic.
A) the topics would be more easily be seen/found.
B) Each answer would then be "tied" to its own question allowing for each topic/question to be seen in their own light.
C) With unique headings, it helps newbies to better understand as well as allow for people to see whether or not a particular question has been answered.

Lumping them all together just makes a bigger mess of things. Separate questions with appropriate headings is the way to go. If you want to be able to find them later, I suggest you add your username in brackets at the end of the topic heading.

Just my preferences after many frustrated searches :x in this and other fora for information.
cheers :)
User avatar
R2T1
 
Posts: 122
Joined: Thu Dec 20, 2012 10:41 am
Location: Sydney, Australia
Points: 13

Re: My Question and Answer topic

Postby Lumin » Thu Oct 17, 2019 11:53 am

For that last one, couldn't you just store weight as a variable and use %NumberAsText[%weight%]% ?
User avatar
Lumin
 
Posts: 2031
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: My Question and Answer topic

Postby DazaKiwi » Thu Oct 17, 2019 6:19 pm

MOGz may i suggest to either number your questions or ABC them so that it is easier to give answers to the specific questions especially when you have a lot of them and if you end up adding more to the thread later. Also makes it easier for other new drifters who might return to this thread a few times to remember or look up the answers etc.
User avatar
DazaKiwi
 
Posts: 659
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: My Question and Answer topic

Postby MOGz » Thu Oct 17, 2019 7:05 pm

Fixed for the numbering. I also bolded the text as a header and gave a general overview of what the question is, with the hopeful intent of the topic being picked up easier by a search of this forum. When I search it seems to search for text in a thread, not for the subject directly, so this should also address R2T1's concern. If I get answers I may decide to copy/paste compile them under the original query so that the answer is right in the post.

@Lumin I thought that only returned the text version of a number, so if the property value of weight was stored, because it calls the number (not text), it will just return the number when called, and NumberAsText would just return "nine" instead of "9", and wouldn't return the text from the value (which I think is "light" in that case)
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby saabie » Fri Oct 18, 2019 6:12 am

1) The square brackets in text boxes sets alternate output that depends on the "Player perspective" setting in the "Options" for the game.
[First person/Second person/Third person]
So you could have text like: [I am/you are/fred is]
The commonly seen [//s] is usually after a word that only needs an s after it in third-person perspective mode, eg:
%CharacterName% take[//s] the %object%.Name
Which will give:
1st person: "I take the cake"
2nd person "You take the cake"
3rd person "Fred takes the cake"
This is usually only used by people writing libraries, as people writing a game usually decide on the player perspective when they start and don't need to be able to change it.

2) I have not seen this error. Perhaps you could post a test game that shows this happening.

3) You can't display a variable's name or key, but you can display the contents of an array.
First create a general task with a command like: "#DisplayArrayElement %number%"
Its message to display should be: "%MyArray[%number%]%" (Using the name of your actual array)
Note that you must go to the advanced tab and un-tick the "Aggregate output where possible" option!
Now open the task where you want to print the array and add a new task action, ticking the box marked "i need a loop".
Put a 1 in the left for-loop box, and the size of your array in the right box.
Select "Run task" and the name of the new task we created above.
Click the "Params" button and enter "%Loop%".

4) There is currently no way to print the text in a value property. There is an enhancement request (#18756) asking for this.
To print text depending on a range of values for size or weight you would need to use IF expressions or a series of alternate descriptions.
saabie
 
Posts: 992
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: My Question and Answer topic

Postby Lumin » Fri Oct 18, 2019 12:07 pm

I feel like I learn something new every time saabie posts.
User avatar
Lumin
 
Posts: 2031
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: My Question and Answer topic

Postby MOGz » Mon Oct 28, 2019 9:13 pm

Got a new question!

5) Using Objects Objects as Houses or Vehicles (Going Into Objects)
So I think I saw this topic somewhere, but can't seem to find it using a search. So, may as well post it to the thread. I am wondering how useful the ability to enter objects is, and exactly how they can be used in such a capacity. Like, I imagine that this is done more for creating vehicles, but rather than creating a whole new room location, could I create an object to be used as a house or a shop? Is it more efficient, or a rarely used option?

The whole notion of it seems like it could be useful, and I think there are certainly places I could make use of it, but I want to know if there is a certain process for doing it correctly.
I guess a few sub questions are:
-If used as a vehicle, how does a player enter said vehicle, then move to a location, then step out? Or say there is a list of destinations, how would you move the player to those destinations from inside the vehicle?
-If used as a building, can you create NPC's or dynamic/static objects found inside the object, and then does it essentially function just like a location would contextually?

I am wanting to potentially minimize the need to create a bazillion locations that are just appendages to another location, serving as a house or building. For me that seems like a way to end up with a mapping nightmare, both for creating as well as for playing. Also, having a command like "Go into %object% (house)" seems to alleviate some NSEW directional constraints (only 8 cardinal directions to choose from isn't a lot for some areas), and can even serve as subrooms in a house as a possibility (Like having a "Kitchen" object that can be added to any location in a location group...that way every house can have a kitchen without me needing to create one for each location).

So anyway, hopefully this question can be sorted out. I may tinker a bit to see if I can figure it out on my own.
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby MOGz » Mon Oct 28, 2019 9:46 pm

ok, so, having done a quick test, I see that generally all the things I just asked are possible, BUT there are a few problems in doing so:

Going inside an object does not stop you from being counted in a location, so say I am in a shop (object), and I then decide to move NSEW to another location, it overrides the fact that I am in the shop (object) and moves me directly into another location. Also, adjacent rooms are a bit wonky as well. I think I could use a specific task to override the movement if the player is inside an object, but I haven't gotten to that yet, but if anyone has the time or insight here that would be much appreciated. Also, I tried putting an object inside a location group (this is so I can create shops that could be placed in a variety of locales without having to create just as many objects as I would otherwise have to make for locations). The problem is that when exiting the building that is in the location group, it seems to deposit me in a raondom location that is within the location group. Obviously that isn't ok, because if I am in Location A I want to exit the building in Location A, not in Location D. Anyone know how to fix this?
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby saabie » Tue Oct 29, 2019 4:02 am

Trying to use an object as a location doesn't really work. In fact being inside of a container at all can take a lot of work to get all of the possible interactions to work the way you want them to.
If I need to do anything complex inside the object such as interacting with an NPC then I usually move the player to a separate "inside object" location as soon as they enter the object.
-If used as a vehicle, how does a player enter said vehicle, then move to a location, then step out? Or say there is a list of destinations, how would you move the player to those destinations from inside the vehicle?

When I use an enclosed vehicle I usually switch the player to a separate map page that represents the locations that they can drive to, and move both the player and vehicle object back to the main map when they go out from a location on this map.
-If used as a building, can you create NPC's or dynamic/static objects found inside the object, and then does it essentially function just like a location would contextually?

No, it does not. The player is still considered to be in the location as well as being inside the object. You can take objects outside of the object unless it is closed, and the player is always considered to be in the location by "Look".
I am wanting to potentially minimize the need to create a bazillion locations that are just appendages to another location, serving as a house or building. For me that seems like a way to end up with a mapping nightmare, both for creating as well as for playing.

As long as you use a separate map page for the interior of each building, and use IN and OUT to switch maps, then there should be no problem drawing the maps.
Each floor of a building should also be a separate map, using UP and DOWN directions to move between them.
It is faster to draw the locations directly onto the map than to setup objects in the right locations and deal with all the problems this method would create.

"Go into %object% (house)" seems to alleviate some NSEW directional constraints (only 8 cardinal directions to choose from isn't a lot for some areas)

This is not true. You can go in, out, up and down from one location to another.
and can even serve as subrooms in a house as a possibility (Like having a "Kitchen" object that can be added to any location in a location group...that way every house can have a kitchen without me needing to create one for each location).

Location groups let you do this: On the properties page you can set short and long descriptions that are the same for every kitchen, and you can add static objects that appear the same in every kitchen.
Also, I tried putting an object inside a location group (this is so I can create shops that could be placed in a variety of locales without having to create just as many objects as I would otherwise have to make for locations).

You can make a single shop on a separate map and have it accessible from multiple locations. To do this, first add all of the locations with shops to a "shops" location group and then create a task that overrides movement in the "IN" direction for locations in that group. This task needs to first copy the current location into a new "Location" property of the player character, and then move the player to the shop location.
When leaving the shop, override the OUT direction to take the player back to the location recorded in the property.
saabie
 
Posts: 992
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: My Question and Answer topic

Postby The0didactus » Tue Oct 29, 2019 10:24 am

I support Saabie's suggestion of having a separate "driving" map.

I'm currently struggling with this exact implementation with a game I'm working on where you sail a ship to strange locations. The best solution I've found is to make an object that exists on the "local" map called like "your ship" (or your car), make a second object that exists on the "world" map called "your ship(world) or something.

*you make a special command "board" that can only be done in the same place as "your ship"

* the "board" command moves you to the same location as "your ship(world)"

* you sail around until you "land" (you need to make a different "land" command for every location you'd "land"

* at which point the game places "your ship(world)" in whatever new location you are, and moves you to that landing location.
The0didactus
 
Posts: 251
Joined: Sun Mar 30, 2014 8:20 pm
Points: 105

Re: My Question and Answer topic

Postby The0didactus » Tue Oct 29, 2019 6:27 pm

I should also say: The "in/out" "up/down" commands are invaluable and really key to making a good clean map. I agree with Saabie that in almost every instance "in/out" and "up/down" should take the player to a new "page" of maps. I generally dislike making "one room buildings" but that's a personal preference: I dislike static adjunct locations that do nothing except facilitate movement from one place to another, so it makes little sense to me to have a "mansion (exterior)" and a "mansion (interior)" room, unless there are specific things you want done at each location...but that's just a personal preference, and not one I adhere to perfectly myself.

That said most of my games don't exist in readily mappable space anyway so maybe I shouldn't comment.
The0didactus
 
Posts: 251
Joined: Sun Mar 30, 2014 8:20 pm
Points: 105

Re: My Question and Answer topic

Postby MOGz » Tue Oct 29, 2019 9:45 pm

You can make a single shop on a separate map and have it accessible from multiple locations. To do this, first add all of the locations with shops to a "shops" location group and then create a task that overrides movement in the "IN" direction for locations in that group. This task needs to first copy the current location into a new "Location" property of the player character, and then move the player to the shop location.
When leaving the shop, override the OUT direction to take the player back to the location recorded in the property.


So thanks for the responses saabie. I am still tinkering with the objects-as-buildings idea but see that there is certainly value to what you are saying (I am running into a few logistical issues, but none that seem insurmountable so far. I tend to do something exhaustively for the sake of trying even when it may seem counter intuitive). However, I am curious about what you mean by having a location property to store the current location for the character. I did a bit of a test on this and A) There seems to already be a property that does this ("at which location"), however B) I can't find a way create a new property to store a prior location, or for that matter use that property to move a character from a new location back to the stored location.

In particular, any task I create in trying to do this does not have an action that I can see which calls that info and moves the character to it. Location property actions move a character to specific locations, and character property actions do not seem to call that info either.

is there an example that could be presented on how this is done?
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby MOGz » Tue Oct 29, 2019 11:18 pm

Given my query and the discussion, I have essentially made up a mock example of what I have done to lay some potential groundwork for implementing the idea. Even if using locations for their intended purpose *is* the better choice here, I like to have options in my bag. This is what I came up with.

The vehicle idea was easy enough to implement for this mock up, though a more complex one like making a boat that travels around a lot would be more difficult. I didn't tinker much in the way of vehicles for this, it just ended up still being there when I finished up the test file. It is still clunky, I am sure, but it is functional.
Attachments
Object as Buildings.taf
An example of objects as buildings
(19.4 KiB) Downloaded 15 times
MOGz
 
Posts: 23
Joined: Sat Oct 12, 2019 11:41 pm

Re: My Question and Answer topic

Postby DazaKiwi » Wed Oct 30, 2019 8:01 pm

I have experimented with using objects as buildings too in the past, mainly to have many buildings in one location. But it is more work obviously with having to use variables to track things. I had one building with ten floors. And each floor the player moves up to, it would list rooms that they can go into that has a purpose which they do so with a command. Of course you could do this at a location without objects and just use variables.

I also experimented for one game i start on but haven't gone back to, where i was using object huts that the player could climb up on the roof and get inside that way and jump to another roof etc.
User avatar
DazaKiwi
 
Posts: 659
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Next

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 5 guests

cron