Log In
Name:
Pass:
Online Members (0)
No members are currently online.
Current Interguild Time:
Fri Apr 19 2024 11:59 pm
Member Chat Box  [click here to enlarge]
Recent Posts and Comments
ShareThis
« Blogs Index < Game Guides < HATPC Guides < Beginners' Guides
« Livio's Blog

Intro to Cave Codes and the Basics to Uploading

As I said in the previous section of the Manual, you need an account on Neopets.com in order to make your creations playable. Then you need to go to the Cave Upload page, which we call the Uploader. In that text box, you're supposed to paste your cave codes in there, but what are cave codes? A Cave Code is a text version of your cave. When you save your cave, CaveMaker will convert your map into text, and after uploading, the game will interpret that text to remake your level. In CaveMaker, you can go to Edit > View Map As Text to see your cave code.

Edit - View Map as Text
You can view your cave code in CaveMaker by going to Edit > View Map As Text.

The Cave Code Window
This is the cave code of one of my past caves, Primary Lotus.

After clicking on it, a new window will open inside of CaveMaker. You'll probably notice that the text version actually looks similar to your real cave. The cave code system isn't very complex. For each tile, there is a text substitute. You'll also notice that at the top there are a few lines that don't have to do with the map. Instead they define extra information. And at the bottom of the window, there are three buttons: Select All, Copy to Clipboard, and Close. Remember from the previous page that the Clipboard is where items that get copied are temporarily saved to. While each CaveMaker window has its own Clipboard, when you copy this cavecode, it will get saved to your computer's normal clipboard, which will allow you to paste it in other windows. But before you can successfully copy it, you must Select All.

Now that you have the cave code, it's time to upload! Go to the Uploader, and paste your cave code into the text box. If you submit the code it may or may not go through, depending whether or not your cave meets all of the requirements for uploading. We'll go over these requirements later, but first let's understand a little more about how cave codes work.

The Cave Code Language

The language of cave codes is very simple and easy to learn. There is completely no need at all to try and learn to read cave codes, but it's so simple that it wouldn't take long to do so. But actually understanding cave codes does have its benefits. It means that you can read the map up close while its in its text version, and it's easier to communicate ideas without having to go into CaveMaker every time. Like I said before, each character stands for a specific tile. The following is a alphabetical list of what every character does:

b Wooden Crate x Terrain @ Water Crate
D Door z Secret Area # Starting Position
G Gem | Metal Dynamite ^ Arrow Up
k Metal Crate < Arrow Left ( Tutorial Left
L Life/Heart Crate > Arrow Right ) Tutorial Right
m Stalacmite . Air Pocket + Treasure Chest
n Tutorial Up / Wooden Dynamite = Wooden Platform
o Boulder " Ladder 1 Enemy 1 (Bird)
t Water Tap [ Wooden Platform Right 2 Enemy 2 (Monkey)
u Tutorial Down ] Wooden Platfom Left 3 Enemy 3 (Skull)
V Arrow Down ~ Water Level 4 Enemy 4 (Ghost)
w Stalactite ! Water Tap Crate 5 Enemy 5 (Zombie)
Unused Characters: A C E F H I J P Q R S Y  , ? : ; ' { ` $ % & *

Non-keyboard characters don't work either, and the invisible space character signifies an empty tile. Also, the coding is not case-sensitive, so terrain, for example, is both x and X. There are a lot of new things you can do by editing the text of your cave, but we'll go over that later. When you view your coding outside of CaveMaker, if it's not lined up then that may be because you're not viewing it under the correct font. You need a font that lines up, such as Courier New.

There is a major difference between the code that you copy from CaveMaker, and the code inside your .txt file. When you copy your text directly out of CaveMaker, it automatically adds a border of terrain around your cave. However, when you open up your .txt file, that border will not be there. This means that you can create your own border out of something else while inside CaveMaker, such as steel crates, or you can take advantage of the Floorless Glitch further explained in CAVEMAKING-5.1: Floorless and No Borders. Also, having no border can give your cave a more open feeling.

I generally don't use the automatic border too often because I like to see my entire cave in CaveMaker, but using it can also be a hassle. If you make a cave with the automatic border, then you'll have to open CaveMaker every time you want to re-upload that cave. Plus, if you post your code somewhere and it doesn't have the automatic border when it needs it, it could ruin your cave if someone tries to play it like that.

Cheating the Uploader's Demands

The Uploader won't accept just any text that you put into it; it has to be a valid cave. The most basic requirements is that the first few lines include a title, terrain type, background type, and a water type. Each cave also needs one starting position and one door. You also aren't allowed to put more than one Gem, Heart Crate, or Water Level in a cave. The maximum size for a cave is supposedly 8,000 characters, while the minimum is supposedly 256 characters. Seems like a lot of rules, doesn't it? Well, this part of the guide is all about breaking those rules!

Some Uploader Errors
These are some of the the errors that you can get. The Cave Name error is a new one that you can now get.

Multiple Gems and Hearts

Let's start with something easy. To do this, you must manipulate the cave code before uploading it. Open CaveMaker and make a small room with the starting point and the door in it. Then put a Gem on one side of the room. Copy and paste more gems surrounding the original. Now go to Edit > View Map As Text, and paste the code into the uploader and submit. It shouldn't have worked because it says that you are only allowed one Gem per cave. Now go back to CaveMaker, and replace the extra gems with boulders, so that there is only one gem. Then get your code and paste it into the uploader. Before submitting, find the room that you created in the code. Now, find the cluster of boulders, which will be represented by "o"s. In the middle of the cluster should be a capital "G". Now, replace each boulder (o) with a lowercase "g". Submit, and it should go through! Now open HATPC and see for yourself by playing your level.

Basically what we did was sneak past the Uploader by using lowercase g's instead of capital. The Uploader only counts capital g's, but HATPC still recognizes it as a gem. So now you know how to put unlimited gems in your caves! What about Hearts? Well, they work the same way. The only difference is that the code for Heart Crates is "L". To add more, you would have to use lowercase "l"s.

Lots of Gems and Hearts

When you plan to manually edit your text, it's good to make some sort of marker to help you add the tile in the right place. In the example, we used boulders, but when you get to building more complex caves, it's better to use a tile that you wouldn't normally use, such as a tutorial arrow. For example, if you mark all places you want a gem to be with a tutorial arrow, then you could just open your code in Notepad (or paste it there if you want the border), go to Edit > Replace or Ctrl+H, and do Replace All to turn your tutorial arrows into gems. That would definitely save you time, but it's easy to forget to do if you need to test your cave a lot.

Multiple Enemies

You'll find that CaveMaker will put restrictions on how many enemies and how much of each kind you can use. You can bypass this by either copying and pasting in CaveMaker, or by adding the enemies into the code. A limit of 6 enemies will appear when you run the game, and the enemies that show up first in the code get generated. There is one glitch, however. You cannot have more than one Ghost enemy in your level. A strange glitch happens with this that only the very last Ghost that appears in your code is generated, while the rest don't.

Multiple Doors?

The symbol for the Door is a capital D, so we should be able to add multiple doors if we make the rest lowercase d's, just like how you would add multiple gems or hearts. Well, if you try it, you'll find that it does work, but not completely. All of the doors will show up on the map, but only the very last door will show up in the actual level. By the "last door", I mean the last door to show up in the text, if you were to read it from left to right and top to bottom.

So if you thought you would be able to put in fake doors, you're probably disappointed. However, there's another way to put in multiple doors, and the following technique will actually show two doors in a level. For this glitch to work, the cave has to be extremely wide. Then, the door has to be put at the right-end of the cave. Such a wide cave would cause a glitch and make a fake door towards the middle of the cave, but don't get excited yet. The cave needs to be so wide that there is possibly no room for the cave itself. Canadianstickdeath (CSD) made a cave called "The Long Crawl" and only that was able to spawn the glitch. He even made a video about it so that you won't have to play the cave to experience it:

Obviously, you won't be able to implement fake doors in your level because of how impractical it is, but if you want to create a strange and confusing map with multiple doors on it, you are free to do that. Just remember that the last door is the real door.

Minimum/Maximum Width and Height

As promised from the previous page, I will teach you how to pick the best width and heights for your caves! The Uploader blocks off caves that are either too small to be a cave or too big to save in their databases. Let's talk about the maximum size limit first, because that's what you'll be fighting against most often. However, you should first understand how the Uploader decides when to block a cave. The Uploader actually counts all of the characters in the cave code and makes its judgment from that. Fortunately, it ignores the first few lines of code when doing this count, so the character count is always predictable for every width and height. You must also realize that it counts all characters, and a new line also counts as a character.

--Maximum Size

According to the Uploader, the maximum size for a cave is a 90x90 grid, but what makes this incredible is that it also says that the maximum character count is 8,000 characters. And we all know that 90 times 90 is NOT 8,000. And to make it even more incredible, 8,000 isn't the real character limit. After doing several tests, I've found that the real limit is actually 7,914 characters! Go higher than that and it blocks your code. The real limit is 86 characters less than what is claimed, while the maximum number of characters that the first few lines can possibly take up is 55 characters, so it doesn't look like they were making room for those first few lines with this lie.

This may all sound confusing, but just remember that the character limit is 7914. To get the most space out of your cave, you can calculate your dimensions so that they take up the most room that they possibly can. For example, CSD's cave, "The Long Crawl", takes advantage of the maximum character limit by using only three tiles of height and expanding the width as far as possible, and it all stays within the character limit. However, finding the maximum size for your specific dimensions isn't as simple as multiplying you width and height together. Many other factors also count, such as the fact that every new line adds to the character count and whether or not you decide to use the automatic border. Because things can get complicated, I've come up with an equation to help you calculate the maximum size of your cave:

Maximum Equation

If you can't see the image, here are the equations again: x = (7915/y) - 1 and y = 7915/(x + 1). And here are the equations for if you plan to use the automatic border: x = (7915/(y + 2)) - 3 and y = (7915/(x + 3)) - 2.

Remember that the character limit is 7914, not 7915. This equation assumes that you will erase the new line that is put at the end of your cave code; that is why it's based around the constant 7915. In order to use these equations, you need to have the specific width or height that you plan to use. Then you plug it into the equation that equals what you're looking for. If you're looking for the largest width of a 50-tile high cave that has no border, then you would use the very first equation. According to the equation, the largest width would be 157.3 tiles, or just 157 tiles because you need to round down. If you round up, then you'll go past the limit.

Another very important thing to understand is that ladders count for two characters. One character is for the quotation marks ("), but the other character is a back-slash () placed before the quotation marks to avoid making errors in the script. So be aware that if you are using ladders in your level, you may find that your level goes past the uploader's limits. To avoid this, subtract the number of ladder tiles in your level from 7915, and then run the equation again.

--Minimum Size

You might not get excited about building the largest cave possible because of the workload that would come with it, but if you really want to test your skills, you can go for the smallest cave possible. After the Uploader's lies about the maximum size, you probably wouldn't trust whatever it has to say about the minimum either, right? Well, you are right. The Uploader claims that the smallest size is 256 characters, which is a 16x16 cave. However, the real minimum is 241 characters. It's not as drastic as the difference between the maximum size and the real size, but at least you know that you can reach a smaller size than what they said. Now, here are my equations for finding the minimum dimensions:

Minimum Equation

These equations are very similar to the previous equations. Again, if you can't see the image, here they are: x = (242/y) - 1 and y = 242/(x + 1). And if you plan on using the automatic border: x = (242/(y + 2)) - 3 and y = (242/(x + 3)) - 2.

This is similar to before, in that all you need is either a width or height and you can find the smallest dimensions that you can have with it. The reason that these equations are so similar to the previous one is that they find dimensions that equal the maximum or minimum, and then your round either up or down depending on which you are looking for. For the minimum, you would round up, because anything lower would go below the minimum.

One trick to make your level smaller is to use more ladders. Because they count for two characters, as explianed before, you can make your dimensions even smaller.

In the next section, CAVEMAKING-1.3: The Basics of Making a Cave, we'll continue to discuss choosing the width and height of your cave, and you'll learn what sizes and dimensions are best for specific types of caves.

The Disappearing Lines of Code

You still have yet to see how to make the smallest cave possible. This method involves taking advantage of a glitch that lets you add enough text to get past the uploader, but with it, your cave can be smaller than ever. Basically when a line of your code doesn't have the same number of characters as the first line, the game won't load it correctly, and it'll skip it. Therefore, if you make a very small cave, you can get it past the uploader by adding lines that don't match the length of the first one.

Disappearing Lines
As long as the additional lines don't match, you can make small caves that make it past the minimum character amount.

Very Tiny Cave
Tiny Caves look Strange because of the infinite white void that surrounds them.

If you try to use this to create caves without a Starting Position or a Door by putting them in lines that will get skipped by the game, then it will place them at the default position, which is (0,0). If the door is there, then it's impossible to enter it.

The Infamous Uploader Glitches

We've pretty much covered everything so far, but now you will learn about something that is vital to your survival as a caver. Ever since Neopets.com began to neglect HATPC, they've been trying to add a lot of things to the site that interfere with the game and causes glitches. The most recent update was that they started putting ads in all of the game windows. Fortunately for us, we can just open the game from here and avoid the ads, because the ads themselves glitch up how HATPC works. Apparently the game needs to know how big the window is so that when it loads the levels, it can build them accordingly to the size of the window that it's in. The ads stretch out the window, so HATPC glitches up when loading the levels and builds part of it off-screen, as if the advertisement was overlapping the game. That's why you should open the game from here.

However, that has nothing to do with the Uploader, like the title says. That's just an example to show you how Neopets.com doesn't know how to run their own game. One problem that Neopets.com ran into was that they figured out that people could post html in their Uploader and make things such as redirecting links, which will let them link to sites outside of Neopets (which they do not allow). On the weekend of March 30 2007, they added html filters to their uploader. It blocked these symbols: <, >, ", and '. Html can't possibly work without these symbols, but they also overlooked the fact that <, >, and " are all symbols used in the CaveCodes. This caused a massive glitch that wouldn't allow us to use arrow crates or ladders. Any arrows would be replaced with a message saying "-no tags here-", which stretch out the coding and caused the Disappearing Lines glitch mentioned previously.

That glitch became known as the Great Uploader Glitch of 2007, and it ended almost two months later on May 15. During those two months, we basically spammed Neopets.com to death with thousands of error reports and editorial questions. We all risked getting frozen by spamming them, but it was all in vain because Neopets didn't realize the problem until they looked into why people stopped joining their Cave of the Week (COTW) contest. On May 10, they actually had to extend one week because of how little entries they were getting. After the glitch was fixed, we all got hundreds of neomails replying to the thousands of reports that we sent.

What did we learn from that? That we can't rely on Neopets.com when something goes wrong. I'm still not sure if they fixed the Uploader because of our hard work or because they finally noticed it themselves. It didn't get completely fixed, though. Now, the uploader adds a  behind any ladder that you put, and it's really unfair how that adds to your character count. So you should refrain from using ladders if you're making the largest cave possible.

Currently we're going through the Great Uploader Glitch of 2008, which doesn't allow you to put any two arrows on the same line facing away from each other. This started around New Years, when they tried to add html filters again. We honestly think that this glitch is here to stay, so you'll just have to avoid using arrows like that. The thing with this glitch is that it blocks arrows that are facing away from each other. If it sees two arrows like this: < >, it doesn't matter how far apart they are because they'll get deleted out of your code, which will again cause the Disappearing Lines glitch. However, it will not block any arrows like this: > <. Also if there are no characters at all between the two arrows, such as in this situation <> (no space), then it won't get filtered.

In Conclusion...

You now know how to use the CaveMaker program, and you also know how to manipulate your Cave Code to help upload your caves. In the next section, you will not be learning how to use the program anymore, but instead it'll teach you how to  make a cave in general. It'll teach you what you need to know to make sure that what you think the cave will look like is the same thing as what it will look like.

[?] Karma: 0
User Comments (13)
« Forum Index < The Hannah and the Pirate Caves Board

canadianstickdeath
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 3:40 am EST

Age: 35
Karma: 350
Posts: 2990
Gender: Male
pm | email
"Enemy 1 (Bird)"? Most of those enemies have names, you know. Would it be worth it to be accurate, or does anybody even know that the "bird" is called a pawkeet? Maybe this'd be more suited for the "tiles" article, so "Pawkeet" would be adjacent to it's picture....

"You'll find that CaveMaker will put restrictions on how many enemies and how much of each kind you can use." I'm finding so such occurrence.
canadianstickdeath
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 3:44 am EST

Age: 35
Karma: 350
Posts: 2990
Gender: Male
pm | email
"The Cave Name error is a new one that you can now get." The newest is actually "failed profanity check", which should be added to the article, somewhere.

Oh, and the min/max equations are still wrong.

"and a new line also counts as a character" So far as I've heard. New lines are two characters, \r and \n. "The real limit is 86 characters less than what is claimed", so 5 guesses what the height of your test cave was.
jellsprout
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 4:45 am EST
Lord of Sprout Tower

Karma: -2147482799
Posts: 6445
Gender: Male
pm | email
Each row you use except for the first one takes up 2 extra characters.
The maximum characters you can use in a cave is exactly 8000, the minimum is exactly 256. This doesn't include name, water, background and terrain types, but it does include those 2 extra characters for each new row and it takes 2 characters for each ladder you use.

So if you have a cave of size 40*40 with no ladders, the actual size is 42*40-2 (each row is 2 tiles wider, except for the first line) = 1678 characters.
But if you have a cave of 20 wide and 80 high with no ladders, the actual size is 22*80-2=1758.
If you do use ladders, you need to add one extra character for each ladder you used.

So the actual formula is: (width+2) * (height) - 2 + (amount of ladder tiles). Add another 2 to both the width and height if you copy from the Cavemaker (because of the borders).

I'm going to link to here with a few tricks and glitches. It is explained here pretty good what they are and do.


Spoiler:
jellsprout
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 2:38 pm EST
Lord of Sprout Tower

Karma: -2147482799
Posts: 6445
Gender: Male
pm | email
Accel,

FIX


Spoiler:
Livio
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 2:41 pm EST

Age: 31
Karma: 470
Posts: 9620
Gender: Male
Location: Arizona, USA
pm | email
first of all, you guys can make edits to these article too, and the only thing I have to edit is that picture, and with that image uploader, you guys can even do that too.

but I'll fix the part on the character limit now...
Livio
[?] Karma: 0 | Quote - Link
Friday, June 26 2009, 2:42 pm EST

Age: 31
Karma: 470
Posts: 9620
Gender: Male
Location: Arizona, USA
pm | email
I'll also add page anchors to this article so that we can link to certain parts of it
canadianstickdeath
[?] Karma: 0 | Quote - Link
Thursday, August 27 2009, 9:59 am EST

Age: 35
Karma: 350
Posts: 2990
Gender: Male
pm | email
'Livio' said:
but I'll fix the part on the character limit now...
'Livio' said:
I'll also add page anchors to this article so that we can link to certain parts of it
So did these ever happen?
Livio
[?] Karma: 0 | Quote - Link
Friday, August 28 2009, 12:26 am EST

Age: 31
Karma: 470
Posts: 9620
Gender: Male
Location: Arizona, USA
pm | email
lol I dunno, what happened? I guess I forgot had more important things to work on.
canadianstickdeath
[?] Karma: 0 | Quote - Link
Wednesday, July 21 2010, 10:57 pm EST

Age: 35
Karma: 350
Posts: 2990
Gender: Male
pm | email
This guide neglects to mention how to properly format a header.
Bmwsu
[?] Karma: 0 | Quote - Link
Saturday, January 29 2011, 8:17 pm EST

Age: 28
Karma: 175
Posts: 2557
Gender: Male
pm | email
OK, sorry for bumping up an old topic, but I was reading it for fun, and I found this:

Quote:

That glitch became known as the Great Uploader Glitch of 2007, and it ended almost two months later on May 15. During those two months, we basically spammed Neopets.com to death with thousands of error reports and editorial questions. We all risked getting frozen, but Neopets didn't realize the problem until people stopped joining their Cave of the Week (COTW) contest, which is actually chosen at random. On May 10, they actually had to extend one week because of how little entries they were getting. After the glitch was fixed, we all got hundreds of neomails replying to the thousands of reports that we sent.  And we also risked getting frozen because technically we were spamming.


Doesn't that seem a bit redundant?


Livio
[?] Karma: 0 | Quote - Link
Sunday, January 30 2011, 4:05 pm EST

Age: 31
Karma: 470
Posts: 9620
Gender: Male
Location: Arizona, USA
pm | email
wow I should've proof-read. fixed.

actually, looking through other parts of this, this is really poorly written by my usual standards. And I think that equation is still wrong
Bmwsu
[?] Karma: 0 | Quote - Link
Sunday, January 30 2011, 10:57 pm EST

Age: 28
Karma: 175
Posts: 2557
Gender: Male
pm | email
I didn't even try to understand the equation.


jellsprout
[?] Karma: 0 | Quote - Link
Monday, January 31 2011, 11:45 am EST
Lord of Sprout Tower

Karma: -2147482799
Posts: 6445
Gender: Male
pm | email
'jellsprout' said:
Each row you use except for the first one takes up 2 extra characters.
The maximum characters you can use in a cave is exactly 8000, the minimum is exactly 256. This doesn't include name, water, background and terrain types, but it does include those 2 extra characters for each new row and it takes 2 characters for each ladder you use.

So if you have a cave of size 40*40 with no ladders, the actual size is 42*40-2 (each row is 2 tiles wider, except for the first line) = 1678 characters.
But if you have a cave of 20 wide and 80 high with no ladders, the actual size is 22*80-2=1758.
If you do use ladders, you need to add one extra character for each ladder you used.

So the actual formula is: (width+2) * (height) - 2 + (amount of ladder tiles). Add another 2 to both the width and height if you copy from the Cavemaker (because of the borders).


The correct equation explained here.

If we define x as the width of the level, y as the height of the level and n as the amount of ladders in your level, they must satisfy the following inequality:

256 ≤ ( x + 2 ) * y + n - 2 ≤ 8000

Or if we solve for x and y:

( 258 - n ) / y - 2 ≤ x ≤ ( 8002 - n ) / y - 2
( 258 - n ) / ( x + 2 ) ≤ y ≤ ( 8002 - n ) / ( x + 2 )


Spoiler:

« Forum Index < The Hannah and the Pirate Caves Board

In order to post in the forums, you must be logged into your account.
Click here to login.

© 2024 The Interguild | About & Links | Contact: livio@interguild.org
All games copyrighted to their respective owners.