-
Notifications
You must be signed in to change notification settings - Fork 1
/
REFFILE.TXT
784 lines (506 loc) · 16.7 KB
/
REFFILE.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
Here is a list of functions, examples, and instructions to get
you started with REF programming.
Update (03/23/01): This file is slightly outdated, but most of the
way functions are shown in here should work the way that they are shown.
All commands MUST be capitalized in the REF file. Use a text editor.
Contents:
Section 1
A. Introduction
Section 2
A. Commands
1. #WAIT
2. #GOTO
3. #NEWPOS
4. #CLS
5. #PRINT
6. #GOLD+,-
7. Weapon Routines
8. Armour Routines
9. #CHOICE
10. #WRITE
11. #RETURN
12. #DONE
13. @IPS
14. #ANIMATE, #DONEANIMATE
15. #MOVEOBJ, #DONEMOVE
16. #SET
17. #IF
18. #MONSTER
19. #RUNREF
20. #RANDOMIF
21. @IF
22. #SHOW
23. #NOLINE
24. #SHELL
25. #CLEAR
26. @GOTO
27. #SLEEP
28. #DECLARE
29. #INPUT
30. #FIX
31. #GETCHAR
32. #DELETE
33. #LOCATE
B. @#INTRO, @#INVSCR, @#HELP, @#MAP
C. Instructions
1. Limits, MUST READ!!!
D. Using Color and Variables in your PRINT and WRITE statements..
--------------------------------------------------------------------------------
Section 1
A. Introduction
I created this REF file so that I wouldn't have to keep on going into
the program and editing it every time I wanted the program to do something
else. I was also very low on space available for the program. I still am
right now. I only have enough memory for about one more screen load. This
really helps me a lot because I no longer have to worry about memory, and
I am not limited to what I can do in a program. I am sure you will find
it very useful.
Section 2
A. Commands
I created a bunch of commands to help you with your programming. With-
out these functions, REF programming would not be possible. In this file
are detailed discriptions of each command.
1. #WAIT
Syntax:
#WAIT #
if # is 1 then a cursor will show
if # is 0 then a cursor will not show
Typed like it appears, this function needs no interduction. To use this
fucntion, just type it in. It will wait for a keypress in the program.
2. #GOTO
Syntax:
#GOTO ##
This function allows you to goto a different screen in the program. Valid
screen numbers are from 1-100. When you use this function, it will reload
the screen to that screen, and then you will be running under those functions
from that screen.
UPDATE: As of v.91A, there are now 1920 screens.... Have fun..
3. #NEWPOS
Syntax:
#NEWPOS ## ##
To change your position in the game, warps ... going to a different screen
etc., you will find the NEWPOS function very handy, the first number being
x and the second number being y. It is as easy in that, details will be
described in the Limits Section.
4. #CLS
Syntax:
#CLS
No description necesary. I think this command is pretty self explanitory.
5. #PRINT
Syntax:
#PRINT
#
SOMETEXT
This function allows you to print stuff out on the screen. To use this
function, you must first decide how many lines you are going to print, as
you can only print once on a screen. For instance, if I was going to print:
Hello, How are you
I am fine
Can I have a drink?
would appear in the REF file as
#PRINT
4
Hello, How are you
I am fine
Can I have a drink?
6. #GOLD+,-
Syntax:
#GOLD+ #
Use this function to give your player gold, or the basic "money" of the
game. The # would be replaced with how much gold you wanted to give them.
#GOLD- #
Use this function when somebody buys something, or when you want to simply
take away some gold. It has an automatic checker to see if the user has
enough gold. If the user doesn't, then it will simply print to the screen
"Not enough gold, press a key..."
7. Weapon Routines //REPLACING #WEAPON,+,-//
Use the #SET command to set the WEAPONNAME, WEAPONVALUE, and WEAPONPOWER
statements. The WEAPONNAME statement is what is displayed when a ref
file invokes the `I function. WEAPONVALUE does not need to be used, but
you can use it if you want to keep tabs on how much your weapon costs.
WEAPONPOWER is what the MonsterFunction Function in FQ2 uses to determine
your weapons usefullness in battle.
NOTE: When using WEAPONNAME, use #SET ### =2 ###;
where ### is a variable or string.
use =2 so that the weapon is in the CASE that your have it in the ref
file.
7. Armour Routines //REPLACING #ARMOUR,+,-//
Use the #SET command to set the ARMOURNAME, ARMOURVALUE, and ARMOURPOWER
statements. The ARMOURNAME statement is what is displayed when a ref
file invokes the `Z function. ARMOURVALUE does not need to be used, but
you can use it if you want to keep tabs on how much your armour costs.
ARMOURPOWER is what the MonsterFunction Function in FQ2 uses to determine
your armours usefullness in battle.
NOTE: When using ARMOURNAME, use #SET ### =2 ###;
where ### is a variable or string.
use =2 so that the armour is in the CASE that your have it in the ref
file.
9. #CHOICE
Syntax:
#CHOICE
#
######...
...
#IFCHOICE number
PROGRAMMING
@DONE
#IFCHOICE number
PROGRAMMING
@DONE
@DONECHOICE
#CHOICE replaces the old #NOP function. Instead of being limited,
you can use your programming powers... with choice, you first enter the
amount of options that you want.. for instance 2, and then enter the options
in, for instance: Buy RPG and leave, like this
#CHOICE
2
Buy RPG
Leave
then, you use if to do what your option says... It searches the file
for the next "IF 1", or "IF 2" and so on...
#IFCHOICE 1
#CLS
#PRINT
3
Here, try out your new RPG
Now wheres that 20000
#WAIT
#GOLD- 20000
@DONE
#IFCHOICE 2
@DONE
@DONECHOICE
10. #WRITE
Syntax:
#WRITE
SOMETEXT
Use this function to print stuff in the status display box at the bottom
of the screen during gameplay. It will say it if you nock up against some-
thing, and also when you go onto something. Whether you "knock-up" against
them or go "onto" them depends in the space is hard or not specified in the
level editor. Enter the text you want in the "SOMETEXT" position. You must
not use a comma ",".
UPDATE: As of v.92c, you can now use a comma in your statements....
11. #RETURN
Syntax:
#RETURN
Use after IF (number) sections to return to first menu.
12. #DONE
Syntax:
#DONE
Used to end an @IPS function
13. @IPS
Syntax:
@IPS ## ##
PROGRAMMING
#DONE
This is the most important function of them all. the ## ## is X, then Y.
In between the @IPS and #DONE, you do all your programming with the functions
up above. @IPS means "IF POSITION IS ## ## THEN DO THIS".
14. #ANIMATE
Syntax:
#ANIMATE
#
PROGRAMMING
#DONEANIMATE
#DONEANIMATE is used to end #ANIMATE sequences.
Programming function to add animating in the program. This function was
added late in the development stage and has not been tested. It may most
likely not work correctly, so I suggest using #MOVEOBJ, but if it does...
The first # under "#animate" is used to tell the program whether to sleep
1 second while before a function is run. If it is "1" then the program will
wait 1 second and then continue. If it is 0 or anything else, it will not.
The "PROGRAMMING" stands for any regular function that is in the program,
etc. #PRINT,#CLS,#WRITE. #NOP will not work, do not use this function in an
animated process. I'm not sure what will happen.
15. #MOVEOBJ
Syntax:
#MOVEOBJ
#
## ##
## ##
#DONEMOVE
#DONEMOVE is used to end the #MOVEOBJ sequence
Used to move the object at X,Y to another place on the screen.
# - Number of Seconds to halt computer (for animation). This value
can be anywhere from 0.01 to infinite. (added as of Rev 0.92C)
## ## - X and Y coordinates, where the object is on the cur screen
## ## - X and Y coordinates, where to move the object..
16. #SET
Syntax:
#SET ## +,-,=,+1,-1,=1,=2,+2 ##;
Use to set a variable in the game. For instance...
#SET SOMETHING + 36;
+ = add number on right side to variable on left side
- = subtract number on right side from variable on left side
= = Set variable on left to number on right
=1 = Set variable on left to VARIABLE on right
-1 = Subtract from variable on left the value of the variable on right
+1 = Add to variable on left the value of the variable on right
=2 = Set Variable on left to string on right
+2 = Concanterate Variable string with string on right.
17. #IF
Syntax:
#IF ## =,>,<,>=,<=,<1,<2,>1,>2,=1 ## THEN
#ENDIF
Like....
#IF SOMETHING = 36 THEN
#WRITE
`!HELLO
#ENDIF
= = IF variable value on left is equal to the NUMERAL value on right THEN
> = IF variable value on left is greater then the NUMERAL value on right THEN
< = IF variable value on left is less then the NUMERAL value on right THEN
<= = IF variable value on left is less then or equal to the NUMERAL value on right THEN
>= = IF variable value on left is greater then or equal to the NUMERAL value on right THEN
=1 = IF variable value on left is equal to the variable value on the right THEN
<1 = IF variable value on left is less then or equal to the variable value on the right THEN
>1 = IF variable value on left is greater then or equal to the variable value on the right THEN
<2 = IF variable value on left is less then the variable value on the right THEN
>2 = IF variable value on left is greater then the variable value on the right THEN
18. #MONSTER
Syntax:
#MONSTER
######
######
######
######
######
To specify a monster of your choice to fight during a game...
#MONSTER
I'm gonna rip off your balls.. ;what the monster says
Pig Cop ;what the monster's name is
35 ;the monster's hitpoints
62 ;the gold you get for killing it.
67 ;experiece when monster defeated
Use MAXENERGY for the hitpoint place to make this monsters hitpoints
as much as yours..
19. #RUNREF
Syntax:
#RUNREF #######|#####
Use to run a REF file outside the FQREFS file..
EG:
#RUNREF FOREST.REF|WOMAN
20. #RANDOMIF
Syntax:
#RANDOMIF #
###
#ENDRANDOM
Use this command to have a random sequence in the game, for instance.
#RANDOMIF 6
#WRITE
`CHello
#ENDRANDOM
The above program will have a 1/6 chance of writeing "Hello" on the
screen..
21. @IF
Syntax:
Same as #IF except occours outside of @IPS statements...
22. #SHOW
Syntax:
#SHOW Somefilename|somelabelname
Use show to show different pictures in game... somelabelname is for example..
JEFF
and it would look for
@#JEFF
in the Somefilename file..
23. #NOLINE
This will delete the status barr at the bottom of the screen... Run it in a
@DO statement..
24. #SHELL
Syntax:
#SHELL SOMEPROGRAMNAME
Use this command to run programs outside the ref language..
25. #CLEAR
Syntax:
#CLEAR SOMELINE
Use this to clear a line on the screen...
26. @GOTO
Syntax:
@GOTO SOMELABEL
Use this to goto a labeled spot in the ref file...
EG.
@GOTO AKORI
It will look for @#AKORI in the reffile...
27. #SLEEP
Syntax:
#SLEEP #
Where # is the amount of seconds to wait at a certain position...
Eg. #SLEEP .5 ... will halt the computer for .5 seconds. This has the
same effect when using #MOVEOBJ as of Ver .92C
28. #DECLARE
Syntax:
#DECLARE ###
Where ### is the variable to declare. This is useful for declaring
variables in your program and not putting them in you Variable.DAT
29. #INPUT
Syntax:
#INPUT
length
x
y
where length is the length of the input box, x is the x coordinate
and y is the y coordinate of the box. The value of #INPUT is returned as
the variable LASTRESPONSE
30. #FIX
Syntax:
#FIX #VARIABLE#
where #VARIABLE# is some variable. This command is useful in getting rid
of fractions that users may enter during an Input command. It always rounds
down.
31. #GETCHAR
Syntax:
#GETCHAR #
where the # is 1 standing for a cursor to be blinking while the user makes
his decision, and a 0 is for a cursor not to be blinking. The character
returned by the user is returned as the variable LASTCHAR.
32. #DELETE
Syntax:
#DELETE ####
where #### is some setting.
Use this to delete a setting that you created with DECLARE, or set with
SET.
33. #LOCATE
Syntax:
#LOCATE ##,##
where the first ## is X coordinate, and the second is Y coordinate.
Use this function to chance the position of the cursor on the screen for
successive #PRINT statements.
UPDATE: WAS REMOVED
------------------------------------------------------------------------------
B. @#INTRO, @#INVSCR, @#HELP, @#MAP
@#INTRO...
Intro is what is on the Main menu screen...
You do it like this..
@#INTRO # ;# is some number from 1 to 25, howmany lines of graphics there are.
15;1 ;Color of an option currently selected foregroud;background
15;0 ;Color of an option not currently selected foregroud;background
11;33 ;(Y;X) Position of "Begin Game" on screen
12;33 ;(Y;X) Position of "Save Game" on screen
13;33 ;(Y;X) Position of "Load Game" on screen
14;33 ;(Y;X) Position of "Help" on screen
15;33 ;(Y;X) Position of "Resume Game" on screen
16;33 ;(Y;X) Position of "Quit" on screen
######## ;The screen graphics...
@END ;End function
@#INVSCR
Invscr is what is on the Inventory screen when you hit I in a game...
Like this..
@#INVSCR # ;# is how many number of lines you have to program...
########### ;programming, graphics...
@END ;End function
@#HELP
This is what is shown in the help menu option...
@END
@#MAP
This displays on the map screen...
@END
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
C. Instructions
1. Limits, MUST READ!!!
You must be very persistant and very careful when you are programming in
REF, because if you aren't, the program is likely to really "SCREW..."
However, if you type in a word the ref system does not understand, it will
simply skip over it. This is so you can put comments in your ref file.
Here is a sample REF procedure for if you were to move to x3,y20...
@IPS 3 20
#CLS
#PRINT 2
`1Hello, How are you?
#CHOICE
2
Respond "Fine"
Leave...
#IFCHOICE 2
@DONE
#IFCHOICE 1
#CLS
#PRINT 4
`2Me too.
`3Tea??
#CHOICE
2
YES
NO
#IFCHOICE 2
#PRINT
4
`@Ok.. that's fine... Press a key...
#WAIT
@DONE
#IFCHOICE 1
#PRINT
4
`!Yes Please...
#WAIT
#CLS
#PRINT
1
`$You leave content...
#WAIT
@DONE
@DONECHOICE
#DONE
------------------------------------------------------------------------------
D. The fundimentals of Colors and variables!!!
To use a color is simple, when using a write or print state ment, just
put in a "`" without the quotes, followed by a symbol with the color you
want..
1 = Dark Blue
2 = Dark Green
3 = Dark Cyan
4 = Dark Red
5 = Violet
6 = Brown
7 = Light Grey
8 = Dark Grey
9 = Light Blue
0 = Light Green
! = Light Cyan
@ = Light Magnenta
# = Light Purple
$ = Yellow
% = White
To change the background color in a statement, put `b# where # is
1 TO 7..
Variables...
Using a "`" and then one of these letters will do something...
K = Clears the Screen
F = Put HEX CHR on the screen
E = Show's Experience
N = will change color to a blinking color.. after N, put 1,2,#,$, so on...
X = Change cursor x pos... must have two characters.. EG `X02
Y = Change cursor y pos... must have two characters.. EG `Y03
C = Center the Words on screen
H = Show's hitpoints...
G = Show's Gold...
A = Show's Attack...
D = Show's Defense...
I = Show's Weapon Name
Z = Show's Armor Name
? = Show's game Version and Revision
The "`v" function...
You use this to show the user what a set variable in your program is...
For instance...
if WOMAN = 5, then you would put in `vWOMAN` .. and you would get 5 in
your print statement...
***** Special Note on `X and `Y *****
You can use variables for your `X and `Y coordinates... For instance..
@#SLEEPER
#CLS
#DECLARE X
#DECLARE Y
#SET X = 1;
#SET Y = 2;
@#SLEEPER1
#SLEEP 1
#PRINT 1
`X:X;`Y:Y;`$.
#SET X + 1;
#IF X = 11 THEN
@GOTO DONE
#ENDIF
@GOTO SLEEPER1
@#DONE
@END
End of Documentation