• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Tutorial The Glorious Return Of Mapping Thread

Status
Not open for further replies.

DracoHouston

Kolben Developer
Contributor
This is a continuation of the original indiedb forums thread, located here http://www.indiedb.com/games/pokmon-3d/forum/thread/map-tutorial Please discuss mapping, ask questions and we will do our best to answer them. This game is heavily data driven and capable of more than what is currently done with it. Before we go to my big posts in the other thread here is a post about converting textures
DracoHouston: You've been having trouble making your own textures? I haven't had a problem so far.

View attachment 35

Try making the .xnb files with this:
http://sourceforge.net/projects/xnbbuilder/

Set Target Platform to Windows, Target Profile to Reach and select Compress Output.
Press convert and you should be fine.

Your tiles don't have to be 16x16. My avatar is 176x176 and I've tried scaling it.

Here's how to scale something:
Code:
{"Entity"{ENT[{"Scale"{sngArr[2,2,0]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[0,0.5,5]}}{"TexturePath"{str[Onibi]}}{"Textures"{recArr[[0,0,176,176]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[0]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}]}}
{"Entity"{ENT[{"Scale"{sngArr[4,4,0]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[1,4,5]}}{"TexturePath"{str[Onibi]}}{"Textures"{recArr[[0,0,176,176]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[0]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}]}}
Please note that when you are building an xnb, you want to set the output folder to where the file will go within the folder structure of the game. For textures this is /Pokemon/Content/Textures. For pokemon this is Pokemon/Content/Pokemon/Animations/Folder named after pokemon. Items are part of a single 'item sheet' texture, this is in Pokemon/Content/Items. Sounds go in Pokemon/Content/Sounds, music in Pokemon/Content/Songs. If you don't output the xnb to the folder it goes in it won't work, and for textures this means a crash. Don't rename an xnb once it is built, rebuild it with the new name.

This program can be used to EXTRACT textures.
http://www.terrariaonline.com/threads/xnb-exporter-extract-graphics-from-terraria.16058/
You extract the program to a folder containing XNB files that contain PNG images (textures, pokemon animations, the item sheet, character sprites etc). Leave the text box empty and click 'go for it' and it will spit out all the PNG files you can edit. Use the builder to convert it back.

0.17 is here, trainers are implemented, this is youngster joey, his script is simple.
Code:
@Trainer:001
:end
in the same folder is 001.trainer
Code:
64
Youngster
Joey
OK let's do this!~My Rattata is top~percentage!
But it is top percentage...
14
1|19,4
2|
3|
4|
5|
6|
first line is money for winning. then trainer class, then name, then start text before battle, then what he says on defeat. if you talk to him again he says the defeat line. after that is his skin, 14.xnb, the next 6 lines are of course the party. he has 1 pokemon, a level 4 rattata.

It leaves a registry entry in your save, for this trainer it is "trainer_001". if you have that in your registry he is flagged as defeated, to reset him you can delete the registry from the save. it appears to be no different from other registry entries so you could probably reset him by unregistering that entry in a script
 

DracoHouston

Kolben Developer
Contributor
I was inspired by RogueWolf going in and fixing the missing pokemon centers to go in and take a look at how the maps work, and how to create new maps. At a glance there's much more than just maps in the data, with enough experimentation many things could be possible

I will assume the reader of this post has read the information nilllzz has given us so far (here is a link if you haven't http://www.indiedb.com/games/pokmon-3d/tutorials/how-to-design-a-map-for-pokmon3d ). Before you do anything with the game files find where you keep the game and copy the launcher and pokemon folder to somewhere else.

The game at this point will load you into yourroom.dat, which is of course the player's room. You could in theory completely change this map but the entry point is probably defined in whatever starts a new game. For this tutorial I will change the warp block in the room to not lead to your house (barktown0.dat) but instead take the player on a whimsical journey through route 69, a dimension between your room and kitchen where charizards roam.

lets first go through yourroom.dat and talk about each part

Code:
{"Level"{LEV[{"Name"{str[Your Room]}}{"MusicLoop"{str[barktown]}}]}}
{"Actions"{LEV[{"CanTeleport"{bool[0]}}{"CanDig"{bool[0]}}{"CanFly"{bool[0]}}{"EnviromentType"{int[1]}}{"Weather"{int[1]}}]}}
the first 2 lines define the map itself. You put the map's friendly name (what will display ingame, not the file name) in where Your Room is in this example. The next one defines music, in this case it plays 'barktown', the available tracks are in \Pokemon\Content\Songs\ at time of writing they are
'barktown'
'center'
'cherrygrove'
'elmslab'
'lavender'
'RouteMusic0'
'RouteMusic1'
'title'
'violet'

Even though RouteMusic0 and 1 have camel casing, the string you give the tag is not case sensitive, routemusic0 etc will work

Next line defines if you can use certain items and HMs, as well as whether it has weather. I am unsure what EnvironmentType does, but yourroom is a 1 and routes are a 0. This is speculation on my part but it could define if the map is indoors or not.

Code:
Floor: {"Floor"{ENT[{"Size"{intArr[8,5]}}{"Position"{intArr[0,0,0]}}{"TexturePath"{str[House]}}{"Texture"{rec[32,0,16,16]}}]}}
{"Floor"{ENT[{"Size"{intArr[1,3]}}{"Position"{intArr[7,-1,-3]}}{"TexturePath"{str[House]}}{"Texture"{rec[32,0,16,16]}}]}}
there is no consistency throughout the map files on if you put floors: Floor: floor: Floors: etc so the first line appears to be a comment. The parser probably does not actually read anything not within tags.

After that are 2 floor blocks. The first is the main floor of the room and the other sits under the stairs. "Floor" seems to tell the game it is a walkable surface. Next is the size, in number of tiles. After that is the position. then it takes a texture, the available textures can be found in \Pokemon\Content\Textures\ they are
'Apricorn'
'Azalea'
'BarkTown'
'Berries'
'Center'
'Cherrygrove'
'Gate'
'House'
'House2'
'House3'
'Lab'
'Lavender'
'Mart'
'Routes'
'Village'
'Violet'

Again, these are not case sensitive.

The last part seems to define the texture coordinates, we are really defining a 3d rectangle with a tiled texture painted onto it. I don't know enough about these to tell you what each value does, I recommend you find similar uses of your desired texture in nilllzz's map to get a good start point. the textures could be atlas's as far as I know, there could be multiple textures inside each 'texture'. Could anyone fill me in on this if they know more so I can edit it in?

You will know if the values are wrong because the game either crashed or the textures are scaled wrong and misaligned. Also, large maps choke the game, I tried 256x256 tiles and it hanged for so long trying to process that when I warped in that I thought it crashed the game. Avoid very large maps, break big areas into smaller maps, unless that is optimized 64x64 is about as big as you can reasonably get right now.

Code:
Ceiling:
{"EntityField"{ENT[{"Size"{intArr[8,5]}}{"EntityID"{str[AllSidesObject]}}{"Position"{sngArr[0,2,0]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[96,0,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,1]}}{"EntityID"{str[AllSidesObject]}}{"Position"{sngArr[7,1,-1]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[96,0,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,1]}}{"EntityID"{str[AllSidesObject]}}{"Position"{sngArr[7,0,-2]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[96,0,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
 
Walls:
{"EntityField"{ENT[{"Size"{intArr[3,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[6,0,-2]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,2]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[6,-1,-2]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,2]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[8,-1,-2]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[7,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[0,0,-1]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,6]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[8,0,-1]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,5]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[-1,0,0]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[8,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[0,0,5]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[10,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[-1,1,-1]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[7,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[-1,1,5]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[3,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[6,1,5]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[32,32,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,5]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[-1,1,0]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,5]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[8,1,0]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[16,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}

All of this defines more blocks, this time they are not "Floor"s but "EntityField"s. The same things from the floors apply here, plug the values into the appropriate spot. There are more values in these tags though. First thing you may notice is the ceilings are AllSidesObject's and the walls are WallBlock's. Many of these are just set to 0 or nothing. There is also a collision tag that makes it so the player can't move through it. The wall blocks have a modelid of 1, the ceiling a modelid of 0, I don't know anything about this tag at the moment.

Code:
Stairs:
{"Entity"{ENT[{"EntityID"{str[SlideBlock]}}{"Position"{sngArr[7,-1,-1]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[64,32,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[2]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
This is the slanting surface you walk down to the warp block downstairs. It is a SlideBlock, which I guess is a walkable slanting block. It has a modelid of 2, which again I'm not sure on.
 

DracoHouston

Kolben Developer
Contributor
Code:
Warps:
{"Entity"{ENT[{"EntityID"{str[WarpBlock]}}{"Position"{sngArr[7,-1,-3]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[0,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[barktown0.dat,8,0.1,-2,2]}}{"Rotation"{int[0]}}]}}
This is where we actually want to edit. Here we tell the game that when the player walks onto this block it takes them to barktown0, which is your house. the important parts of this are the position and the additionalvalue. warp blocks are 1x1 so for doors that are 2 blocks wide you need 2 warp blocks. in additional value you define the map to go to, then the position you will enter the new map from. For this I changed it to

Code:
{"Entity"{ENT[{"EntityID"{str[WarpBlock]}}{"Position"{sngArr[7,-1,-3]}}{"TexturePath"{str[House]}}{"Textures"{recArr[[0,0,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[route69.dat,1,0.1,3,0]}}{"Rotation"{int[0]}}]}}
this is telling the game that at the bottom of the stairs there is an entrance to route69, the player will appear at tile 1,3, 0.1 tiles above the ground (to be safe). I don't know what the last value does.

When warping you will move forward in the direction you moved through the warp block in, so warp blocks and entry points must line up! If you spawn in without a floor your character will float, unable to move.

After that is a bunch of stuff defining furniture, the pc etc as well as the scripts that make the more complex parts work. They are beyond the scope of this tutorial. Now, onto the custom map itself. I created 2 files, route69.dat and route69.poke. The first is of course your map, the other defines what is in the grass.

I modified snippets from route 29 and constructed a new map, lets walk through it:


Code:
{"Level"{LEV[{"Name"{str[Route 69]}}{"MusicLoop"{str[violet]}}]}}
{"Actions"{LEV[{"CanTeleport"{bool[1]}}{"CanDig"{bool[0]}}{"CanFly"{bool[1]}}{"EnviromentType"{int[0]}}{"Weather"{int[0]}}]}}
This gives the map its name, and plays the music from violet city. Out here we can teleport, fly, but not dig.

Code:
floors:
{"Floor"{ENT[{"Size"{intArr[20,13]}}{"Position"{intArr[0,0,0]}}{"TexturePath"{str[Routes]}}{"Texture"{rec[96,16,16,16]}}]}}
this is a 20 by 13 floor block, starting at 0,0,0, it uses the texture for the route floors (grass, snow etc depending on weather)

Code:
warps:
{"Entity"{ENT[{"EntityID"{str[WarpBlock]}}{"Position"{sngArr[1,0,1]}}{"TexturePath"{str[Village]}}{"Textures"{recArr[[128,16,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[yourroom.dat,7,-0.9,-3,2]}}{"Rotation"{int[0]}}]}}
{"Entity"{ENT[{"EntityID"{str[WarpBlock]}}{"Position"{sngArr[18,0,1]}}{"TexturePath"{str[Village]}}{"Textures"{recArr[[128,16,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[barktown0.dat,8,0.1,-2,2]}}{"Rotation"{int[0]}}]}}
These get us back to the room and house. They are placed so that you walk the correct direction when entering the maps.

Code:
trees:
{"EntityField"{ENT[{"Size"{intArr[1,10]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[2,-0.2,0]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,12]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[0,-0.2,0]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,12]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[19,-0.2,0]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[20,1]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[0,-0.2,12]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[17,1]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[3,-0.2,0]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
{"EntityField"{ENT[{"Size"{intArr[1,9]}}{"EntityID"{str[WallBill]}}{"Position"{sngArr[17,-0.2,1]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,32,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
these define those tree walls. The position and size are the important parts of the tag. There are other types of billboard sprite objects you can place, values for them can be found in the other map files, I simply copy/pasted one of the tree tags from route29.dat for these and edited them.

Code:
signs:
{"Entity"{ENT[{"EntityID"{str[SignBlock]}}{"Position"{sngArr[1,0,11]}}{"TexturePath"{str[Village]}}{"Textures"{recArr[[32,32,16,16][48,32,16,16]]}}{"TextureIndex"{intArr[0,0,1,1,1,1,0,0,1,1]}}{"Collision"{bool[1]}}{"ModelID"{int[4]}}{"Action"{int[0]}}{"AdditionalValue"{str[Route 69*OVER 9000 FUNNY NUMBERS -~420]}}{"Rotation"{int[0]}}]}}
this makes a sign, again, simply taken from another map. The additionalvalue sets the text. * separates out parts of the dialogue that you have to press A to continue through, a ~ means a new line.

Code:
grass:
{"EntityField"{ENT[{"Size"{intArr[8,8]}}{"EntityID"{str[Grass]}}{"Position"{sngArr[4,0,1]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[80,16,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[0]}}{"ModelID"{int[3]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}
this is the grass field. Position and size are important.

Code:
npcs:
{"NPC"{NPC[{"Position"{sngArr[6,0,10]}}{"TextureID"{str[28]}}{"ID"{int[0]}}{"Name"{str[Funny Name]}}{"Action"{int[0]}}{"AdditionalValue"{str[Yo, !*I hear that GEORGE W. BUSH~ looks like a monkey.]}}{"Rotation"{int[2]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[6,10,5,1]]}}]}}
This is an NPC from new bark Town. He has a name (Funny Name in this case) and an additionalvalue, which stores what he says when activated. The text you give it works like the sign. * for pause, ~ for new line. You get 2 lines and there is no word wrap. Every second line must end with a * and every other line must end with ~. You may notice in the video I left a space after the ~ here and it puts the second line out of alignment and looks ugly. So probably avoid doing that :) I don't know the size of the dialogue box off hand, sorry. Also, there is a auto complete field, it is <playername>, replaces that with the player's name.

There is still much ground to cover, but it is beyond my level of expertise right now. Perhaps there will be more threads like this in the future. I hope someone finds this useful

Almost forgot the .poke file. They looks like this

rute31.poke
Code:
{3|5}
{0|10|35|1,2,3}
{0|11|15|1}
{0|13|30|1,2,3}
{0|14|10|1}
{0|16|30|1,2}
{0|19|40|0}
The first line defines the level range, in this case it is between 3 and 5, so possibilities are 3, 4 or 5.

The other lines are each pokemon. I don't know what the first value does, it is 0 in all .poke files. The next one is the pokemon's index number. I believe the next one is chance to find one, the other values I am not sure on. Here is route69.poke, which gives me charmanders
Code:
{4|6}
{0|4|55|-1}
In hindsight the -1 might be why I can't catch him in the video. I will check another time.
 

DracoHouston

Kolben Developer
Contributor
Another thing, while trying to figure out what things did I messed with the texture coords, and gave the warp block a bad position to send you to, here's a screenshot I took of it (this was when route69.dat was just a copy of route29.dat)

The numbers I put in for textures were too big, if they were really big it crashed the game. the variety of stuff i see on the ground made me suspect the texture files are actually texture atlas'

The bad warp block target can be used to your advantage too, if you want a good look at the layout of your map just make it warp you into the air over it so you can survey your work.

saruish said:
There seem not to be a script for step/ledges there. it quiet possiable that scripts are in other locations as well. Tho I cant imagine where. if we do find it. the y location in x,y,z needs to be -1. not 0 or what ever it on. that is assuming the walking and stopping of characters is done the same way as map stuff.. So it lands on the land below.
Yeah you won't find anything that does what you want in the game files right now, it could maybe be possible anyway though. Here is what I've done so far (not much, I've been procrastinating)

http://pastebin.com/kmS4pF60 << using pastebin because this forum won't let me post things from these files without it tryign to interpret it as bbcode or whatever and refusing to post.

Each of these defines a trigger around the grass patch in my map. The script it refers to in additionalvalue is stored in the scripts folder This is my current route69warning.dat

http://pastebin.com/PQYU4M3c

This simply shows text and turns the player if the player has no pokemon. Here is a more complex script, the warning to not leave New Bark Town if you have no pokemon

http://pastebin.com/kuguPtyf

So what does this do? The first line checks for no pokemon, if true it goes to 'then' and executes every command until the endif. If not true it skips to endif (the last command being end, so it would do nothing if you have pokemon). I am unaware of the existence of elseif etc keywords but you could just nest a bunch of ifs to do the same thing with more lines. Text pops up a text box, this works just like signs, * for new page, ~ for new line, no word wrap.

Turn does turns and Move does moves. The last 2 take some arguments. The first is the target, for NPCs you use a number coresponding to the order you defined the NPCs, if you have 1 NPC they are 0, if you have 10 and you want the 8th one it is 7 (it starts from 0, not 1). For players you put Player. The next number says how far they move, in tiles. For turn it is how many 90 degree turns it takes to turn in the direction you want to face. You can only turn in 1 direction, 0 and 4 make you look ahead, 2 spins you around, 1 and 3 turn you to face to your sides. This is relative to the player's direction when the script starts. If the player enters the script in a way that is not intended things can and probably will break. This seems to be a big limitation of the system as it is.

This script makes your character turn around, to look back at new bark town, because you were trying to leave to route 29. The first text box pops up and once it is closed by the player the NPC turns and moves to go to the player, and open another text box. Once that is done it returns to a spot and the player moves forward and a text box opens again, when closed the script ends.
 

DracoHouston

Kolben Developer
Contributor
I'm working on a map editor that does this automatically for you, Will follow with more info soon
Cool. I considered starting one the other day but I have my own indie game project I've barely worked on in a month, at least a thing that lets you select options and set some values and it generates the tag for you to paste into your .dat. Until your tool is fully done hopefully my posts help people get through the early stages of learning to map.
Maybe add the code in a code bbcode?

[ CODE][/CODE ]
eeeehhhhhh i wasn't game to deal with them again in case they were like the indiedb forums ones (which were far too hard to edit). Let me fix them.

edit: done.
 

Saruish

Dragon Tamer
some of the codes I did for the original theard.

For grassy hills
Code:
Stairs:
{"Entity"{ENT[{"EntityID"{str[SlideBlock]}}{"Position"{sngArr[14,0,42]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[96,16,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[2]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}]}}
for sandy hills
Code:
Stairs:
{"Entity"{ENT[{"EntityID"{str[SlideBlock]}}{"Position"{sngArr[14,0,42]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[112,16,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[2]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}]}}
for wall blocks for under ledges
Code:
Hill:
{"EntityField"{ENT[{"Size"{intArr[3,1]}}{"EntityID"{str[WallBlock]}}{"Position"{sngArr[4,0,27]}}{"TexturePath"{str[Routes]}}{"Textures"{recArr[[160,16,16,16]]}}{"TextureIndex"{intArr[0,0,0,0,0,0]}}{"Collision"{bool[1]}}{"ModelID"{int[1]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[0]}}]}}

unforunitaly the ledges only goes back down to 0 for the players. so using these. while looks better. pretty much breaks the ledges. if someone knows how to edit the ledges so it drops the player -1 or what ever number is needed for the playier to land on the floor below. then one can use all of this together and make elevated ledges.
 

DracoHouston

Kolben Developer
Contributor
I was going to make a nested @Options password entry thing on the computer in the map I'm making, but it appears that they can't nest?

I was attempting to have an option to log into the pc of the NPC that gives you the starter pokemon on my map. On log in it would ask you for a 4 digit password. If you use the bookshelf nearby there are 3 books about pokemon, you find the password written on the back of one of them. So the entry sequence would be a set of option dialogues. The password was 4231 so it was intended to go like this:
choose:
-1
>wrong password, logging off
-2
>wrong password, logging off
-3
>wrong password, logging off
-4
>that seemed to work, there are 3 spaces left
choose:
-1
>wrong password, logging off
-2
>that seemed to work, there are 2 spaces left
choose:
-1
>wrong password, logging off
-2
>wrong password, logging off
-3
>that seemed to work, there is 1 space left
choose:
-1
>you steal bruce's credit card details and launder the money as potions to fence at cash converters
-2
>wrong password, logging off
-3
>wrong password, logging off
-4
>wrong password, logging off
-4
>wrong password, logging off
-3
>wrong password, logging off
-4
>wrong password, logging off

But I couldnt even get it to work beyond asking for the first number, choosing an option would either end the script (doing nothing) or displayed the logoff message instead.
 

Saruish

Dragon Tamer
I was going to make a nested @Options password entry thing on the computer in the map I'm making, but it appears that they can't nest?

I was attempting to have an option to log into the pc of the NPC that gives you the starter pokemon on my map. On log in it would ask you for a 4 digit password. If you use the bookshelf nearby there are 3 books about pokemon, you find the password written on the back of one of them. So the entry sequence would be a set of option dialogues. The password was 4231 so it was intended to go like this:
choose:
-1
>wrong password, logging off
-2
>wrong password, logging off
-3
>wrong password, logging off
-4
>that seemed to work, there are 3 spaces left
choose:
-1
>wrong password, logging off
-2
>that seemed to work, there are 2 spaces left
choose:
-1
>wrong password, logging off
-2
>wrong password, logging off
-3
>that seemed to work, there is 1 space left
choose:
-1
>you steal bruce's credit card details and launder the money as potions to fence at cash converters
-2
>wrong password, logging off
-3
>wrong password, logging off
-4
>wrong password, logging off
-4
>wrong password, logging off
-3
>wrong password, logging off
-4
>wrong password, logging off

But I couldnt even get it to work beyond asking for the first number, choosing an option would either end the script (doing nothing) or displayed the logoff message instead.
nice. perhaps you can make a Nurse pc and a gate officer pc as well. that you can only get the password too if you did a special event for them. like working for them or recuse pokemon from team Rocket. ecta.

Edit: here a list you can use.
  • Pokecenter pc.
  • Gate officer pc.
  • National park officer pc.
  • Goldenrod department store manager pc.
  • Pokemark manager pc.
  • Goldenrod radio tower pc
  • Train station pc.
  • Ruins of apha (when you talk to the guy that give you the unown dex. there should be a pc with his research on it as well. which you may use later)
That all i got
 

DracoHouston

Kolben Developer
Contributor
nice. perhaps you can make a Nurse pc and a gate officer pc as well. that you can only get the password too if you did a special event for them. like working for them or recuse pokemon from team Rocket. ecta.

Edit: here a list you can use.
  • Pokecenter pc.
  • Gate officer pc.
  • National park officer pc.
  • Goldenrod department store manager pc.
  • Pokemark manager pc.
  • Goldenrod radio tower pc
  • Train station pc.
  • Ruins of apha (when you talk to the guy that give you the unown dex. there should be a pc with his research on it as well. which you may use later)
That all i got
as in put into the official maps? would be a cool idea.

i really hope nilllzz reads this thread and the indiedb one some time, maybe it'll give him some ideas for what needs to be supported to make the game work + support mods more. Who knows, maybe I'm messing up the syntax in my script and some of my problems aren't problems at all, lol. The ledge experiment you did demonstrates a pretty big gap in functionality though, gotta have those jump/teleport blocks! We don't even have trainer battles yet so I'm not holding my breath though
 

Saruish

Dragon Tamer
nice. perhaps you can make a Nurse pc and a gate officer pc as well. that you can only get the password too if you did a special event for them. like working for them or recuse pokemon from team Rocket. ecta.

Edit: here a list you can use.
  • Pokecenter pc.
  • Gate officer pc.
  • National park officer pc.
  • Goldenrod department store manager pc.
  • Pokemark manager pc.
  • Goldenrod radio tower pc
  • Train station pc.
  • Ruins of apha (when you talk to the guy that give you the unown dex. there should be a pc with his research on it as well. which you may use later)
That all i got
as in put into the official maps? would be a cool idea.

i really hope nilllzz reads this thread and the indiedb one some time, maybe it'll give him some ideas for what needs to be supported to make the game work + support mods more. Who knows, maybe I'm messing up the syntax in my script and some of my problems aren't problems at all, lol. The ledge experiment you did demonstrates a pretty big gap in functionality though, gotta have those jump/teleport blocks! We don't even have trainer battles yet so I'm not holding my breath though
you could allways send it to him. or you never know he could of already been lurking around here.
 

sir151

Starting Trainer
Personally I'd like to see the maps completed before doing anything else. Get a working map editor and I'll love you forever.
 
Status
Not open for further replies.
Top