object verb cache has corrupted my "look ats"?

calvatroid
Hi fellow text adventurers,

Recently I did something a bit silly (for what I thought was a good reason at the time):

I added "look at; examine; x" to an objects verb list (a "substance" I wanted the player to realise was blood upon looking at it). Later I realised a better way of achieving what I wanted and so I deleted it.

But since then, whenever I "look at" any object in my game, I get "you cannot look at; examine; x that"!

Is there something I can do about this? I've noticed that "look at; examine; x" is still in what I'd call my verb cache (i.e. it becomes available in the dropdown when I type in "look" as an object verb). Can I remove this cached entry? Have I done something wrong? Or is this a bug?

Just to explain further, it seems to me that my custom "look at; examine; x" entry in the verb cache is sort of over-riding the normal "look at" command (but I'm a noob, if a coder).

I'm using the web editor, by the way, as I'm on a mac.

Loving Quest, really addicted to the whole development process! Many sleepless nights so far, just desperate to do more and more!

Best wishes to all,

XanMag
Not that this would help now exactly, but if you want to achieve what you described... I would just have two different objects. In your initial setting (room description), have an object titled 'substance' and then run a script under the 'look at' box that moves the 'substance' to a different room and the 'blood' to the current room. Unless I'm missing something here, it's far simpler than messing with the built in Quest commands. I use this technique all the time. Just make a dead room (a room with no entrances or exits) with the items you want to move around.

calvatroid
Thanks XanMag, that's a nice idea. At the moment I make the "substance" a surface that only lists children when looked at, and make the "blood" a child object. The complex part I was trying to get my head around was changing the room description from "there is a substance on the floor" to "there is blood on the floor" once looked at. Then I realised this was handled by switching objects (removing "substance" from the room and replacing it with "blood"). Though this method is yet to be fully tested, owing to issue mentioned.

But yes, the actual problem (bug?) still remains. It's holding me back a bit at the mo. Perhaps no-ones been as much of a clutz as me to get themselves in this mess yet!?

The Pixie
Under the game object, there is a list of verbs. Try deleting "lookat" (or similar) from there.

Explanation: When you add a new verb, you add what happens to the object, but you also create a new verb object, which links the list of possible commands to one attribute of your object. So Quest will have a new verb for "look at; examine; x" which will override the old one. That would be fine, but Quest will automatically set the new attribute to "lookat", while the old one was "look", so now when you do LOOK AT BALL, Quest finds your new verb, see it links to an attribute called "lookat", and then complains because the ball has a "look" atribute instead.

calvatroid
Hi Pixie, when I look at the "game" object I only see setup, features, display, interface, script, room descriptions and player?

I'm using the web editor, though, not the desktop version? Thanks for your replies, everyone. Really appreciate it!

XanMag
You are definitely NOT the only clutz to mess stuff up like that. In fact, my solution to the room description thing would be to add a flag and if the room has the flag (say, "bloodseen") then run the description with blood described instead of the substance. If no flag, print the substance view. Not efficient, but it works for this clutz!! Lol

calvatroid
I'm a noob, so I thought I'd maybe done something really stupid and there was an obvious answer. Not a clutz, good. *relief*

Have tried removing the "Look at" display verb on the object's verb tab. Still all "looks at"s result in "you cannot look at; examine; x it".

:(

I just don't understand why it's now 'You cannot look at; examine; x" for all objects when I only tried adding it to one object.

Pixie, I think your explanation is correct. Question is, how to resolve it... this is a text adventure in itself :D

The Pixie
Not a tab, but another object underneath it, like Commands. However, I see that that is not visible in the on-line version, so you are stuck...

I would suggest e-mailing Alex and asking him to sort it out. Either to correct your game, which he might be able to do, to update online Quest so verbs are visible, which may take some time, or send you the game so you can edit it off line with the full editor (which will not help as you are on a Mac). If I am right about what has happened, I do not think anyone else has the access permissions to sort it out.

calvatroid
Ah, okay: so I don't have that. That would make sense.

Can I download the game.zip, unarchive it and load it into the desktop version? I could maybe run the desktop version on a virtual machine... though that ain't ideal...

Yes, I emailed Alex last night (I couldn't find anything similar on the issue tracker or on the forums but I was so insomnified). Hopefully I'll hear from him soon but he must be a busy guy so I thought I'd try on here.

If I get some sort of solution I'll post it back here... thanks Pixie and XanMag, really appreciate it. Was chomping at the bit last night and today!

HegemonKhan
if you don't mind learning a bit of work with quest's code, you can definately DL your game and open it (into its code viewing) using a text software such as with 'text editor' (I believe it is in the utilities folder), with your mac~apple (so long as you can unzip your DL'ed game file ~ I don't know much about apple computers, lol), and then correct the issue via changing the code lines needed in your game code, and then you can re-upload your fixed game, back up online.

you can also highlight your entire game code, copy it, and paste it here publically (or privately as a pm to one of the moderators of the site), and we can look through it, helping you with what to change~delete~add~alter.

-------

A bit late, but it's good to not over-write the built-in stuff, though knowing all of the built-in stuff isn't feasible, as there's a lot. But slowly you can learn what some of the built-in stuff is, and thus not use those words~labels for whatever, instead making your own custom things by giving them unique names~labels (such as with Verbs), so to not over-write any of the built-in stuff.

to see all of the built in stuff:

(well I'm not sure if this is there for the online~web version, but meh, hopefully it is)

in lower left corner:

Filter -> Show Library Elements (this is a toggle check box to hide~show the built-in quest stuff, which will appear in the left side's 'tree of stuff' as light grey text.

-------------

the code isn't really that scary....

a paragraph in writing is a 'block', it has a beginning and an end:

{start of paragraph: tab indent} Code really isn't that scary. It is made up of blocks, which can have layers of blocks inside of them. Quest's code is quite user-friendly too. In fact, I learned coding from Quest and its code. If you're interested you can definately do so too. It's not that bad, though it does take time, it's a slow process to learn to code initially, but then it gets faster as you pick up more of it. XanMag has been learning to code too.{end of paragraph: period or whatever type of mark}


a code block (with many single line horizontal blocks, the Attributes, within it too):

(code can be written vertically and~or horizontally. Vertically is easier for code noobs, but hackers can read code horizontally)

(you can have many layers of blocks, blocks within blocks, with some things anyways)

<object name="dragon_99_object"> // start code line of this Object block
<inherit name="editor_object" />
<alias>Bahamut</alias>
<attr name="title_string_attribute" type="string">King of Dragons</attr>
<attr name="dead_boolean_attribute" type="boolean">false</attr>
<attr name="strength_integer_attribute" type="int">100</attr>
<attr name="endurance_integer_attribute" type="int">100</attr>
// etc etc etc attribute~code lines
</object> // end code line of this Object block


the special 'game' Game Object block:

(it holds the global and etc settings for the game)

corresponds to the 'game' Game Object on the left side's 'tree of stuff' in the GUI~Editor (you can test it, choose one of the choices for an option under one of the Tabs for the 'game' Game Object, and then see what happens in code in this block)

default new game:

<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>


more of the choices filled in:

<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<author>HK</author>
<category>RPG</category>
<difficulty>xxx</difficulty>
<cruelty>xxx</cruelty>
<description>xxx</description>
<subtitle>xxx</subtitle>
<pov type="object">player</pov>
<start type="script">
msg ("xxx")
</start>
<statusattributes type="simplestringdictionary">xxx=xxx;xxx=xxx</statusattributes>
</game>

The Pixie
calvatroid wrote:Ah, okay: so I don't have that. That would make sense.

Can I download the game.zip, unarchive it and load it into the desktop version? I could maybe run the desktop version on a virtual machine... though that ain't ideal...

I have never done it, so I a not sure, but I think Alex needs to send you the zip. If you can the desktop version to run on your Mac, that would be the best way, as there is other functionality not in the on-line version (the attrributes tab and code view especially).

calvatroid
OK, thanks Pixie. I'll give that a try! :D

calvatroid
OK, HegemonKhan, that's awesome, thanks. Maybe I can just edit the raw source and surgically extract this "look at; examine; x" business!

It totally makes sense what's happened, but I'd have thought deleting the "look at; examine; x" would have removed it. It seems to be hanging around in a cache somewhere and then subverting the original "look at" code.

So hopefully I'll find that troublesome custom verb in the game object somewhere... 8)

Cheers everyone! Thanks for your help! Again, I'll post here with how i get on (or if I don't!)...

HegemonKhan
the problem is with how the Verbs work, as they tie into more global code, and thus while you deleted the local code lines, you've still got the global code lines that get created automatically~hidden from you (that deal with how Verbs, which are actually just a subset of Commands, work, to get a bit more technical with the underlying code), and thus you're still getting the 'defaultexpression' message of ~'you can't lookat;examine;x'.

The GUI~Editor makes using Verbs easy, as in code, when you make a Verb, it's actually just an Object's Script Attribute, but you also got to write~code in the Verb tag (block) too (which I often forget to do, grr, laughs). (see below)

in the GUI~Editor:

'ball_1_object' Object -> 'Verbs' Tab -> Add -> Name: 'kick', Script: (see below)

run as script -> add a~new script -> output -> print a message -> [MESSAGE] -> You kick the ball.

in code:

<object name="ball_1_object">
<alias>ball</alias>
<kick type="script">
msg ("You kick the ball.")
</kick>
<displayverbs type="simplestringlist">look;take;kick</displayverbs>
<inventoryverbs type="simplestringlist">look;drop;kick</inventoryverbs>
</object>

<verb>
<property>kick</property>
<pattern>kick</property>
<defaultexpression>You can't kick that!</defaultexpression>
</verb>

calvatroid
OK, I've managed to convince OS X sublime text an .aslx file isn't a linux executable and I'm looking at the code. I've found this:

  
<verb>
<property>lookat</property>
<pattern>look at; examine; x</pattern>
<defaultexpression>"You can't look at; examine; x " + object.article + "."</defaultexpression>
</verb>
</asl>


Funnily enough right at the end of the asl block, so it's def global. Should I just remove this? Will this solve the problem or might there be a red and a blue wire here (I really don't want my game to explode, I've spent many sleepless nights on it!)?

Thanks massively for your help. I thought I was going to have to start over :shock:

HegemonKhan
I'm not fully knowledgeable on this, but Pixie can definately help though with it.

--------

if you want to try it...

make a copy of your game file first (rename it), so you got a backup in case something goes wrong, lol.

I *think* you can delete it, and it will fix the problem (HK crosses his fingers)

delete the entire Verb's tag~block, this entire thing below:

<verb>
<property>lookat</property>
<pattern>look at; examine; x</pattern>
<defaultexpression>"You can't look at; examine; x " + object.article + "."</defaultexpression>
</verb>


-------

just by default, the engine puts the Verb tags~blocks near the top, but vertical placement (so long as it's the same indent and not within something else) doesn't matter at all (EXCEPT with the libraries, '<include ref="English.aslx" />' and '<include ref="Core.aslx" />', as this is how the quest initializes~builds itself, the engine and the game, up).

------

you can't mess up the underlying engine~quest code itself at all, unless you open up the actual quest files (the 'XcoreX.asl' files in the quest folder), as Alex neatly safeguarded it, you over-ride, not over-write, so anything you delete is just your own game's code, not the engine's code.

calvatroid

(so long as you can unzip your DL'ed game file ~ I don't know much about apple computers, lol), and then correct the issue via changing the code lines needed in your game code, and then you can re-upload your fixed game, back up online.



Hmm, next problem is the 'upload' feature in textadventures.co.uk is asking me for a .QUEST file, whereas all I have here (after unarchiving my game.zip) is a .aslx.

Perhaps I should fire up that virtualbox VM and get a copy of win 7... which honestly makes me shudder but a text adventure writer's gotta do what a text adventure writer's gotta do..

HegemonKhan
umm... I'm not too knowledgeable on this, wait for Pixie to help...

but...

the *.quest file extension is jsut for the upload site, so you just need to know how to re-upload your game file to the site... and it should convert it into the *.quest extension

the *.aslx file extension is the quest file extension, though I think pixie said that *.exe and~or .xml worked too... but not sure.

(you could try just changing your game file's extension to *.quest, and see if it'll upload...)

--------

you shouldn't need to VM (I'm sure you can do it without a VM ~ I'm just not that knowledgeable on this type of stuff), just wait for Pixie, if my posts don't help.

-------

a VM should only be required for playing quest games on your computer's desktop~itself (via being able to have quest.exe ~ the software on your computer), or at least until someone makes quest compatible with apple computers.

calvatroid
I'll give it a go! fingers crossed...

HegemonKhan
I think with apple computers, there's a ~'control panel' toggle option, just like with pcs, for hiding~showing the (real) file extension... so you may need to find this and turn it on, so you can change the *.aslx to *.quest

calvatroid
OK, tried uploading the .aslx and the .quest.

First time it asked me for a .quest (called the .aslx an invalid file).

The second time (after renaming the .aslx to .quest) it just said 'failed to load'.

No get out of jail free card here..

HegemonKhan
you could try using a *.txt extension (maybe this will work for the upload req?), otehrwise, Pixie will be able to get this solved for you (and~or Alex if need be), so don't worry.

(I've never uploaded a game to the site, how did you initially upload your game file to the site? ... err... nevermind... you made the game on the site... duh, never uploaded it)

calvatroid
Looks like I might need the desktop editor... Thanks for all your help though HK, you're on the credits list! ;) I find Quest much more intuitive (as a coder) than the other applications, so really want to stick with it... this has been fun! :D

HegemonKhan
this might help (Jay: very knowledgeable too, or Pixie or Alex will get this fixed up for you):

viewtopic.php?f=10&t=4348&p=28853&hilit=publishing#p28853

just try searching on 'publishing'...

you could probably edit the Verb itself... too... hmm...

-----

ah, so you're a coder?

then you'll definately want this link (if you don't already know about it):

http://docs.textadventures.co.uk/quest/

and there's a quest-developer's site ~webpage too ( http://docs.textadventures.co.uk/quest/open_source.html ), if you're a programmer, you can help Alex with QuestKit (new total re-make version of quest, to use JS due to its universal usage, instead of quest's current xml, I'm not sure if 'FLEE' is still going to be used with QuestKit, but it's used with quest currently, giving us the non-coder friendly words, such as 'and' and 'or~xor', instead of all those code symbols... that the other languages use... that I'll have a hard time with remembering... laughs.

HegemonKhan
ah here, maybe this will help! (HK crosses his fingers):

http://docs.textadventures.co.uk/quest/ ... _game.html

hopefully this is what you need...

calvatroid
I'm def interested. Just not a massive fan of C sharp (which it's coded in apparently) but I can feel myself getting drawn in!! Personally I prefer the FLEE. Never really got used to && and ||. It was better in the 1980s, just simple straight forward logic syntax! ;)

Aha! Maybe that's it... don't want to publish it yet, though...

HegemonKhan
there's this too, maybe this compiler does the same thing as the 'publish ' ~ *.quest (this stuff is outside of my knowledge):

viewtopic.php?f=10&t=4451

the Quest JS Compiler

calvatroid
OK, there's an 'unlisted' option in the publish bit... we're getting there! Thanks again so much, feel like I should have RTFM a bit now, though..

Wow. JS compiler... apps... this is a truly awesome piece of kit. Kudos to those involved...

calvatroid
dang. The .quest file is uneditable. It looks like a compiled .exe... the plot thickens..!

HegemonKhan
you could also post your issue here too (there might already be a question on your issue here as well):

http://ifanswers.com/

Alex is trying to use this site for quest technical-code-GUI-editor questions on top of this site's forum.

calvatroid
OK, I know a lot more about the problem now (thanks to you) so maybe that's the place to go...

calvatroid
OK, I've put it here: http://ifanswers.com/671/object-verb-ca ... y-look-ats

Let's see what happens..

Thanks and thanks again :)

The Pixie
calvatroid wrote:OK, I've managed to convince OS X sublime text an .aslx file isn't a linux executable and I'm looking at the code. I've found this:

  
<verb>
<property>lookat</property>
<pattern>look at; examine; x</pattern>
<defaultexpression>"You can't look at; examine; x " + object.article + "."</defaultexpression>
</verb>
</asl>


Funnily enough right at the end of the asl block, so it's def global. Should I just remove this? Will this solve the problem or might there be a red and a blue wire here (I really don't want my game to explode, I've spent many sleepless nights on it!)?

Thanks massively for your help. I thought I was going to have to start over :shock:

Yes, delete all that except the </asl> tag, and it should be fine.

The upload problem is something else. As far as I know there is no way to upload for editing. Your can only upload .quest files (which are not .exes, but .zips; you can change the file extension (in Windows anyway) and open them up in 7Zip, and you will see your game, plus any libraryies you used in one big ASLX XML file). I think Alex can upload, if yoiu send it to him (do you want to post it here first so one of us can check it on the off-line editor first?).

calvatroid
Thank you, Pixie. So it looks like the best bet is to get a VM running win7 on my mac and use the offline editor... I'm sure Alex has better things to do than fix my game for me.. Maybe I should just buy a PC, even.. though I'm not sure I could cope with windows 8!! :O

Though the online editor is useful because then I can work on it on my phone or at my gf's house without lugging my laptop around... hooey..

I'd like to post it but it's a work in progress so I'm feeling a bit protective of it!

calvatroid
My 'look ats' now work on the desktop quest, running on a windows 8.1 virtualbox VM!!! Thank you everyone :D

HegemonKhan
well, you do have the full functionality with the desktop version, unlike the online~web version.

just hope didn't use up too much disk space and~or sacrificed anything else with your apple computer, hehe. (OSes are expensive, ms office is expensive, everything is expensive, sighs)

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

Support

Forums