New creator, a couple questions

Hi there, I just started using Quest 5.8 this weekend and have been reading tutorials, the manual, and doing what I do best which is learning through use. After a few days, I've got a question I haven't been able to find an answer to, and a problem I'm not entirely sure is a problem or not. I'll put these as Question 1 and Problem A.

Question 1: Is there a way to set up Quest 5.8 so that it defaults to "Code View" instead of the GUI view when editing or creating scripts? The GUI is nice for people learning to code, but I prefer the Code View as it lets me get my hands right into the code without having to navigate through buttons and drop-down menus. Every script on an object starts in GUI view and I have to change it to Code View, and then it resets if I select a different object. I'd rather it just uses Code View automatically and let's me change to GUI view should I need it, but there doesn't seem to be any configuration for the application that I can tweak to change this.

Problem A: I've found that when I first start the program, and am knee-deep in code, snippets of code that I change do not retain the changes as I select other objects or run the game. For example, I was working on a flashlight object yesterday, editing the "turn on" and "turn off" verb scripts, and copied/pasted from "turn on" into "turn off", edited it to obviously work in the reverse, then saved and ran my game. It didn't work. I came back to the code and the changes I had made were gone... the "turn off" code matched the "turn on" code. This keeps happening, and it drives me nuts when it does. I've taken to copying large portions of script and pasting it into notepad while testing my code out of fear that I'll lose any changes I make and not realize it. Has anyone else experienced this? Is this a known issue, or is it me? I've questioned whether I need to be clicking "save" after every change in order to force it to stick. It just seems odd to edit code, click a different attribute, click back to the attribute I just changed and find my changes are gone. It's also incredibly frustrating.

Otherwise, I am currently in love with Quest and am enjoying programming my first adventure game, a monster hunt that I plan to expand with the coming days.

Thank you for reading and if you take the time to respond to my questions!

.oO WDalphin Oo.


Question 1, I can't answer because my experience is only with the web editor, which is even more restrictive in that regard.

Problem A, I've not seen this mentioned on the desktop before, but it's a fairly common complaint with the web editor. In its efforts to reduce the data exchanged with the server, Quest checks if the value of a field has changed when the cursor moves out of it, and only saves the fields that have this change flag set. This means that in some circumstances, you need to move the cursor into a different textbox on the page to make sure the flag is set before going to a different object.

There's also the possibility that it will fail to save invalid code sometimes, reverting to the previous version because it's holding something that wouldn't be valid XML if reloaded. On the web editor, this can be caused by lines like variable = "</span>", which can be edited in the GUI but not in code view. I believe that if you're looking at the XML code view on desktop (with all the <object> and <attr> stuff), improperly closed tags may be discarded because if they were saved, the engine would be unable to open the file at all.

The most likely cause for this would be a missing <![CDATA[ section, depending how deep into code view you're getting. A script or string attribute which contains XML or HTML (or even just contains a < character somewhere) must start with <![CDATA[ and end with ]]> to ensure that the load function doesn't try to treat it as an attribute inside another attribute.

I've got no idea if either of these issues is cropping up in your situation, but it might be worth watching out for them.


it sounds like just working directly in code might be best for you:

if using the desktop/download version of quest on your computer, all you got to do is to right click on your 'XXX.aslx' game file itself, choosing to 'open' it, and selecting a text editor software (notepad, wordpad, Apple: text editor, notepad++, etc)

if using online/web version of quest, you're doing to have to download your published (bundled) game file and etc files (like music, art, etc), as a 'XXX.quest' file, onto your computer/desktop, and then unzip (unbundle) it (winrar, etc), so you have access to your 'XXX.aslx' quest game file, which you can then do the same as in the above/1st paragraph (right clicking on the file itself, opening it with a text editor software)

if you do work with the code directly, highly recommend that you download and install this advanced/powerful/useful and free text editor software:

notepad++ ( https://notepad-plus-plus.org )

once you got it installed and opened up in it, in the menu bar at the top, under 'languages', select 'xml' as this matches up with quest's 'aslx' language, in its use of color-coding your code, for easier reading, editing, and troubleshooting of your code

notepad++ also has a ton of really powerful editing and etc features for you to use as well


and here's a guide by me to help you with working directly with quest's coding:

http://textadventures.co.uk/forum/quest/topic/mu7itzjqv0yxrkdwgsbmzg/how-to-make-npc-confront-you-with-chioces#46cdb25b-4767-40a6-8bf4-3cd84e805781

ask if you need help with and/or explanation of anything


Thank you for the reply!

I had wondered if the trouble I'm experiencing is related to the design of the interface. I've noticed that I can see the script in the "Value" field of the Attributes pane, and that the field doesn't show any changes you make in the Assignment pane until "Save" is clicked. "Undo" also does not undo text changes you make. But if you're in the GUI view, changes you make are instantaneously shown in the Values field. So I suspect it has something to do with it not wanting to constantly update the Values field until all your typing changes are made.

On the other hand, I've made a change in one field, then clicked into another field and immediately gone back and the changes are lost. So it's not as simple as clicking on another field. It seems that clicking the GUI/Code View button snaps the changes into the field. So there's that or Save, but it'd be nice if they just automatically take because I lose so much time just from forgetting to make sure the code snaps into that Value field and doesn't get lost.

It's definitely not anything to do with bad code. I've actually put in bad code and it remembers it... even if it complains that the code is severely flawed and fails to format it properly as a result, it still remembers it. In fact, I've found that putting in broken code is the one way to ensure that the GUI view doesn't default, because it can't convert the code to the GUI design and puts me in Code View until I fix it. X-D


Hi and thanks, Hegemon!

I do have Notepad++. It's a staple as a writer and programmer. I've actually been using it lately to store segments of code for this since I keep losing my changes and get tired of typing them back into the small editor window in the app. Word wrap is a plus.

I don't know if I could stomach writing the entire thing in Notepad++ though. The app is incredibly useful in organizing the rooms and objects, and as I'm just starting out I think it's best to stick with using it for now, but I'll definitely keep using Notepad++ to store my snippets since I was starting to question whether I wanted to keep working on this after seeing something I'd coded vanish for like the fifth time in a row.

Thank you for your guide! I'm checking it out now. I had wondered if there was a repository for the code from other games.


Log in to post a reply.

Support

Forums