Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Questions about V6 (https://forums.graalonline.com/forums/forumdisplay.php?f=196)
-   -   .NW Level capabilities and file format (https://forums.graalonline.com/forums/showthread.php?t=80476)

Ter13 07-14-2008 02:07 AM

.NW Level capabilities and file format
 
I'm looking for more information on .NW levels' capabilities, and have found a distinct lack of documentation on the web.

I've heard that the .nw files allow multiple layers to be used, how is this stored in a file?

So far, I've gathered the simple file format for a one layer map.

Quote:


file header:

GLEVNW01 - Don't quite understand the meaning here, possibly what version of NW the file uses?

file body:

For each horizontal row containing any modifications:

BOARD - Prefix for board data
(real) - X position of the board data (always seems to be zero. Can this change?)
(real) - Y position of the board data
(real) - Run of the board data (can this go above 64?)
(real) - Layer of the board data

(string)[run] -Contains tile data (each tile is 2 characters A-Z-a-z-(+/))

NPC - Prefix for Oldscript NPC data
(string) - Contains NPC's image file (- if no image)
(real) - NPC X position on the board
(real) - NPC Y position on the board
(string) - Contains entire NPC's script
NPCEND - Marks the end of the NPC

file footer:

File is null terminated
So far, my main questions, are:

1) OldScript NPCs are deprecated, right? How would one place new NPCs?

Obviously, Graal maps using the fourth Cartesian quaternion (I.E. 1,-1 through xINF,-xINF) however, mappings are stored as though in the first quaternion (I.E. 1,1 through xINF,xINF), which took me a second to adapt to before I could read the tile data from the file in raw form. I'm quite a bit perplexed by a few things.

Any comments or advice would be much appreciated.

DustyPorViva 07-14-2008 02:15 AM

Rise of the board = layer. It's always 0 because the default layer is always 0.

Ter13 07-14-2008 02:21 AM

Quote:

Originally Posted by DustyPorViva (Post 1403010)
Rise of the board = layer. It's always 0 because the default layer is always 0.

Alright, that's very helpul, and actually answers almost all of my questions! Many thanks!

Is it possible to create maps larger or smaller than 64x64, or is that a set in stone limitation, that is achieved by using GMaps?

I've also been wondering something for a bit, with the GMap feature, will multiple tilesets be shown at once, let's say you are on the border of a desert, which uses a completely different tile set than the grassland you stand on. In this case, the map to your left will be visible, due to the GMap's linking feature, but will it use the tileset you assign the desert maps, or will it use the grassland tileset that you have assigned the current map?

One more thing: How many layers can a map have, and can these layers overlay the player? Or is it all defined by the title data, what blocks and what doesn't?

Crow 07-14-2008 02:32 AM

Quote:

Originally Posted by Ter13 (Post 1403011)
Is it possible to create maps larger or smaller than 64x64, or is that a set in stone limitation, that is achieved by using GMaps?

You can only have levels with a size of 64*64, and get bigger "maps" by using gmaps.

Quote:

I've also been wondering something for a bit, with the GMap feature, will multiple tilesets be shown at once, let's say you are on the border of a desert, which uses a completely different tile set than the grassland you stand on. In this case, the map to your left will be visible, due to the GMap's linking feature, but will it use the tileset you assign the desert maps, or will it use the grassland tileset that you have assigned the current map?
It would use the tileset you assign to the desert levels. Only one tileset can be used/shown at once.

DustyPorViva 07-14-2008 03:53 AM

Quote:

Originally Posted by Ter13 (Post 1403011)
Is it possible to create maps larger or smaller than 64x64, or is that a set in stone limitation, that is achieved by using GMaps?

I've played with this. I've edited the levels in wordpad and changed their size, smaller and larger than 64x64. Smaller, and it fills the empty tiles with 0x0 tiles. Larger, and it crops it down to 64 anyways... so simply, no. He added the capability, I guess in case he ever wanted to add the feature, but...

Quote:

Originally Posted by Ter13 (Post 1403011)
I've also been wondering something for a bit, with the GMap feature, will multiple tilesets be shown at once, let's say you are on the border of a desert, which uses a completely different tile set than the grassland you stand on. In this case, the map to your left will be visible, due to the GMap's linking feature, but will it use the tileset you assign the desert maps, or will it use the grassland tileset that you have assigned the current map?

addtiledef is done level by level. You can add it specifically to desired levels on a gmap, so yes, you can achieve this. I never done it, but I assume it does work. You can also use addtiledef2, which will without a doubt probably work. But if you want desert tiles in the desert region, simply addtiledef/2 to each of the desert area levels, SPECIFICALLY(addtiledef("desertiles.png","overworl d_k-13.nw"), for example).

Quote:

Originally Posted by Ter13 (Post 1403011)
One more thing: How many layers can a map have, and can these layers overlay the player? Or is it all defined by the title data, what blocks and what doesn't?

Infinite, as far as I know. And no, you can't have overlaying tiles(because of the way the tile system is done). I've requested this, but no luck.

wild8900 07-14-2008 04:11 AM

So whats the use of several layers of tiles if they cant overlay and be over the player?

DustyPorViva 07-14-2008 04:19 AM

They would still be very useful, if there was any feasible way to use them. Mainly for eliminating multiple tiles for various terrains.

But ya, it sucks you can't draw them over the player(would remove the use of probably 50%+ NPCs made just to draw something over the player).

Ter13 07-14-2008 06:23 AM

Quote:

Originally Posted by wild8900 (Post 1403021)
So whats the use of several layers of tiles if they cant overlay and be over the player?

With 24 bit PNG files, one can create transparent tile backgrounds, meaning, tile detail can be added without wasting tiles by putting specific backgrounds behind the detail item. There are a lot of uses, just not usually from the perspective of Graal classic-themed graphics.

DustyPorViva 07-14-2008 06:54 AM

Yet, it all fails because WE HAVE NO EDITOR THAT CAN EDIT LAYERS!!!

****ity **** **** ****in ****.
Dammit.

wild8900 07-14-2008 06:58 AM

XD Do it by hand. When I make tile based games I do the levels by hand.

zokemon 07-14-2008 07:13 AM

I've shown many uses of tilelayers to the Graal community even without being able to overlay players, etc.

And about the editor: If you all really want a level editor with good tilelayer support, tell Stefan to fix the bugs in the new version that I reported 3 months ago as well as implement the taskbar button feature (so the external window will literally be treated like a seperate window with its very own place on your taskbar).

So far, I've heard people interested in the editor even managed to get a few people PM me about it but I'm pretty sure I'm the only one that has been bugging Stefan about the features/bug fixes and I got very little support in my feature request/bug fix threads. So why bother, huh? I guess people think I have more power then I really do? I honestly don't know.

xXziroXx 07-14-2008 12:32 PM

Quote:

Originally Posted by Ter13 (Post 1403009)
1) OldScript NPCs are deprecated, right? How would one place new NPCs?

Uhm... you can use both GS1 and GS2 in NPC/NPCEND tags, it simply tells the level that there's a NPC at the location.

Ter13 07-14-2008 03:10 PM

Quote:

Originally Posted by DustyPorViva (Post 1403037)
Yet, it all fails because WE HAVE NO EDITOR THAT CAN EDIT LAYERS!!!

****ity **** **** ****in ****.
Dammit.

Why do you think I'm asking? It's about damn time someone does something about it.

zokemon 07-14-2008 06:31 PM

Quote:

Originally Posted by Ter13 (Post 1403066)
Why do you think I'm asking? It's about damn time someone does something about it.

*feels ignored*

Ter13 07-14-2008 07:28 PM

Quote:

Originally Posted by zokemon (Post 1403089)
*feels ignored*

Speaking of which, did you ever finish your editor? I saw the thread, and that was the big inspiration for me to make an editor. However, I never found a depot for it, or a release.

I'm working mine in Java. I've got the tile-selection and laying working, but I haven't gotten multiple tile modification or multiple layers working that well. Plus, I haven't built my NWFileStream class yet, so it doesn't load or save.

I've made a really ugly, hacky editor, so in a few days, it should be ready for public consumption, and in a week or two, the code should be cleaned up enough to put it on sourceforge as an open-source editor.


All times are GMT +2. The time now is 08:54 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.