Need help with serious project!

DGNXFoxN
Hi there,

Some of you might have seen my questions pop up recently throughout this forum.
I'm pretty new to writing textadventure games and decided to go with a huge project as I believe that in the process I will also learn the code used to create these games.

However, It has become quite obvious that I will have to call upon the endless knowledge of veteran textadventure game writers for help quite often.
Due to not completely understanding the code yet, there is a lot of stuff that I believe can be achieved more easily or done more effectively, but I need to figure that out first (How to question something if you do not know it is out there :D).

On the website itself, my username is FoxDieVirus89 and I'm currently working on a game called H4CKED.
http://textadventures.co.uk/games/view/ejfrqmersewvyncti4ccow/h4cked
There will be a lot of obstacles I'm sure, but I've seen that with the help of the community in both providing tips/ideas and helping in more technical problems, i'll be able to create something very exciting.

With that said, I would like to raise the problem I am facing at the moment:
I'm currently trying to figure out how I could create a working filesystem. With the ability to allow the player to explore his hard-drive in the game using the famous "CD", "DIR", "." and ".." commands. Also will try to create a system that allows players to edit, delete, download, upload files and even create new files. I'm pretty sure it is possible... but I'm unsure on what I should use to be able to accomplish this.

Also, is there a way to enable a script to go back to a specific point? For example: If I'm simulating a login process, the game will ask for a username, if the username is correct then it will ask a password, if the password is incorrect I would like for it to go back to the username part. But since different servers use different login information I believe that using a function to loop this is probably not correct? Or maybe I should use a function per host/server you can log into?


I'm really hoping for some help regarding this issue, if possible explained using the GUI interface of QUEST.
If for some reason it has to be done using code, please explain how that works because I'm really new to it.

HegemonKhan
well, there's only two ways to get typed-in input during game play by the person playing the game:

the 'get input' Script and Commands

unless you don't mind using 'clickables', a GUI~Editor's Verb's (though in code, this is actually just an Object's Script Attribute) 'hyperlinks' and 'buttons'.

as for looping...

the easiest is to use Functions, they're pretty much just like an Object's Verb, except that they just hold your scripting as a stand alone block (not tied to a specific Object like the GUI~Editor's Verb), which you can then use the 'call function' Script wherever you want to do the Function simply via giving the 'call function' Script for its 'name' text box, that Function's name. Functions also allow for Parameter and returning values, use too, if you're ready or already know about how these work.

There's also Delegates too, which are like Script Attributes, except that they can use Parameters and able to return Values, just like Functions. They can be activated by the ~ 'RunDelete' like command~function~script~whatever. Though Delegates are much more confusing than using Functions, at least for me, lol.

lastly, there's the Script Attributes, via in-code: 'invoke (Object_name.Script_Attribute_name)', but these are very limited (no Parameters, no returning Values)

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

a test example of using a Function:

Add -> Function -> Name: dialogue_function -> (see below)
~OR~
Functions -> Add -> Name: dialogue_function -> (see below)

'Functions' Element -> 'dialogue_function' Function -> (see below)

Name: dialogue_function
Return type: [none] // leave as 'none', until you know how to use them
Parameters: Add: (do NOT add any Parameters, until you know how to use them)
Script: (see below)

add new script -> output -> 'print a message' Script -> print [message] hi

add a script -> output -> 'print a message' Script -> print [message] repeat the message?

add a script -> output -> 'get input' Script
-> then, run script -> add new script -> scripts -> 'if' Script -> if [expression] result = "y" or result = "yes"
->-> then, -> add new script -> scripts -> 'call function' Script -> Name: dialogue_function, Parameters: (leave blank, don't add any)
-> add else if -> else if [expression] result = "n" or result = "no"
->-> then, add new script -> output -> 'print a message' Script -> print [message] the function ends~exits now, no looping
-> add else -> add new script -> output -> 'print a message' Script -> print [message] wrong input, try again, from the beginning.
-> add new script -> scripts -> 'call function' Script -> Name: dialogue_function, Parameters: (leave blank, don't add any)

'room' Room Object -> 'Objects' Tab -> Add -> Name: npc1

'room' Room Object -> 'Objects' Tab -> Add -> Name: npc2

'npc1' Object -> 'Verbs' Tab -> add -> Name: dialogue -> [run a script] -> (see below)

add new script -> scripts -> 'call function' Script -> (see below)

Call function dialogue_function With Parameters: (don't add any Parameters, until you understand their use)

'npc2' Object -> 'Verbs' Tab -> add -> Name: dialogue -> [run a script] -> (see below)

add new script -> scripts -> 'call function' Script -> (see below)

Call function dialogue_function With Parameters: (don't add any Parameters, until you understand their use)

---------

XanMag is actually doing the same system too:

viewtopic.php?f=10&t=5303

so, you two can work together, XanMag can certainly help you with this stuff really well with the GUI~Editor unlike me (and probably can explain stuff in a way better than I can as I'm at a higher quest~code level so I may not make much sense to you guys~girls, on top of my code heavy posts, lol).

XanMag
I will send you my computer script this evening (5-6 hrs). I'll then work on creating what I think you want (in miniature of course) with a description. I'd do it now but I'm at a birthday party!

I'll send soon!

DGNXFoxN
XanMag wrote:I will send you my computer script this evening (5-6 hrs). I'll then work on creating what I think you want (in miniature of course) with a description. I'd do it now but I'm at a birthday party!

I'll send soon!


Awesome! Looking forward to it :)

jaynabonne
As far as simulating a file system goes, the approach you'd take depends on what you want to do. If you want to have dynamic creation, then you can't use static data - so what will you create? If you want to associate file data with file names, then you could use a general purpose dictionary (*not* a string dictionary). Then you can have keys point both to strings (text file data?) and other dictionaries to model nested subdirectories.

But if you want to remember more than just file contents, then you could go whole hog and use an object per file/directory entry, with child objects corresponding to children in a subdirectory.

I might take a stab at this, since it sounds simple enough and could be fun... ;)

Edit: Since you mentioned "dir" instead of "ls", I assume you're looking to a Windows command prompt sort of thing instead of Linux...

DGNXFoxN
jaynabonne wrote:As far as simulating a file system goes, the approach you'd take depends on what you want to do. If you want to have dynamic creation, then you can't use static data - so what will you create? If you want to associate file data with file names, then you could use a general purpose dictionary (*not* a string dictionary). Then you can have keys point both to strings (text file data?) and other dictionaries to model nested subdirectories.

But if you want to remember more than just file contents, then you could go whole hog and use an object per file/directory entry, with child objects corresponding to children in a subdirectory.

I might take a stab at this, since it sounds simple enough and could be fun... ;)

Edit: Since you mentioned "dir" instead of "ls", I assume you're looking to a Windows command prompt sort of thing instead of Linux...


Thank you for your idea, I will look into it.

Well the plan is to be able to move files around or delete/create new files. Aswell as being able to do all kinds of other actions with them.
So the system will be quite complicated i'm thinking... :)

As far as the Windows Command Prompt thing, I'm currently indeed focusing on using commands originating from CMD. However, I will most likely end up adding the linux commands in the future aswell as add some custom ones if needed.

XanMag
In the original PM I sent you the password to "hack" the computer and some of the searchable room names and people names for the program.

The link to "play" in this room and on this computer is here:

http://textadventures.co.uk/games/view/ ... ter-system

For anyone else that wants to beta-test my computer and it's programs, I'd be grateful!

Some of the rooms that are searchable are: lab, corner hallway, prison cell, maximum prison cell, commons, barracks, infirmary, showers, dining room, kitchen, pantry, janitors closet, south gate, chemical warehouse, garage

Some of the names you can search are: magoo, dingo, wallows, halil, humperdinck, wazlib, ivebeenabad

Also, there are 14 rooms in the "ring" to help you solve the password puzzle.

Anyway, if anyone wants to take a look at it and test it and report any errors, I'd appreciate it. Thanks.

jaynabonne
Attached is a quick put-together of some initial commands. It's wrapped up in a zip file, because there's a simple styling library included as well to give that "DOS effect".

It supports a basic implementation of "dir", "cd" (both with and without parameters, but only relative), "mkdir" , "rmdir" and "cls". It does not support absolute paths, (e.g. "cd \" or "rmdir foo\foo2"), but that could be added.

It's not the greatest code, as it was thrown together quickly, but it could be cleaned up, especially as it's extended. (I'd be willing to work with you on getting the commands in place you want. This is just to show what's basically possible.)

A sample transcript follows:

Logged in.

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\


> mkdir foo

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\

<DIR> foo

> cd foo

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\foo

<DIR> .
<DIR> ..

> cd ..

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\

<DIR> foo

> mkdir foo
A subdirectory or file foo already exists.

> mkdir foo2

> cd foo2

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\foo2

<DIR> .
<DIR> ..

> mkdir foo3

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\foo2

<DIR> .
<DIR> ..
<DIR> foo3

> cd ..

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\

<DIR> foo
<DIR> foo2

> cd foo

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\foo

<DIR> .
<DIR> ..

> cd ..

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\

<DIR> foo
<DIR> foo2

> rmdir foo

> dir
Volume in drive C has no label.
Volume Serial Number is 3141-5192.

Directory of C:\

<DIR> foo2

> cd
C:\

> cd foo2

> cd
C:\foo2
>


XanMag
Related to your post Jay...

How do you attach a file? The file wouldn't attach because it's too large. I directed DGN to my teachers website and linked a word file there so he could copy-paste my code into Quest - so he could see how the code looked in editor mode.

Dumb, I know, but I'm impatient.

jaynabonne
I just went to the bottom where it says "Attachments" and then clicked "Add Files" and found the .zip file I had created. You can make a .zip file by right-clicking on your .aslx file (or the folder containing it, if there is more than one file) and then "Send to -> Compressed (zipped) folder".

How large is your .aslx file?

XanMag
...

XanMag
Ok. Deep Breath. If you only knew that idiotic things I have been doing...

This is the correct link to sampling the room that the computer is in:

http://textadventures.co.uk/games/view/ ... ter-system

This is the attachment with the .aslx file:



Good God... I hope that is right.

DGNXFoxN
Thank you very much both XanMag and Jaynabonne!

@Jaynabonne
The DOS effect is exactly what I'm looking for.
I've tested your attachment and I'm actually amazed it's possible. The commands work the way they should!
I'm also pretty curious how you managed to create that command input thingy. Currently have the basic command bar, but yours would fit a lot better!
I'll study your code a bit and figure it out :)

EDIT: I've checked the code for your commands, a lot of stuff I still need to figure out. I get a good idea on what I'm reading, just not sure how to do it :)

@XanMag
As I said in the PM, your computer system is awesome, even though it's third person, it gave me a few ideas that would increase the quality of what i'm trying to do :)

jaynabonne

I'll study your code a bit and figure it out



The screen styling is actually all in the separate "dosstyle.aslx" library. If you just include that library in your game, it auto-magically happens.

DGNXFoxN
jaynabonne wrote:

I'll study your code a bit and figure it out



The screen styling is actually all in the separate "dosstyle.aslx" library. If you just include that library in your game, it auto-magically happens.



Will it change the color and font of the game by doing this?

DGNXFoxN
Alright, I've managed to get the dosstyle command bar running, I was just thinking that the command bar would be probably be unavailable for people playing via the website (instead of downloading it) or am I able to upload mutliple files?

Also @Jaynabonne, I'd like to take you up on that offer to work with me for the commands (I might get a better idea on how some of the scripts you used work).

HegemonKhan
I think when you publish a game (+ any additional files) to the site, it'll take all your files, combining them into the *.quest file that the site uses, but don't quote me on this.

jaynabonne
No, you need to do those yourself. :) It will only set the font and color for the elements in the type-in area. (Sorry I wasn't clear.)

DGNXFoxN
jaynabonne wrote:No, you need to do those yourself. :) It will only set the font and color for the elements in the type-in area. (Sorry I wasn't clear.)

Yeah I figured that out, so I edited the dosstyle.aslx so that it would be green instead of white :) wasn't that hard to figure out :)
Also, did you receive my pm?

DGNXFoxN
I've come up with an idea, but I think it'll require some serious knowledge of ASL scripting in order to be able to do it.
Since the (possible) difficulty of the game has come up quite a few times in different threads I figured it would be nice to have some kind
of system for people who are playing the game to communicate with each other. I think it might be a bit too extreme to make it entirely multiplayer but I figured that maybe (if possible) a Chat would be interesting. Maybe being able to to connect to an out-of-game chatroom from within the game would be nice. I believe it is UPLINK that has something similar that even though the game is entirely singleplayer, you still have the ability to connect to a chat from within the game and talk with other players. If something like this would be in the game, it would make players able to help eachother in real-time and without having to wait to long to get responses through the forum.

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

Support

Forums