newbie here, has a few questioons.

Anonymous
12 Aug 2003, 03:40
Would it be possible to set up a random encounter thing in QDK? And equippable items and changeable amounts of gold, XP, and such? If anyone knows how to set those up, please tell me.

I think Im Dead
12 Aug 2003, 07:09
Very possible, but not necessarily easy to do. For a single player game, sure, it can be accomplished easy enough with a bit of thought. For a multi-player game it requires quite a bit more understanding of ASL coding to make things really cohesive.

Anonymous
12 Aug 2003, 16:34
do you think you could tell me how to have it in single player? All I'm looking for having is random enoucnters in area, an EXP thing, a gold amount, and equipment stuff. If you could tell me how to do it, I would be hugely obliged.

GameBoy
12 Aug 2003, 16:52
exactly what do you mean by encounter?

and do you mean you want to SHOW how much gold you have on the screen, and when you buy stuff your gold goes down according to how much the item is or wotever?

Anonymous
12 Aug 2003, 17:24
Encounter, I mea it like this:

you are walking along the path, when a goblin leaps out at you. Fight this goblin?

yes/no

and then you do different amounts of damage and have health and stuff based on items and level.

for the gold thing, kind of like in the game "kingdom", where you can see how much gold you have, and it will go down depending on how much the item costs, along with selling.

GameBoy
12 Aug 2003, 17:50
to make this easy for you ill code it myself and paste it here....


define room <goblinthing>
alias <Room>
script {
msg <A |bGoblin|xb leaps out before you, and stops you in your tracks!|n>
if ask <Fight Goblin?> then msg <|nEnter combat script here!|n> else {
msg <You flee!>
goto <woteverroom>
}
}
end define


then msg <|nEnter combat script here!|n>


that part there, well, you will enter what happens when you start the fight.

im assuming this is what you meant, that when you enter the room the goblin tries to attack you or whatever.

now, as for the gold system, you use status variables. ill code a simple buying system, and you can use it and expand it if you wish....


define game <gold>
asl-version <311>
start <shop>
game info <wotever>

' this is where the status variable is implimented

define variable <gold>
type numeric
value <200>
display <Gold: !>
end define
end define

define synonyms
end define

define room <shop>
command <buy sword> {
if ( %gold% <= 149 ) then msg <|bYou do not have enough gold|xb>
if ( %gold% >= 150 ) then {
msg <|bYou perchased a Sword|xb|n>
give <sword>
set <gold; %gold% - 150>
}
}
end define

define room <shop items>

define object <sword>
end define

end define


You can change the item, command, and money, but this script will decrease the gold amount depending on how much you set it too, and if the amount of gold you have is less than the gold needed to buy the item, it says You do not have enough gold

quite simple really :lol:

there is an easier way of doing this, but since im not a genious at ASL i dont think i could tell you how, but my system works fine anyway

Anonymous
12 Aug 2003, 18:39
I;m not really a coder, or at least, not when it comes to ASL, is there a special spot I have to put it in?

GameBoy
12 Aug 2003, 18:44
send your asl file to ste_edwards16@hotmail.com and ill put it in for you.

Anonymous
12 Aug 2003, 18:54
coud I just add you on MSN? I;m not totally sure about how to do all this stuff.

GameBoy
12 Aug 2003, 18:58
yeah sure u can add me

Anonymous
12 Aug 2003, 19:04
Alright, I added you, I;m the sk8er132 guy. BBoy Spidy.

Farvardin
15 Aug 2003, 19:55
But how to create random things ? In the whole Quest manual, using the search engine I can't find a single line about "random", "randomize" and such.

paul_one
15 Aug 2003, 22:18
Just use the $rand( LowerNumber : HigherNumber )$ to generate a number and use a conditional to decide what to do based on that...

Ie, set a numeric variable(var1) to a random number using the $Rand(1;3)$ function.
Then add IF (a conditional) after IF on the range of results from above:
if (%var1% = 1) then msg <1 pressed>
if (%var1% = 2) then msg <2 pressed>
if (%var1% = 3) then msg <3 pressed>

I'm not tolerent enough to spell-it-out for you right now... :roll:
Experiment, find out basic stuff to do with programming, then try it.

GameBoy
16 Aug 2003, 00:18
here is some code for that example....


' Created with QDK 3.12

define game <>
asl-version <311>
start <>
game info <Created with QDK 3.12>
startscript set numeric <random; >
command <random> {
set <%random%; $rand(1;5)$>
if ( %random% = 1 ) then msg <Message 1>
if ( %random% = 2 ) then msg <Message 2>
if ( %random% = 3 ) then msg <Message 3>
if ( %random% = 4 ) then msg <Message 4>
if ( %random% = 5 ) then msg <Message 5>
}
end define

I think Im Dead
16 Aug 2003, 01:47
And when that doesn't work, it should look like this.


' Created By Hand

define game <MURDER>
asl-version <311>
start <start>
game info <Cyber Pwned!!11>
startscript set numeric <random; 0>
command <random> {
set <random; $rand(1;5)$>
if ( %random% = 1 ) then msg <Message 1>
if ( %random% = 2 ) then msg <Message 2>
if ( %random% = 3 ) then msg <Message 3>
if ( %random% = 4 ) then msg <Message 4>
if ( %random% = 5 ) then msg <Message 5>
}
end define

define room <start>
look <This is a room.|n>
end define


and to be safe you should get in the habit of making it look like this....


' Created By Hand

define game <MURDER>
asl-version <311>
start <start>
game info <Cyber Pwned!!11>
command <random> {
set numeric <random; $rand(1;5)$>
if ( %random% = 1 ) then msg <Message 1>
if ( %random% = 2 ) then msg <Message 2>
if ( %random% = 3 ) then msg <Message 3>
if ( %random% = 4 ) then msg <Message 4>
if ( %random% = 5 ) then msg <Message 5>
}
end define

define room <start>
look <This is a room.|n>
end define

Anonymous
16 Aug 2003, 05:35
Ok, thank you very much for your help.
If possible, it could be interesting to add an entry into the Quest manual about the "random" issue, I couldn't get the idea myself to look for "randomly" or "rand" only. Maybe I'm supposed to have read it all before... I'm doing this time by time.
To add your example in the manual would be great too.

paul_one
16 Aug 2003, 12:57
Number 1:
ITID wrote:game info <Cyber Pwned!!11>

Hahahha!!!! :P :D :wink:
I laughed my *ss off at that! I can't believe someone can forget the start room! :roll:

Number 2:
No, there's no reason for you to search for rand, and there should be a reference for the help file - but I also understand how hard making that *could* be (well, using the VC++ 6.0 program seems hard to me!!)... I'm not sure about 3rd party software.

Maybe Alex should have a "Random Numers" somewhere in that text block, make it easier to find... Or maybe Keywords at the bottom of each page for searching purposes?? That'll be hell! :twisted:

Number 3:
Hahahahaaa...... I'm still laughing!! :lol

_________________
Computer Whizz
==Insert Sig Here!==

Currently Listening To :
NO SONG
Using Winamp.

GameBoy
16 Aug 2003, 21:54
i didnt forget, i just didnt add it in because all he wanted was a random number generator...

Anonymous
17 Aug 2003, 01:32
i just found out about this game all i no is how 2 get on the form can somone plz tell me how u download it?

GameBoy
17 Aug 2003, 18:18
not very computer knowledgable are you....

a) not a game =)
b) DOWNLOAD QUEST is practically on every page of this site.
c) good luck with your games, enjoy you visit ;)