Unnamed Version 2.0
-------------------------

Welcome to the unnamed version 2.0. This is a tutorial on how to use both the map editor and the scripting language. 

Setup
-----

Put this game in QB.EXE directory or you can use CHDIR it really doesn't matter.

Tiles
-----

Tiles will not be copied. Well some can such as grass and houses and stuff. But those who are on my team. MAKE YOUR OWN DAMN TILES. Can you imagine what it will look like going into a new town with the same old fashion looking tiles? Same people? Man, how annoying. Because tiles are not totally indifferentiated in u MUST put your tiles from WALKABLE to UNWALKABLE in the PP256 tile engine. It doesn't matter how many WALKABLE tiles there are or Unwalkable, you just need all the WALKABLE tiles before the UNWALKABLE.

Map Editor
----------

Pretty self explanatory. The map editor cannot use some of the scripting language when playing. Type T to get a new tile set. FILL means to fill the thing with tiles

Sound
------

Sound is made with MKJ. No other sound system will be used on this game. MKJ's are easy to make. Ways to incorporate MKJ's in your scripts is in the script section.

Where to Send your stuff too
----------------------------

Send your stuff to gopus98@hotmail.com or send it to John Millard at valrenov@dove.mtx.net.au. And please send it in ZIPped sets or else I will look at it and laugh at you. Any comments or suggestions for scripts...or if you want to insult me...e-mail gopus98@hotmail.com

SCRIPTING TUTORIAL
-------------------

SET,X,Y

This sets the TX and TY of things. Every other command check the TX and TY. If you want an NPC to talk you first set its location and then use the MSGBOX command. Finding the locations are easy...you just need to have two windows open...one for the Map editor...and one for the text document...the map editor tells you what TX and TY you are currently at. 

SET,-1,-1

This will make it so wherever you are at commands will happen...no matter what. Not suggested to do...very annoying unless cut scene.

SET,1,1
MSGBOX,"TEXT"

This will send a msgbox at location 1,1. The hero doesn't need to be at the coordinate 1,1...the collision detection system actually moves more than it should...so if a NPC is at location 1,1 msgbox him. To make multiple msgboxs for one person just add another MSGBOX. Capitalization and commas are required for all commands.

SET,1,1
OPTIONMENU

Sets a window givign you a option between YES or NO. 

IFOPTIONNO

This will set up a IF THEN statement if the user picked NO for there IFOPTIONMENU command. END IF will be declared by ENDOPTION. Look at the following example.

SET,-1,-1
MSGBOX," WILL YOU MARRY MY DAUGHTER"
OPTIONMENU
IFOPTIONNO
MSGBOX," YOU DON'T WANT TO MARRY MY DAUGHTER??!"
ENDOPTION

Interesting. IFOPTIONYES is the same way...if the user chose Yes on OPTIONMENU...then...

SET,-1,-1
MSGBOX," WILL YOU MARRY MY DAUGHTER?"
OPTIONMENU
IFOPTIONYES
MSGBOX," YOU WILL MARRY MY DAUGHTER?"
ENDOPTION

Its the same way. There is a problem with nesting IF's and END IFs though. You can't do it. 


SET,-1,-1
FILL,1

This will fill the screen with tile number 1.


SET,-1,-1
IFTILE,X,Y,TILENUM
ENDTILE

IFTILE sees if the tile on coordinates X and Y equal TILENUM. Then it goes through an IF and END IF statement where ENDTILE=END IF. Possibly be used for AI scrolling NPC's!

SHOWNOGUY

This command shows NO GUY....duh

SHOWGUY

This command shows a guy...duh again

MASKPUT,X,Y,MASK,TILE

This puts a masked tile in coordinates X,Y and uses SET

TILEPUT,X,Y,TILENUM

This puts a tile...due to tilenum...in coordinates X and Y.

DELAY, numofdelay

Makes a delay of the number...TIMER used soon.

FADE

Fades the screen then fades it back up.

LOOK,LOOKNUM

Makes the hero look in certain places. LOOK NUMBERS=1,2,3,4

SET,1,3
WARP,TX,TY,XMAP,YMAP

Warp changes the location of the hero...like when he his a warp whirlpool or somethign. XMAP and YMAP are included because this way we can race the map. IF the hero is on 1,3 (SET) he will be warped.

SET,1,3
MAPWARP,MAPFILE$,TX,TY,XMAP,YMAP

The same as WARP except it changes the MAP. 

LEVEL,X,Y

This command is a IF END IF command. If LEVEL (X)=Y then it will do something until the keyword ENDLEVEL is given. 

LEVELPUT,X,Y

Levelput makes LEVEL(X)=Y. Perfect for a good storyline. You get a coconut the LEVELPUT makes it go up...then you can give it to a monkey to get a prize. You cannot use 1 and 2 for X...they are currently being used for the main story and sound...U CAN USE 3 TO 50! But don't hog. It's annoying. 

PLAYMUSIC, MUSICFILE$

Unfortunately if you just use this it will make the sound sound...well...terrible...you must use LEVEL so you don't keep LOADING the musicfile...it makes it sound crappy... here is an example:

LEVEL,2,0
SET,-1,-1
PLAYMUSIC,"MOBYDICK"
LEVELPUT,2,2
ENDLEVEL

Everytime I load a new map the LEVEL of 2 is sent back down to 0. This way it won't ruin anythign.

BATTLEGUY,SCENEFILE$,A,B,C

The most commonly used SCENEFILE is WOOD.SCE. This command makes it so when you meet an enemy you can talk to him and then fight him. A = first enemy, B= second enemy, C= third enemy. Three enemies you can fight at one time.

SET,-1,-1
MONEY,50

This adds the current money status for a player by 50.

SET,X,Y
IFMONEYHAVE, MONEYAMOUNT

Another IF and ENDIF type loop. If you have a certain money amount you can buy something. End if is equivilent in this case to IFMONEYHAVEEND.

SET,X,Y
IFMONEYLESS
...
IFMONEYLESSEND

Let's say you are buying something and you don't have enough money...the guy might want to say..."YOU DON'T HAVE ENOUGH MONEY TO BUY THIS OR SOMETHING"

THE TOOL ARRAY
-----------------

The tool array must be explained before I give out scripts about the array.

The tool array looks like this

TOOL (10,4)

Why? Well 10 means the number of people we can have in are RPG...even though only 3 of the ten can play at once. 4 means some of the initial stuff like ...offensetoolnumber,defensetoolnumber,offense,defense.
You see, when I created the thing where you get the sword I just changed the offensetoolnumber and the offense. 
The offensetool and defensetool number aren't really important in the main program...but it is important in the BATTLE engine. ENEMY.TXT which came with this packet checks to see what number you have and then does certain events depending on the number...

Okay here is how the 4 works

1= offensetoolnumber
2= defensetoolnumber
3= offense
4= defense

Now in a shop or something when you buy something you can change it in the script by doing this. 

WEAPONCHANGE,A,B,C

TOOLS(A,B)=C now...

A=the person
B= offense,defense, or one of the tools
C= the new number

Now with the weaponchange command you can change the weapon..you may be asking how you buy something...well here is the commands...

SET,X,Y
MSGBOX,"This costs $50...want to buy it?"
OPTIONMENU
IFOPTIONYES
IFMONEYHAVE,50
MSGBOX,"You have enough money!"
MONEY,-50
WEAPONCHANGE,1,2,2
WEAPONCHANGE,1,4,50
IFMONEYHAVEEND
IFMONEYLESS,50
MSGBOX,"You don't have enough money!"
IFMONEYLESSEND
   
And there ya go. I am going to have to add...to whom the item will go to depending on the person...but ya know..whatever...

This is pretty much the basics...unless you want to do one more thing

ENEMY.TXT
--------------
As you can see the enemy.txt is filled. But you can add stuff to it too. See the BADGUY commands. Well this are just some of the BADGUY things you can do. Currently there are two bad guys that fight in this game. You want to add a new bad guy? Well here's what you have to do!

*Add a new tile in BADGUY.PUT

Now it gives an example on the top of the screen how to give the enemy attributes such at defense and other such stuff. TILE# equals the new tile number in BADGUY.PUT of the badguy. You can give it a name too and HP and other cool stuff. Give the enemy an enemy number too so we can make him do stuff 

You can also give the bad guy a clip scene when fighting...go under ENEMYATTACK,1 and type in ENEMYATTACK, ENEMYNUMBER. Let's say your enemy number is 3...type in before END (because END will make it so the scriptting interpreter will quit reading from the file) ENEMYATTACK,3.

Now add your little script. LAND makes his current position disappear. You can use almost use any script that is in the scripting files in ENEMY.TXT

END
-----------------------

That's it...I'll add more scripts and stuff later...have fun...







