Documentation Home > Making Map Data with Textpad
About Map Data
NPCs (signs, ppl) Data
Info Points Data
Exit Data
Testing your Map Data
Map Data Problems
About Map Data
There are 3 types of map data: npcs, info points and exits. Each of these are a text file with a number of pieces of information inside it. The java applet loads these files depending on the map that is being shown.
I'll explain what the values are that go into each of the data files and why the data is there. Please pay attention to the comments in red, they are important, and if you don't do this stuff - your java applet will crash because of it.
Top
NPCs (signs, ppl) Data
NPC data is probably the most complicated, hence why I'm starting with it first - to get it out of the way!
NPCs are pretty cool, and there's lots of settings for them. I'll use the table below to explain each setting. You must enter a value of some sort for all these settings.
| Name | Description |
| Movement | Stop,Walking,Stepping |
| Chara Image | Chara1.png (or another image name), or none |
| X Coordinate | 0-39, entering a number below 0 or higher than 39 will cause the applet to die |
| Y Coordinate | 0-24, entering a number below 0 or higher than 24 will cause the applet to die |
| Direction | 0 = Left,1 = Right,2 = Up,3 = Down - the direction you want the npc to move |
| Movement Speed | 1-6, how fast you want them to move (1 is slowest) |
| Frequency | 1-8, how often you want them to move (1 is barely ever) |
| Logic | Stay,Random,Up/Down,Left/Right - the npc can move around the area |
| Dialog | Important! - There are quite a few things to note about this dialog text
|
So here's the line to make my sign for level 2 stop,none,17,9,0,1,1,stay,To Deadlands - Level 2. NPC data lives in the v2/npcs folder. Note that there are not extra blank lines at the end of any of these files. Keep it nice and tight looking :)
To place a NPC, load up your map and put the white box/cursor where you want the NPC to start at. Press the Z key and a small pop up will appear with the X and Y coordinates of your cursor. Write these down and use them when making your NPC. It's a great, fast way to figure out X/Y positions.
Top
Info Points Data
Info points are the doormats for the game. This is a spot where the player steps and the Java applet sends a signal to setStats.php. steStats.php sets the building name and X,Y coordinates in the player's player file.
So you make a info point, you just need the following info:
| Name | Description |
| Building Name | The name of the building. This should match the name of the text file, without underscores (_) or the extension (.txt). Example: Aria's Building |
| X Coordinate | Same rules apply above, 0-39 |
| Y Coordinate | Same rules apply above, 0-24 |
| Dialog | Same rules apply above, no extra commas, etc |
| Building Text File Name | The name of the building text file where the building data lives. Example: Aria's_Building.txt |
This info is loaded when the Java applet loads. A info point is tripped when the player steps on it. I use the doormat or arrow icon to signify a doormat. It seems the easiest way to tell a player to walk onto it.
I think the layout of the text file is pretty straight forward. 5 lines make up an entry, so make sure you don't hit the enter key unless you mean to make a new line. I turn off word wrap (Textpad, Configure, Wordwrap) so my lines run on forever and don't wrap.
To place a info point, load up your map and put the white box/cursor where you want the info point to start at. Press the Z key and a small pop up will appear with the X and Y coordinates of your cursor. Write these down and use them when making your info point. It's a great, fast way to figure out X/Y positions.
Top
Exit Data
Exit points are where one map connects to another. You can have many exits from one map that leads to other maps - it's quite cool. To start off make one map exit and make sure you can go back and forth between a map. If you want to see a exit data file, look in v2/exits. I'll explain the map data below:
| Name | Description |
| Path to Lower File | This is the full path to the lower file for the next map. The only thing that needs to change is the 1_lower.txt etc |
| Path to Upper File | This is the full path to the upper file for the next map. The only thing that needs to change is the 1_lower.txt etc |
| X Exit Coordinate | The X & Y here together make an exit point. When a player steps into this spot on the current map - the map will change. |
| Y Exit Coordinate | The X & Y here together make an exit point. When a player steps into this spot on the current map - the map will change. |
| X Start Coordinate | The X & Y here together make an start point on the next map |
| Y Start Coordinate | The X & Y here together make an start point on the next map |
To to figure out a exit point, load up your map and put the white box/cursor where you want the exit point to be at. Press the Z key and a small pop up will appear with the X and Y coordinates of your cursor. Write these down and use them when making your exit point. It's a great, fast way to figure out X/Y positions.
Top
Testing your Map Data
So once you've made your map data, checked it over a few times, may sure your X and Y coords are within their number values, make sure your dialogs don't have any odd characters or commas in them - you're safe to upload the text files in ASCII mode with WSFTP to the web server.
You can just upload the whole set of folders if you like - it's easier ;)
Once the data is on the server, load up your game and make sure it all works. Step onto all info points and make sure the dialog wraps ok for you, make sure the exit point connects to your next map etc.
Top
Map Data Problems
I got a funky error
Check your X, Y coords - make sure they aren't outside their allowed values. Check your dialog etc etc. Try removing all the files except one, and then upload them one at a time and see when you get the error.
Important: You will have to close your browser each time you change map files. This is so your web browser will clear its cache of the java applet.
How do I clear my browser cache?
Firefox: Press Shift, Control and Delete keys at the same time.
Internet Explorer: Click the Tools menu, Delete Browsing History
Visit www.createorconquer.com