Help with Locking Exits
PoochieMoo
10 Jul 2017, 17:39I want to make an exit that is locked unless the player has a certain key, and I have this scrip in the exit:
if (Got(mysterious key)) {
UnlockExit (Abandoned Castle Exit)
msg ("You fit the key into the lock. It's a perfect fit! The gates swing open as you enter the castle.")
}
else {
}
But it doesn't work. It keeps saying the message that it should when it's locked, even if I have the key and it should be UNlocked. Anyone know what to do?
Talon
10 Jul 2017, 18:25Well logically i think i see the problem, you still have the key in the players inventory after unlocking right? so it keeps doing it. You'd want to have a nested if statement to check if the door was locked before it checks to see if you have the key.
You might want to make the unlocked door part of the script move the player as well since I think once an exit needs a script it needs to be manually moved rather than by default
PoochieMoo
10 Jul 2017, 18:29ok, thanks, I fixed the problem
PoochieMoo
10 Jul 2017, 18:30just a side question, does anyone know how to save your game? Is there a way? (not saving the game while its being created, but saving the game while its being played)
PoochieMoo
10 Jul 2017, 18:39just a side question, does anyone know how to save your game? Is there a way? (not saving the game while its being created, but saving the game while its being played)

W.H. Dunnlatch
10 Jul 2017, 18:58In a text adventure, you should be able to simply enter: SAVE (or click the 'SAVE' link in the location bar up top).
[NOTE: This doesn't appear to work while test-playing a game being created in the online editor.]
If you want the code to link to a command or something of that nature, it would be request (RequestSave, "")
.
UPDATE
NOTE 2: If there is an error in a script, the game will not save, in the app or online. (I just found an error in one of my scripts trying this out!)
PoochieMoo
10 Jul 2017, 20:49thanks! a few more questions:
- If someone downloads the game, can they edit it? If they can, how can I make it so that they cant...
- Is there a way to change the file type and have it still work? (.quest to .exe)
- How can I change the picture of the desktop shortcut of a downloaded game from the quest logo to a picture I want?

Richard Headkid
10 Jul 2017, 21:25NOTE: I'm new to the site (and I'm not affiliated with the site), but I believe I can help a little.
If someone downloads the game, can they edit it? If they can, how can I make it so that they cant...
It's very easy to get your .aslx file out of the .quest file. (If you'd like to know how, PM me, and I'll tell you. (Don't want to make it widely known if it's not.))
BUT when you pull the .aslx file out and open it with Quest, I believe you can only edit in the main code view. I don't think the GUI works.
PLUS, if someone tries to upload a game with same ID as yours, this site will reject it.
Is there a way to change the file type and have it still work? (.quest to .exe)
I believe I read something about using PhoneGap. (I've never tried it, but I've read about it in numerous places.) It's an old post. Check it out: http://docs.textadventures.co.uk/ifanswers/ifanswers.com/3/how-do-i-turn-a-quest-game-into-an-app.html
How can I change the picture of the desktop shortcut of a downloaded game from the quest logo to a picture I want?
On your Windows PC, you can just right-click on the shortcut icon and change the icon (should be in the main options after right-clicking). (If you're asking how to set it up so that's what other people who download will see as their icon, I have no idea.)
PoochieMoo
10 Jul 2017, 21:46Ok, thanks! Since I am allowed to use quest games for anything I wanted, I was putting them on Game Jolt and wanted to know how to make it look like it was not from quest. Is there any way to make the game sort of... unaffiliated? I guess? With Quest? (Like it would not have the quest logo as the icon, just a blank paper, and the file wouldn't be .quest but .exe, and stuff like that)

Richard Headkid
10 Jul 2017, 22:28Ooh, you've definitely got me on that one.

Richard Headkid
10 Jul 2017, 22:36I'd be happy to be one of the people who gets to check your game out once you've got it ready for testing.
From what I've gathered from the questions you've posted, it sounds interesting. (And I already know that you put a lot into it during the creation process, so that's a plus.)
PoochieMoo
11 Jul 2017, 01:00Here's the Game Jolt page if you want to check it out!
https://gamejolt.com/games/worldofexshire/267767
We're coming out with a super early access build on the 14th, you could test it out then! (I appreciate your interest in the game!)
One question about the JS applications: How do I download Quest-JS, and does NodeJS make computer or phone applications? (Stupid question)

Richard Headkid
11 Jul 2017, 02:52I checked the Game Jolt page out. Looks interesting. I'll check it out.
hegemonkhan
11 Jul 2017, 02:56Alex was working on QuestKit (quest v6.0), which was going to completely convert quest over to JS, so it can be used by anyone's browser (no need for downloading quest.exe software/engine) offline (as well as online). But, Alex moved on, before he was able to finish QuestKit. Right now it's dead, unless people with the know-how can finish it up.
PoochieMoo
11 Jul 2017, 03:25Ok, so if I downloaded Quest-JS, converted the game to JS, and then put it through Web2Executeable I could pretty much make my own file with the game in it? (Without all of the quest affiliation for lack of a better term?)
And also do I need a .aslx file or .quest file for Quest-JS?

Richard Headkid
11 Jul 2017, 04:08Ok, so if I downloaded Quest-JS, converted the game to JS, and then put it through Web2Executable I could pretty much make my own file with the game in it? (Without all of the quest affiliation for lack of a better term?)
Well...
Quest-JS actually converts a compiled Quest game file (.quest) into a website. The website uses Java to run the interpreter (probably more complicated than that, just keeping it simple). So, what Quest-JS actually outputs is a website folder, which includes an HTML file, along with a bunch of .css files and .js files.
NOTE: From what I can tell, Quest-JS compiled websites won't load the game if you have the panels activated. (Inventory, Compass, etc.)
QuestKit (or Quest 6) seems to need to be hosted from a server to do anything. (I haven't tried to run it. That's just what the README said. I can't get 'npm install' to do anything. It just throws errors. I don't even know if QuestKit is actually functionable, though, so I didn't try very hard to get it up and running.)
Web2Executable is going to change your 2MB website into a 150MB app, and it won't even be an EXE file, it'll be something your average PC user couldn't figure out how to open.
It seems that PhoneGap will turn a website folder into an iOS or Android app, but I'm still setting it up, so I'm not certain yet.
If you want to go 'all coding', you can write your game using TADS. You can make an .exe file straight from that program when publishing your game.
You could also use Inform 7 to compile your game to Glulx or Z-machine, which can be played with Frotz or Gargoyle. Frotz is available for EVERY device except Android, but Android has 3 or 4 substitutes to play Z-machine files. Gargoyle plays Glulx files and is available for PC and Linux/Unix, but I'm not sure about Mac.
If you go the TADS or Inform route, you'll have to totally rewrite your game and learn their coding languages as you go.
Basically, based on what I've 'learned' regarding the software to create apps I've tried to use, it seems that you have to be a programmer to create a stand-alone text adventure app.
As far as making it so that the end user couldn't tell you made it using Quest, I have no clue. Sorry.
And also do I need a .aslx file or .quest file for Quest-JS?
Sorry, I wrote .aslx in the earlier post, when you need a .quest file (a published game).
(I updated the earlier post to fix the error, so as to avoid confusing anyone else. Sorry about that!)
hegemonkhan
11 Jul 2017, 04:43unfortunately, I think the only way to protect your game/source code is via how professional games do it:
(I think this is generally how it's done... as I'm not a professional game maker, and have no idea how it's actually done, lol)
(0. work with assembly language and/or machine code with the below stuff)
- create your own private language+engine quest to make your game
- encrypt your code
- make a publically available your_modified_quest.exe (or whatever) to be able to decrypt and play the game

Richard Headkid
11 Jul 2017, 05:31Robin Johnson has a home-brewed game authoring system (all JS, I believe). His games are available to play online, and some can be downloaded as .exe files.
If you can get into the code in his .exe files, I'll be [expletive deleted] if I could figure out how to do it.
Of course, if you play his games online in Chrome, you can just save the entire website. Then, you have access to the source code, which have comments from the author stating you can share his technology, but hands off his art!
If I were you (PoochieMoo), I'd check his work out. His .exe file isn't very large at all, and his games are enjoyable, too!
ht.tp://versificator.net/
I recommend playing Draculaland (you point and click, but it still (sort of) feels like a parser) and Hamlet (parser).
HK,
Re: copy-protection
If it can be compiled, it can be decompiled. Am I right, or am I right?