new user with a question

roger333
Im trying to do make plural items with a quantity displayed with the name (AE: there is 3 coins here.) and be able to pick up x number of them at a time.
i tried making a quantity property and put #coins:quantity# in the object's prefex but it displayed "!" insted of the quantity.
can this be done and how?

Overcat
That can definitely be done. But post your ASL file so we can see what you tried so far - you might be close and just need to change something small.

roger333


I kind of got something to work... mostly, i realy hope there is a better way to do this tho.

ender
Any more thoughts on this? I've been tinkering with doing the same thing ... having come from Inform 7 it seems strange to have objects not auto group ... i.e. I have a room with 3 candles in it ... I'd like to write a custom room description where the object list says something like ... 'a black box, 3 candles, and a jar of batwings' ... I could do this with having a single object called '3 candles' or simply 'candles' with the prefix 3 ... maybe done using a property ... but the player needs to be able to take the candles and use them one by one ... I could write a custom 'take' script for the candles where when the player takes one and it creates a new object called 'candle' to put into the players inventory (or maybe the 'candles' object is a container with 3 seperate candle objects in it or something like that.) ... and then decrease the property/prefix by one ... which would then display '2 candles' in the object list ... the problem is when the player puts the candles down again ... if he drops them all in the same room, its going to go back to the 'a chair, a table, a candle, a candle, and a candle' kind of description ... which is, to say the least, weird sounding. What I really want to be able to happen is after the player picks up each individual candle ... or lets say he collects candles from several rooms ... and then drops them all into the same room ... that the description would automatically 'adjust' ... to say '5 candles' or however many he dropped.... any suggestions on how to do this? maybe adjust the 'drop' command so that if the player drops an object and another with the same alias is in the room, that it hides one and labels the other one as plural or something? maybe auto create a 'plural' version of the objects? this seems very cumbersome ... I'd think that some kind of modification to the list objects procedure would be better ... does anyone know of a working example I could look at? Thanks.

Freak
The short answer is that Quest just isn't anywhere near as powerful as Inform.

Wonderjudge
I think I have come up with a solution. Check out the test game I have put here. To take 1 coin the player types in take coin to take all the coins he (or she) types take coins.
You could also implement some sort of question for if the player types take coin that it ask them how many.
Wonderjudge.

ender
Thanks for the solution wonderjudge, I'll check it out ... although, my main problem is with people dropping the objects later on and them regrouping into a plural form ... I think the solution is a modified room/list description ... I'll keep tinkering with the problem, but its low priority for me. Its not essential as "a candle, a candle, and a candle" works ... its just sounds idiotic.

Freak, I'm not sure I agree. Certainly this system has less of that stuff built in than inform ... but I've managed to successfully duplicate most of my favorite features from inform such as regions, devices, and lit/unlit rooms. The scripting language here can do a lot of the things any programming language can do, so for the most part I suspect most of the same results can be accomplished ... it just might take some problem solving. (obviously, there are limits ... there is a lot of gui editing we can't do ... but Inform is really limited there to ... Glux is a huge pain to work with and still has its limits.)

The key is to think outside the box ... for instance, I have a working prototype of Events similar to Adrift ... but I use objects to store my event data ... Ultimately, I think this system ... because of its scripting functionality ... is more powerful than Inform ... just not as easy to use... I think its a good middle ground between Inform and TADS which is one of the reasons I'm using it. (I also like the in game interface ... which would be nearly impossible to do in Inform and possible in TADS but a pain in the butt) I'd like to see some options added to the interface ... such as the ability to customize the windows ... maybe move them or replace them ... for some things, I'd like to ditch the compass ... and I'd like to be able to put an 'image' block in the right hand column so I could have an image of the 'room' thats not in a popup window but doesn't scroll away either ... but overall, I'm happy with quest.

Freak
Regions and devices are pretty simple things, so I'm sure those can be duplicated.

As for lit / unlit rooms, does your model correctly handle minor things like:
- examining things when the room is dark (should give an appropriate fail message)
- possibly blocking the player from taking things from the floor in the dark (won't know where they are)
Or major things like:
- if the player puts the light source in a container, does the room remain lit?
- if the player then closes the container, does the room go dark?

Quest lacks local variables and has only global variables, making recursive algorithms difficult to work with.
Quest's function / procedure calls are fundamentally based on string interpolation, and can break horribly if a variable contains a semicolon or dollar signs.

More powerful than Inform? You don't know what you're talking about. I challenge you. Tell me what you think Quest can do that can't be done in I7.

Try duplicating the white cubes from Balances (or even the whole game). (Though this was done in Inform 6, it can be ported to Inform 7 if need be.)
http://wurb.com/if/game/28

(The game has a number of featureless white cubes and a burin. The player can write something on a cube, and afterwards refer to it by the word written on it.
> WRITE PENGUIN ON CUBE
> GIVE PENGUIN CUBE TO MAN

Wonderjudge
I actually didn't use an object to do this i used variables. The amount of coins you have appears as a status variable instead of an object.
Wonderjudge

Alex
(I've moved the Quest 5.0 discussion that stemmed from this post to here: viewtopic.php?f=10&t=2217)

Freak
Since I'm not authorized to read or post there, I'll have to shut up, then.

Alex
Doh. Everybody should be able to access this now...

ender
I hadn't really realized a 'quest 5.0' conversation had evolved out of this...

Since this is a direct response to the previous post by Freak, I'll keep it here.

My light model does all those things ... but thats all extreamly easy to code. Infact the lit/unlit model was one of the least difficult things I've tried to setup. Its more a matter of thinking of all the things you want people to be able to do or not do... the biggest weakness in it, is since it has to use a lot of custom commands (open, look, examine, etc.) that its automatically overridden when object specific scripted commands are applied. I've written some work arounds to let me script without breaking things in my work ... but if I release the library other people would probably break it right and left.

As for the power comparison between the two softwares. I think the glux offers more graphics power if you want to spend the time to learn it.

Your little description of write penguin on cube and give penguin cube to man doesn't sound that diffcult to me. I'll see what I can do the next time I have a block of time to work on something - maybe I can do it, but maybe I can't. We'll have to see.

The global variables is definately a weird feature ... although it has its value. I'm professionally a Javascript/PHP programmer ... and I try to avoid global variables in PHP if at all possible so its hard to think in a language that uses globals exclusively. But it also means you don't have to actually USE the parameter feature if you assign the variables globaly before you call the procedure.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums