So you want
to make a user level?
Ok, you've won the
game and you've downloaded all the user levels you can find and
it still isn't enough - you know you can make a better, cooler and
more challenging level. This tutorial will have you playing your
masterpiece in no time. It assumes you have Winzip
installed, know how to access your Pocket PC with file explorer
and have a paint program.
What's a .thf
file?
It's a zip file renamed
.thf. Why didn't I just leave it named zip? I thought it would be
too confusing - everybody would start unzipping it everywhere when
in fact, no unzipping is required (it won't work if you do) - you
just need to plop it in the userlevel dir on your PPC.
I know what you're
thinking - great, I have to rename it to .zip everytime I want to
open - not really, there is a trick: Double click a .thf file in
file explorer (let's say you've download Akiko's love_maze.thf)
- Windows doesn't know what it is and asks you to choose a program
to open with it - scroll down to Winzip and click ok. Viola! You
are now looking at the contents in Winzip, in the future this will
happen automatically.
A good way to work
is leave the Winzip session open and showing the files all the time
- when you need to work on one, drag it into a folder. When you're
done, drag it back in. Winzip will prompt you to add it, just press
enter and your file has been updated.
To test your level,
just copy the .thf file into your Thief\userlevels folder. I'll
assume you know how to open up you PPC device in an explorer window
on the desktop.
The level.txt
file
What is this magical
file all the kids are talking about? Well, like most data driven
games RT needs to know certain things about the level to display
it. This txt file is how we tell it what's what. The levels that
are including with RT are not zipped, and if you look in your gamelogic
dir you'll see all of them - now now, don't use your new found power
to edit them and cheat, rather use them as examples.
Let's do what we
came her for, let's make a level.
Let's start by making
the simplest level imaginable. No replaced sounds and only one graphic
- the level itself.
First copy one of Akiko's
levels to your HD - let's say, level1_main.png. (You'll find it
in \Program Files\Games\Thief\Graphics\Gamedata) Open it in Photoshop
(or whatever you have) - edit it! Draw anything you like, but remember,
walls that hurt you must be pure white - RGB 255,255,255.
(this can actually be changed to any color, or be set instead to
"you must be standing on this color or else" mode but
we won't worry about that for now)
Let's assume you've
copied in a .jpg of your head and drew some white lines. You have
an idea of where you want the start and finish to be. Get the X/Y
coordinates of the start and finish positions and write them down.
Convert the file to 8 bit. (256 color)
Any palette is ok. Actually, you can use 16 or 24 bit images if
you wish, but I find I can't see the difference (usually) and it's
a waste of space compared to an adapted 8 bit pic.
Save the file as mylevel.png.
Ok, we have the "playfield"
ready, now we need to make our level.txt file. Instead of typing
everything in by hand, just download this level.txt
I made.
Zip it!
Without editting it at all your level
will run - but you might die as soon as you start or something,
so let's edit the text file. Look for start_xy|22|104 - change this
to the thief's start point you wrote down before. (the 22 is the
X (horizontal) and the 104 is the Y)
Next you'll want the diamond to show
up in the right place. Scroll down - look for //create finish icon
then look a bit below for "set_xy|189|69" - set this to
where your diamond is supposed to be.
Also, if you named your level something
other than mylevel.png you'll have to change that too. (the level.txt
file is the only file that MUST be named a certain thing, the rest
you can choose)
Test it
To test it, make sure the mylevel.png
and level.txt are in the same dir (on your desktop computer) and
highlight both files in explorer. Right click and choose "Add
to zip". Name the zip "crap.thf" or something.
It's ok to use a long name if you want, but I wouldn't use spaces,
use underscores instead.
Drag and drop the .thf file into your
userlevels dir on your PPC. (Ok fine, it would actually be \Program
Files\Games\Thief\userlevels
Run Thief and click User Levels - if
you see a different level, use the arrow buttons to cycle until
you see your level. Instead of a preview pic you should see a giant
question mark because we did not specify one in the level.txt file.
Ok so you played your level - to add
things like spinners and animations you need to understand the "Sprite
statement" format.
Getting fancy
For instance, to add a spinner to your
level cut and past this into your text file somewhere:
sprite_clear
file_name|graphics\gamedata\spin_
animation_active|300
set_xy|145|143
set_sort|1
sprite_create
A spinner is born! Change the 300 to
change how fast it spins (it's just an animation we're pulling from
the graphics RT comes with)- you could make any kind of moving obstacle
you wish if you feel like including them in your thf. Any number
of frames is ok.
You already know how to set the position
by changing set_xy. There are lots of statements you can add between
the sprite_clear and sprite_create to cause different effects -
such as moving, scaling, how animations are played and what frame
they start at and who get's drawn over who. You can layer multiple
effects together.
Check the Thief
Scripting Reference for more information.
That's all for today,
class.
Now go make some levels! If you would
like them posted here at the www.recklessthief.com site just email
them to Akiko and she'll put
it up. (that's her department) If you have any technical questions
ask me. (that's my department)
If you have any suggestions for new
features or find bugs please let me know.
- Seth
Go back
|